Projectile motion is a form of motion experienced by an object or particle (a projectile) that is projected near the Earth's surface and moves along a curved path under the action of gravity only (in particular, the effects of air resistance are passive and assumed to be negligible). This curved path was shown by Galileo to be a parabola, but may also be a line in the special case when it is thrown directly upwards. The study of such motions is called ballistics, and such a trajectory is a ballistic trajectory. The only force of mathematical significance that is actively exerted on the object is gravity, which acts downward, thus imparting to the object a downward acceleration towards the Earth’s center of mass. Because of the object's inertia, no external force is needed to maintain the horizontal velocity component of the object's motion. Taking other forces into account, such as aerodynamic drag or internal propulsion (such as in a rocket), requires additional analysis. A ballistic missile is a missile only guided during the relatively brief initial powered phase of flight, and whose remaining course is governed by the laws of classical mechanics.
Ballistics (Greek: βάλλειν, romanized: ba'llein, lit. 'to throw') is the science of dynamics that deals with the flight, behavior and effects of projectiles, especially bullets, unguided bombs, rockets, or the like; the science or art of designing and accelerating projectiles so as to achieve a desired performance.
The elementary equations of ballistics neglect nearly every factor except for initial velocity and an assumed constant gravitational acceleration. Practical solutions of a ballistics problem often require considerations of air resistance, cross winds, target motion, varying acceleration due to gravity, and in such problems as launching a rocket from one point on the Earth to another, the rotation of the Earth. Detailed mathematical solutions of practical problems typically do not have closedform solutions, and therefore require numerical methods to address.
In projectile motion, the horizontal motion and the vertical motion are independent of each other; that is, neither motion affects the other. This is the principle of compound motion established by Galileo in 1638,^{[1]} and used by him to prove the parabolic form of projectile motion.^{[2]}
A ballistic trajectory is a parabola with homogeneous acceleration, such as in a space ship with constant acceleration in absence of other forces. On Earth the acceleration changes magnitude with altitude and direction with latitude/longitude. This causes an elliptic trajectory, which is very close to a parabola on a small scale. However, if an object was thrown and the Earth was suddenly replaced with a black hole of equal mass, it would become obvious that the ballistic trajectory is part of an elliptic orbit around that black hole, and not a parabola that extends to infinity. At higher speeds the trajectory can also be circular, parabolic or hyperbolic (unless distorted by other objects like the Moon or the Sun). In this article a homogeneous acceleration is assumed.
Since there is only acceleration in the vertical direction, the velocity in the horizontal direction is constant, being equal to . The vertical motion of the projectile is the motion of a particle during its free fall. Here the acceleration is constant, being equal to g.^{[note 1]} The components of the acceleration are:
Let the projectile be launched with an initial velocity , which can be expressed as the sum of horizontal and vertical components as follows:
The components and can be found if the initial launch angle, , is known:
The horizontal component of the velocity of the object remains unchanged throughout the motion. The vertical component of the velocity changes linearly,^{[note 2]} because the acceleration due to gravity is constant. The accelerations in the x and y directions can be integrated to solve for the components of velocity at any time t, as follows:
The magnitude of the velocity (under the Pythagorean theorem, also known as the triangle law):
At any time , the projectile's horizontal and vertical displacement are:
The magnitude of the displacement is:
Consider the equations,
If t is eliminated between these two equations the following equation is obtained:
Since g, θ, and v_{0} are constants, the above equation is of the form
in which a and b are constants. This is the equation of a parabola, so the path is parabolic. The axis of the parabola is vertical.
If the projectile's position (x,y) and launch angle (θ or α) are known, the initial velocity can be found solving for v_{0} in the aforementioned parabolic equation:
The parabolic trajectory of a projectile can also be expressed in polar coordinates instead of Cartesian coordinates. In this case, the position has the general formula
In this equation, the origin is the midpoint of the horizontal range of the projectile, and if the ground is flat, the parabolic arc is plotted in the range . This expression can be obtained by transforming the Cartesian equation as stated above by and .
The total time t for which the projectile remains in the air is called the time of flight.
After the flight, the projectile returns to the horizontal axis (xaxis), so .
Note that we have neglected air resistance on the projectile.
If the starting point is at height y_{0} with respect to the point of impact, the time of flight is:
As above, this expression can be reduced to
if θ is 45° and y_{0} is 0.
The greatest height that the object will reach is known as the peak of the object's motion. The increase in height will last until , that is,
Time to reach the maximum height(h):
For the vertical displacement of the maximum height of projectile:
The maximum reachable height is obtained for θ=90°:
The relation between the range d on the horizontal plane and the maximum height h reached at is:
Proof


. 
The range and the maximum height of the projectile does not depend upon its mass. Hence range and maximum height are equal for all bodies that are thrown with the same velocity and direction.. The horizontal range d of the projectile is the horizontal distance it has traveled when it returns to its initial height ().
Time to reach ground:
From the horizontal displacement the maximum distance of projectile:
so^{[note 3]}
Note that d has its maximum value when
which necessarily corresponds to
or
The total horizontal distance (d) traveled.
When the surface is flat (initial height of the object is zero), the distance traveled:^{[3]}
Thus the maximum distance is obtained if θ is 45 degrees. This distance is:
According to the workenergy theorem the vertical component of velocity is:
These formulae ignore aerodynamic drag and also assume that the landing area is at uniform height 0.
The "angle of reach" is the angle (θ) at which a projectile must be launched in order to go a distance d, given the initial velocity v.
There are two solutions:
and
To hit a target at range x and altitude y when fired from (0,0) and with initial speed v the required angle(s) of launch θ are:
The two roots of the equation correspond to the two possible launch angles, so long as they aren't imaginary, in which case the initial speed is not great enough to reach the point (x,y) selected. This formula allows one to find the angle of launch needed without the restriction of .
One can also ask what launch angle allows the lowest possible launch velocity. This occurs when the two solutions above are equal, implying that the quantity under the square root sign is zero. This requires solving a quadratic equation for , and we find
This gives
If we denote the angle whose tangent is y/x by α, then
This implies
In other words, the launch should be at the angle halfway between the target and Zenith (vector opposite to Gravity)
The length of the parabolic arc traced by a projectile L, given that the height of launch and landing is the same and that there is no air resistance, is given by the formula:
where is the initial velocity, is the launch angle and is the acceleration due to gravity as a positive value. The expression can be obtained by evaluating the arc length integral for the heightdistance parabola between the bounds initial and final displacements (i.e. between 0 and the horizontal range of the projectile) such that:
Air resistance creates a force that (for symmetric projectiles) is always directed against the direction of motion in the surrounding medium and has a magnitude that depends on the absolute speed: . The speeddependence of the friction force is linear () at very low speeds (Stokes drag) and quadratic () at larger speeds (Newton drag).^{[4]} The transition between these behaviours is determined by the Reynolds number, which depends on speed, object size and kinematic viscosity of the medium. For Reynolds numbers below about 1000, the dependence is linear, above it becomes quadratic. In air, which has a kinematic viscosity around , this means that the drag force becomes quadratic in v when the product of speed and diameter is more than about , which is typically the case for projectiles.
The free body diagram on the right is for a projectile that experiences air resistance and the effects of gravity. Here, air resistance is assumed to be in the direction opposite of the projectile's velocity:
Stokes drag, where , only applies at very low speed in air, and is thus not the typical case for projectiles. However, the linear dependence of on causes a very simple differential equation of motion
in which the two cartesian components become completely independent, and thus easier to solve.^{[5]} Here, , and will be used to denote the initial velocity, the velocity along the direction of x and the velocity along the direction of y, respectively. The mass of the projectile will be denoted by m, and . For the derivation only the case where is considered. Again, the projectile is fired from the origin (0,0).
Derivation of horizontal position


The relationships that represent the motion of the particle are derived by Newton's Second Law, both in the x and y directions. In the x direction and in the y direction . This implies that: (1), and (2) Solving (1) is an elementary differential equation, thus the steps leading to a unique solution for v_{x} and, subsequently, x will not be enumerated. Given the initial conditions (where v_{x0} is understood to be the x component of the initial velocity) and for : (1a) 
Derivation of vertical position


While (1) is solved much in the same way, (2) is of distinct interest because of its nonhomogeneous nature. Hence, we will be extensively solving (2). Note that in this case the initial conditions are used and when . (2) (2a) This first order, linear, nonhomogeneous differential equation may be solved a number of ways; however, in this instance, it will be quicker to approach the solution via an integrating factor . (2c) (2d) (2e) (2f) (2g)
(3) Solving for our initial conditions: (2h) (3a) 
Derivation of the time of flight


The total time of the journey in the presence of air resistance (more specifically, when ) can be calculated by the same strategy as above, namely, we solve the equation . While in the case of zero air resistance this equation can be solved elementarily, here we shall need the Lambert W function. The equation is of the form , and such an equation can be transformed into an equation solvable by the function (see an example of such a transformation here). Some algebra shows that the total time of flight, in closed form, is given as^{[6]} 
The most typical case of air resistance, for the case of Reynolds numbers above about 1000 is Newton drag with a drag force proportional to the speed squared, . In air, which has a kinematic viscosity around , this means that the product of speed and diameter must be more than about .
Unfortunately, the equations of motion can not be easily solved analytically for this case. Therefore, a numerical solution will be examined.
The following assumptions are made:
Even though the general case of a projectile with Newton drag cannot be solved analytically, some special cases can. Here we denote the terminal velocity in freefall as and the characteristic settling time constant .
The approach will be to formulate integral expressions that can be evaluated numerically. All variables will then be expressed in terms of a parameter .
Derivation of integral expressions
 

A projectile of mass m is launched from a point , with an initial velocity in an initial direction that makes an angle with the horizontal. It experiences air resistance that is given by that acts tangentially to the path of travel at any point. Newton's second law of motion is . Applying this in the xdirection yields;
Where, , and are the horizontal and vertical components of the velocity respectively. Let , , and . Equation (1) now becomes;
In the ydirection;
Again let, , , and . Equation (2) is now;
Knowing that we may divide equation (B) by equation (A) to get;
Introduce a quantity such that , then;
From equations (C) and (D), observe that; Hence, which may be rewritten as; Separate variables and integrate as;
The lefthand side of equation (E) is For the righthand side, let , such that and, Thus . Also Hence; Equation (E) is now; From which; Since Denote , such that;
At the beginning of the motion, and Hence; , such that; As the motion proceeds, and , i.e., , and This means that, and Hence; In equations (F) and (G), observe that; As , When a state of dynamic equilibrium is attained under vertical free fall, the opposing forces of gravity and drag are equalized, i.e.,
In equation (A), substitutions for and from equations (F) and (G) yields; Also; Knowing that; , we may write 

(I) 
Also;

(J) 
And;

(K) 
Determine the time of flight by setting to in equation (K) above. Solve for the value of the variable .

(L) 
Equation (I) with substituted for gives;

(M) 
Equation (J) gives the horizontal range as;

(N) 
At the highest point of the projectile path , and , giving the maximum height from equation (K) as;

(O) 
A projectile motion with drag can be computed generically by numerical integration of the ordinary differential equation, for instance by applying a reduction to a firstorder system. The equation to be solved is
The following computer program in the form of a Python script demonstrates such a simulation, where the projectile is modelled as a baseball (parameters from ^{[8]}). The script uses the libraries numpy (for arrays), scipy (for numerical integration of the ordinary differential equation, and for rootfinding by Newton's method) and matplotlib (for plotting).
#!/usr/bin/env python3
from math import *
import numpy as np
from scipy.integrate import odeint
from scipy.optimize import newton
import matplotlib.pyplot as plt
def projectile_motion(g, mu, xy0, vxy0, tt):
# use a fourdimensional vector function vec = [x, y, vx, vy]
def dif(vec, t):
# time derivative of the whole vector vec
v = sqrt(vec[2] ** 2 + vec[3] ** 2)
return [vec[2], vec[3], mu * v * vec[2], g  mu * v * vec[3]]
# solve the differential equation numerically
vec = odeint(dif, [xy0[0], xy0[1], vxy0[0], vxy0[1]], tt)
return vec[:, 0], vec[:, 1], vec[:, 2], vec[:, 3] # return x, y, vx, vy
# Parameters of projectile (modelled after a baseball)
g = 9.81 # Acceleration due to gravity (m/s^2)
rho_air = 1.29 # Air density (kg/m^3)
v0 = 44.7 # Initial velocity (m/s)
alpha0 = radians(75) # Launch angle (deg.)
m = 0.145 # Mass of projectile (kg)
cD = 0.5 # Drag coefficient (spherical projectile)
r = 0.0366 # Radius of projectile (m)
mu = 0.5 * cD * (pi * r ** 2) * rho_air / m
# Initial position and launch velocity
x0, y0 = 0.0, 0.0
vx0, vy0 = v0 * cos(alpha0), v0 * sin(alpha0)
T_peak = newton(lambda t: projectile_motion(g, mu, (x0, y0), (vx0, vy0), [0, t])[3][1], 0)
y_peak = projectile_motion(g, mu, (x0, y0), (vx0, vy0), [0, T_peak])[1][1]
T = newton(lambda t: projectile_motion(g, mu, (x0, y0), (vx0, vy0), [0, t])[1][1], 2 * T_peak)
t = np.linspace(0, T, 501)
x, y, vx, vy = projectile_motion(g, mu, (x0, y0), (vx0, vy0), t)
print("Time of flight: {:.1f} s".format(T)) # returns 6.6 s
print("Horizontal range: {:.1f} m".format(x[1])) # returns 43.7 m
print("Maximum height: {:.1f} m".format(y_peak)) # returns 53.4 m
# Plot of trajectory
fig, ax = plt.subplots()
ax.plot(x, y, "r", label="Numerical")
ax.set_title(r"Projectile path")
ax.set_aspect("equal")
ax.grid(b=True)
ax.legend()
ax.set_xlabel("$x$ (m)")
ax.set_ylabel("$y$ (m)")
plt.savefig("01 Path.png")
fig, ax = plt.subplots()
ax.plot(t, vx, "b", label="$v_x$")
ax.set_title(r"Horizontal velocity component")
ax.grid(b=True)
ax.legend()
ax.set_xlabel("$t$ (s)")
ax.set_ylabel("$v_x$ (m/s)")
plt.savefig("02 Horiz vel.png")
fig, ax = plt.subplots()
ax.plot(t, vy, "b", label="$v_y$")
ax.set_title(r"Vertical velocity component")
ax.grid(b=True)
ax.legend()
ax.set_xlabel("$t$ (s)")
ax.set_ylabel("$v_y$ (m/s)")
plt.savefig("03 Vert vel.png")
This approach also allows to add the effects of speeddependent drag coefficient, altitudedependent air density and positiondependent gravity field.
A special case of a ballistic trajectory for a rocket is a lofted trajectory, a trajectory with an apogee greater than the minimumenergy trajectory to the same range. In other words, the rocket travels higher and by doing so it uses more energy to get to the same landing point. This may be done for various reasons such as increasing distance to the horizon to give greater viewing/communication range or for changing the angle with which a missile will impact on landing. Lofted trajectories are sometimes used in both missile rocketry and in spaceflight.^{[9]}
When a projectile without air resistance travels a range that is significant compared to the earth's radius (above ≈100 km), the curvature of the earth and the nonuniform gravitational field have to be considered. This is for example the case with spacecraft or intercontinental projectiles. The trajectory then generalizes from a parabola to a Keplerellipse with one focus at the center of the earth. The projectile motion then follows Kepler's laws of planetary motion.
The trajectories' parameters have to be adapted from the values of a uniform gravity field stated above. The earth radius is taken as R, and g as the standard surface gravity. Let the launch velocity relative to the first cosmic velocity.
Total range d between launch and impact:
Maximum range of a projectile for optimum launch angle ():
Maximum height of a projectile above the planetary surface:
Maximum height of a projectile for vertical launch ():
Time of flight: