# Range of a projectile

In physics, a projectile launched with specific initial conditions will have a range. It may be more predictable assuming a flat Earth with a uniform gravity field, and no air resistance. The horizontal ranges of a projectile are equal for two complementary angles of projection with the same velocity.
The following applies for ranges which are small compared to the size of the Earth. For longer ranges see sub-orbital spaceflight. The maximum horizontal distance travelled by the projectile, neglecting air resistance, can be calculated as follows:
    $d={\frac {v\cos \theta }{g}}\left(v\sin \theta +{\sqrt {v^{2}\sin ^{2}\theta +2gy_{0}}}\right)$
where
* d is the total horizontal distance travelled by the projectile.
* v is the velocity at which the projectile is launched
* g is the gravitational acceleration—usually taken to be 9.81 m/s$^2$ (32 f/s$^2$) near the Earth's surface
* θ is the angle at which the projectile is launched
* y$_0$ is the initial height of the projectile
If y$_0$ is taken to be zero, meaning that the object is being launched on flat ground, the range of the projectile will simplify to:
    $d={\frac {v^{2}\sin 2\theta }{g}}$

## Ideal projectile motion

Ideal projectile motion states that there is no air resistance and no change in gravitational acceleration. This assumption simplifies the mathematics greatly, and is a close approximation of actual projectile motion in cases where the distances travelled are small. Ideal projectile motion is also a good introduction to the topic before adding the complications of air resistance.

### Derivations

A launch angle of 45 degrees displaces the projectile the farthest horizontally. This is due to the nature of right triangles. Additionally, from the equation for the range :
    $d={\frac {v^{2}\sin 2\theta }{g}}$
We can see that the range will be maximum when the value of $\sin 2\theta$ is the highest (i.e. when it is equal to 1). Clearly, $2\theta$ has to be 90 degrees. That is to say, $\theta$ is 45 degrees.

#### Flat ground

First we examine the case where (y$_0$) is zero. The horizontal position of the projectile is
    $x(t)=vt\cos \theta$
In the vertical direction
    $y(t)=vt\sin \theta -{\frac {1}{2}}gt^{2}$
We are interested in the time when the projectile returns to the same height it originated. Let t$_g$ be any time when the height of the projectile is equal to its initial value.
    $0=vt\sin \theta -{\frac {1}{2}}gt^{2}$
By factoring:
    $t=0$
or
    $t={\frac {2v\sin \theta }{g}}$
but t = T = time of flight
    $T={\frac {2v\sin \theta }{g}}$
The first solution corresponds to when the projectile is first launched. The second solution is the useful one for determining the range of the projectile. Plugging this value for (t) into the horizontal equation yields
    $x={\frac {2v^{2}\cos \theta \,\sin \theta }{g}}$
Applying the trigonometric identity
    $\sin(x+y)=\sin x\,\cos y\ +\ \sin y\,\cos x$
If x and y are same,
    $\sin 2\theta =2\sin \theta \,\cos \theta$
allows us to simplify the solution to
    $d={\frac {v^{2}\sin 2\theta }{g}}$
Note that when (θ) is 45°, the solution becomes
    $d_{\max }={\frac {v^{2}}{g}}$

#### Uneven ground

Now we will allow (y$_0$) to be nonzero. Our equations of motion are now
    $x(t)=vt\cos \theta$
and
    $y(t)=y_{0}+vt\sin \theta -{\frac {1}{2}}gt^{2}$
Once again we solve for (t) in the case where the (y) position of the projectile is at zero (since this is how we defined our starting height to begin with)
    $0=y_{0}+vt\sin \theta -{\frac {1}{2}}gt^{2}$
Again by applying the quadratic formula we find two solutions for the time. After several steps of algebraic manipulation
    $t={\frac {v\sin \theta }{g}}\pm {\frac {\sqrt {v^{2}\sin ^{2}\theta +2gy_{0}}}{g}}$
The square root must be a positive number, and since the velocity and the sine of the launch angle can also be assumed to be positive, the solution with the greater time will occur when the positive of the plus or minus sign is used. Thus, the solution is
    $t={\frac {v\sin \theta }{g}}+{\frac {\sqrt {v^{2}\sin ^{2}\theta +2gy_{0}}}{g}}$
Solving for the range once again
    $d={\frac {v\cos \theta }{g}}\left(v\sin \theta +{\sqrt {v^{2}\sin ^{2}\theta +2gy_{0}}}\right)$
To maximize the range at any height
    $\theta =\arccos {\sqrt {\frac {2gy_{0}+v^{2}}{2gy_{0}+2v^{2}}}}$
Checking the limit as $y_{0}$ approaches 0
    $\lim _{y_{0}\to 0}\arccos {\sqrt {\frac {2gy_{0}+v^{2}}{2gy_{0}+2v^{2}}}}={\frac {\pi }{4}}$

#### Angle of impact

The angle ψ at which the projectile lands is given by:
    $\tan \psi ={\frac {-v_{y}(t_{d})}{v_{x}(t_{d})}}={\frac {\sqrt {v^{2}\sin ^{2}\theta +2gy_{0}}}{v\cos \theta }}$
For maximum range, this results in the following equation:
    $\tan ^{2}\psi ={\frac {2gy_{0}+v^{2}}{v^{2}}}=C+1$
Rewriting the original solution for θ, we get:
    $\tan ^{2}\theta ={\frac {1-\cos ^{2}\theta }{\cos ^{2}\theta }}={\frac {v^{2}}{2gy_{0}+v^{2}}}={\frac {1}{C+1}}$
Multiplying with the equation for (tan ψ)^2 gives:
    $\tan ^{2}\psi \,\tan ^{2}\theta ={\frac {2gy_{0}+v^{2}}{v^{2}}}{\frac {v^{2}}{2gy_{0}+v^{2}}}=1$
Because of the trigonometric identity
    $\tan(\theta +\psi )={\frac {\tan \theta +\tan \psi }{1-\tan \theta \tan \psi }}$,
this means that θ + ψ must be 90 degrees.

## Actual projectile motion

In addition to air resistance, which slows a projectile and reduces its range, many other factors also have to be accounted for when actual projectile motion is considered.

### Projectile characteristics

Generally speaking, a projectile with greater volume faces greater air resistance, reducing the range of the projectile. (And see Trajectory of a projectile.) Air resistance drag can be modified by the projectile shape: a tall and wide, but short projectile will face greater air resistance than a low and narrow, but long, projectile of the same volume. The surface of the projectile also must be considered: a smooth projectile will face less air resistance than a rough-surfaced one, and irregularities on the surface of a projectile may change its trajectory if they create more drag on one side of the projectile than on the other. However, certain irregularities such as dimples on a golf ball may actually increase its range by reducing the amount of turbulence caused behind the projectile as it travels. Mass also becomes important, as a more massive projectile will have more kinetic energy, and will thus be less affected by air resistance. The distribution of mass within the projectile can also be important, as an unevenly weighted projectile may spin undesirably, causing irregularities in its trajectory due to the magnus effect.
If a projectile is given rotation along its axes of travel, irregularities in the projectile's shape and weight distribution tend to be cancelled out. See rifling for a greater explanation.

### Firearm barrels

For projectiles that are launched by firearms and artillery, the nature of the gun's barrel is also important. Longer barrels allow more of the propellant's energy to be given to the projectile, yielding greater range. Rifling, while it may not increase the average (arithmetic mean) range of many shots from the same gun, will increase the accuracy and precision of the gun.

### Very large ranges

Some cannons or howitzers have been created with a very large range.
During World War I the Germans created an exceptionally large cannon, the Paris Gun, which could fire a shell more than 80 miles (130 km). North Korea has developed a gun known in the West as Koksan, with a range of 60 km using rocket-assisted projectiles. (And see Trajectory of a projectile.)
Such cannons are distinguished from rockets, or ballistic missiles, which have their own rocket engines, which continue to accelerate the missile for a period after they have been launched.