optimal angles for launching projectiles: …from the top of a tower at time t= 0 with initial...

22
CANADIAN APPLIED MATHEMATICS QUARTERLY Volume 16, Number 3, Fall 2008 OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: LAGRANGE VS. CAS ROBERT KANTROWITZ AND MICHAEL M. NEUMANN ABSTRACT. This article centers around the motion of a projectile that is launched from the top of a tower and lands on linear or parabolic mountains. The main goal is to provide explicit and manageable formulas for the angle of inclination that maximizes the distance the projectile travels. A general approach based on Lagrange multipliers is developed to obtain useful information not only for motion without air resistance, but also for the case when air resistance is proportional to the speed of the projectile. In this case, the optimal angle is ex- pressed in terms of the Lambert W function. The explicit for- mulas for the optimal angle are employed to answer a number of natural questions. For instance, it turns out that the optimal angle is a decreasing function of the height of the launch tower. Also discussed is the extent to which computer algebra systems are helpful in this context. 1 Introduction and motivation The principal motivation for this article stems from the classical problem of finding the optimal angle for launching a projectile to maximize the distance that it travels. More specifically, here we consider the motion of a projectile that is launched from the top of a tower at time t = 0 with initial position (0,h), muz- zle speed s, and angle of inclination θ with respect to the horizontal line y = h in the direction of the positive x-axis. The position of the projectile at time t 0 is denoted by (x(t),y(t)). We assume that the motion is subject to a constant force which, by Newton’s law, results in an acceleration with components of magnitude g in the direction of the negative y-axis and k in the direction of the negative x-axis. The archetypical case arises when h =0,k =0, and g =9.81 m/sec 2 is the gravitational constant. AMS subject classification: Primary 49K99; secondary 70B05. Keywords: Lagrange multipliers, projectile, ballistics, Lambert W function. Copyright c Applied Mathematics Institute, University of Alberta. 279

Upload: others

Post on 13-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

CANADIAN APPLIED

MATHEMATICS QUARTERLY

Volume 16, Number 3, Fall 2008

OPTIMAL ANGLES FOR LAUNCHING

PROJECTILES: LAGRANGE VS. CAS

ROBERT KANTROWITZ AND MICHAEL M. NEUMANN

ABSTRACT. This article centers around the motion of aprojectile that is launched from the top of a tower and landson linear or parabolic mountains. The main goal is to provideexplicit and manageable formulas for the angle of inclinationthat maximizes the distance the projectile travels. A generalapproach based on Lagrange multipliers is developed to obtainuseful information not only for motion without air resistance,but also for the case when air resistance is proportional to thespeed of the projectile. In this case, the optimal angle is ex-pressed in terms of the Lambert W function. The explicit for-mulas for the optimal angle are employed to answer a numberof natural questions. For instance, it turns out that the optimalangle is a decreasing function of the height of the launch tower.Also discussed is the extent to which computer algebra systemsare helpful in this context.

1 Introduction and motivation The principal motivation forthis article stems from the classical problem of finding the optimal anglefor launching a projectile to maximize the distance that it travels. Morespecifically, here we consider the motion of a projectile that is launchedfrom the top of a tower at time t = 0 with initial position (0, h), muz-zle speed s, and angle of inclination θ with respect to the horizontalline y = h in the direction of the positive x-axis. The position of theprojectile at time t ≥ 0 is denoted by (x(t), y(t)). We assume that themotion is subject to a constant force which, by Newton’s law, resultsin an acceleration with components of magnitude g in the direction ofthe negative y-axis and k in the direction of the negative x-axis. Thearchetypical case arises when h = 0, k = 0, and g = 9.81 m/sec2 is thegravitational constant.

AMS subject classification: Primary 49K99; secondary 70B05.Keywords: Lagrange multipliers, projectile, ballistics, Lambert W function.

Copyright c©Applied Mathematics Institute, University of Alberta.

279

Page 2: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

280 R. KANTROWITZ AND M. M. NEUMANN

We first ignore air resistance and other possible factors that mayinfluence the motion of the projectile. In this case, we are led to theinitial value problem

x′′(t) = −k, x′(0) = s cos θ, x(0) = 0,

y′′(t) = −g, y′(0) = s sin θ, y(0) = h.

Two elementary integration steps yield the familiar formulas

x(t) = s cos θ t− 1

2k t2 and y(t) = h+ s sin θ t− 1

2g t2,

valid for all t ≥ 0 for which the projectile stays in the air until it hitsa surface represented by the graph of a given function y = f(x). Theclassical case of the motion of a projectile landing at ground level isdescribed by f = 0, but we will also consider functions such as f(x) =mx and f(x) = mx2 to model projectiles landing on linear and parabolicmountains.

Our main interest is in comparing the trajectories of the projectilefor different launch angles. To emphasize the dependence on θ, we oftenwrite (x(t, θ), y(t, θ)) for the position of the projectile at time t whenlaunched with the angle of elevation θ. We assume that, for each θ forwhich −π/2 ≤ θ ≤ π/2, there exists some time tθ > 0 for which theimpact y(tθ, θ) = f (x(tθ , θ)) occurs. A typical task is then to determinean angle θ for which the distance from the launch point (0, h) to thepoint of impact (x(tθ, θ), y(tθ, θ)) is maximal. One may also be inter-ested in maximizing, for example, the arc length of the trajectory from(0, h) to (x(tθ, θ), y(tθ, θ)) or the distance from the origin to the point ofimpact. Of particular importance is the case of maximizing the lateraldisplacement x(tθ, θ) for −π/2 ≤ θ ≤ π/2; in fact, some of the othercases may easily be reduced to this one.

To present a uniform approach to this variety of optimization prob-lems, we consider a function ρ of the two variables x and y that plays therole of a generalized distance function. The goal is then to maximize thefunction ρ (x(t, θ), y(t, θ)) subject to the constraint y(t, θ) = f(x(t, θ)).As indicated above, typical simple examples for ρ(x, y) are x, x2 + y2,x2 + (y − h)2, or the square roots of the last two expressions.

We also consider the same kind of optimization problem for the caseof motion under air resistance. In this context, we assume the retardingforce to be proportional to the velocity vector with a negative constant

Page 3: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

OPTIMAL ANGLES FOR LAUNCHING PROJECTILES 281

factor. This leads to the initial value problem

x′′(t) = −k − αx′(t), x′(0) = s cos θ, x(0) = 0,

y′′(t) = −g − αy′(t), y′(0) = s sin θ, y(0) = h,

where α > 0 is the air resistance coefficient. It is well known and easilyverified that the solution of this uncoupled pair of ordinary differentialequations is given by

x(t) = − k

αt+

k + αs cos θ

α2

(1 − e−αt

)

and

y(t) = h− g

αt+

g + αs sin θ

α2

(1 − e−αt

).

In the special case when h = 0, k = 0, and f = 0, the corresponding mo-tion of projectiles has been investigated, for instance, in [2, 3, 4, 6, 7, 9].We mention in passing that, as α approaches zero, the preceding expres-sions for x(t) and y(t) tend to those describing the motion without airresistance. This follows by a straightforward application of l’Hospital’srule.

A natural strategy for attacking optimization problems of the indi-cated type is to solve the impact condition y(t, θ) = f(x(t, θ)) for t interms of θ and thus to obtain a formula for the hit time tθ. Pluggingthe result into the distance function leads to the problem of maximiz-ing d(θ) = ρ (x(tθ, θ), y(tθ, θ)) for −π/2 ≤ θ ≤ π/2. The final step theninvolves the solution of the critical point equation d′(θ) = 0.

Unfortunately, this approach meets intimidating obstacles even inrelatively simple situations. For instance, when the task is to shoota projectile as far as possible from a tower to ground level without airresistance and subject only to standard gravitation, then it is easily seenthat the impact time is given by

tθ =1

g

(s sin θ +

√2gh+ s2 sin2 θ

),

which leads to the problem of maximizing the distance function

(1) d(θ) = x(tθ, θ) = s cos θ tθ =s

gcos θ

(s sin θ +

√2gh+ s2 sin2 θ

).

Page 4: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

282 R. KANTROWITZ AND M. M. NEUMANN

While differentiation of d poses no problem, finding the solution of thecritical point equation d′(θ) = 0 is a challenging exercise unless h = 0.Computer algebra systems (CAS) such as Mathematica or Maple providea solution in this and some other cases. However, as will be seen below,these systems do not always work, and, when they do, their solutionstend to be frighteningly complicated and provide little insight.

In the next section, we employ the Lagrange multiplier theorem todevelop a necessary condition for the optimal launch angle in an abstractsetting that involves generalized distance and constraint functions ρ andf. It turns out that, in many instances, the optimal angle θopt and thecorresponding time of impact topt are exactly the non-trivial solutionsof the pair of equations

xt(t, θ)yθ(t, θ) = xθ(t, θ)yt(t, θ) and y(t, θ) = f(x(t, θ)).

Our general result leads to surprisingly simple optimality conditions forthe motion of projectiles with or without air resistance.

In the third section, we specialize to the case when k = 0 and f = 0.Here we obtain explicit formulas for the optimal angle that allow us toanswer several natural questions. For instance, in either the absence orpresence of air resistance, it is shown that the optimal angle is a strictlydecreasing function of the height h of the launch tower. Moreover, theoptimal angle for motion without air resistance turns out to be the limitof the optimal angles for the case of air resistance as the resistance co-efficient α tends to zero. For all this the Lambert W function provesto be an indispensable tool. In the last section, we establish and ex-plore formulas for the optimal angle for projectiles launched to certainmountains. We also compare our approach with what Mathematica andMaple can do in this setting.

2 The Lagrange multiplier approach Throughout this section,we consider continuously differentiable functions f : J → R on an openinterval J in R and ρ : Ω → R on an open subset Ω of R

2. Let σ(x) =ρ(x, f(x)) for all x ∈ J for which (x, f(x)) ∈ Ω. Also, let x, y : Γ → R

be continuously differentiable functions on an open subset Γ of R2 such

that (x(t, θ), y(t, θ)) ∈ Ω for all (t, θ) ∈ Γ. In this general setting, weobtain the following necessary condition for the solution of a canonicalconstrained optimization problem.

Theorem 1. Let (t∗, θ∗) ∈ Γ be a point for which x(t∗, θ∗) ∈ J, and

Page 5: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

OPTIMAL ANGLES FOR LAUNCHING PROJECTILES 283

suppose that (t∗, θ∗) provides a local extremum of the function

ρ(x(t, θ), y(t, θ))

subject to the constraint y(t, θ) = f(x(t, θ)). Then either x(t∗, θ∗) is a

critical point of the function σ, or

(2) xt(t∗, θ∗)yθ(t

∗, θ∗) = xθ(t∗, θ∗)yt(t

∗, θ∗).

Proof. Let (x∗, y∗) = (x(t∗, θ∗), y(t∗, θ∗)), and consider the functions uand v given by u(t, θ) = y(t, θ)−f(x(t, θ)) and v(t, θ) = ρ(x(t, θ), y(t, θ)).We separate two possibilities for the point (t∗, θ∗). If ∇u(t∗, θ∗) is thezero vector, then, by the chain rule, we have

yt(t∗, θ∗) = f ′(x∗)xt(t

∗, θ∗) and yθ(t∗, θ∗) = f ′(x∗)xθ(t

∗, θ∗)

and therefore,

xθ(t∗, θ∗)yt(t

∗, θ∗) = f ′(x∗)xt(t∗, θ∗)xθ(t

∗, θ∗) = xt(t∗, θ∗)yθ(t

∗, θ∗),

as desired. In the remaining case where ∇u(t∗, θ∗) is non-zero, we em-ploy the fact that (t∗, θ∗) yields a local extremum of v(t, θ) subject tothe constraint u(t, θ) = 0. Hence the Lagrange multiplier theorem yieldsthe existence of some λ ∈ R for which ∇v(t∗, θ∗) = λ∇u(t∗, θ∗). By themultivariate chain rule, this identity translates into the following twoequations:

ρx(x∗, y∗)xt(t∗, θ∗) + ρy(x∗, y∗)yt(t

∗, θ∗)

= λ (yt(t∗, θ∗) − f ′(x∗)xt(t

∗, θ∗)) ,

ρx(x∗, y∗)xθ(t∗, θ∗) + ρy(x∗, y∗)yθ(t

∗, θ∗)

= λ (yθ(t∗, θ∗) − f ′(x∗)xθ(t

∗, θ∗)) .

Cross-multiplication and simplification then leads to the identity

λ(ρx(x∗, y∗)xt(t

∗, θ∗)yθ(t∗, θ∗) − ρy(x∗, y∗)f ′(x∗)xθ(t

∗, θ∗)yt(t∗, θ∗)

)

= λ(ρx(x∗, y∗)xθ(t

∗, θ∗)yt(t∗, θ∗)

− ρy(x∗, y∗)f ′(x∗)xt(t∗, θ∗)yθ(t

∗, θ∗))

Page 6: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

284 R. KANTROWITZ AND M. M. NEUMANN

which may be rewritten in the form

λ(ρx(x∗, y∗) + ρy(x∗, y∗)f ′(x∗))(xt(t∗, θ∗)yθ(t

∗, θ∗)

− xθ(t∗, θ∗)yt(t

∗, θ∗)) = 0.

If the last of the three main factors of the preceding product is zero,then we are finished. Otherwise, we conclude that λ = 0 or ρx(x∗, y∗) +ρy(x

∗, y∗)f ′(x∗) = 0. If λ = 0, then it easily follows from ∇v(t∗, θ∗) =λ∇u(t∗, θ∗) = (0, 0) and xt(t

∗, θ∗)yθ(t∗, θ∗) 6= xθ(t

∗, θ∗)yt(t∗, θ∗) that

ρx(x∗, y∗) = ρy(x∗, y∗) = 0. Thus in either of the two remaining possibil-ities we have ρx(x∗, y∗) + ρy(x∗, y∗)f ′(x∗) = 0. But this means preciselythat σ′(x∗) = 0 and hence completes the argument.

We now apply Theorem 1 to the two cases of projectile motion con-sidered in the introductory section.

Corollary 2. For given constants g, k, h and s with s 6= 0, consider

x(t, θ) = s cos θ t− 1

2k t2 and y(t, θ) = h+ s sin θ t− 1

2g t2.

Let t∗ > 0 and θ∗ ∈ R be such that x(t∗, θ∗) ∈ J and (x(t∗, θ∗), y(t∗, θ∗))∈Ω, and suppose that (t∗, θ∗) provides a local extremum of the function

ρ(x(t, θ), y(t, θ)) subject to the constraint y(t, θ) = f(x(t, θ)). Then either

x(t∗, θ∗) is a critical point of σ, or

t∗ =s

k cos θ∗ + g sin θ∗

and θ∗ solves the equation

h+s2 sin θ

k cos θ + g sin θ− gs2

2 (k cos θ + g sin θ)2

= f

(s2 cos θ

k cos θ + g sin θ− ks2

2 (k cos θ + g sin θ)2

).

Proof. The result is immediate from (2) and the constraint y(t, θ) =f(x(t, θ)). Indeed, under the present conditions, the identity

xt(t, θ)yθ(t, θ) = xθ(t, θ)yt(t, θ)

Page 7: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

OPTIMAL ANGLES FOR LAUNCHING PROJECTILES 285

from Theorem 1 means precisely that

(s cos θ − kt) (s cos θ)t = (s sin θ − gt) (−s sin θ)t

which reduces to st = (g sin θ + k cos θ) t2. The last equality ensuresthat g sin θ+k cos θ 6= 0 whenever s, t 6= 0 and hence leads to the desiredformulas for t∗ and θ∗.

Corollary 3. For given constants g, k, h, s, and α with s, α 6= 0, con-

sider

x(t, θ) = − k

αt+

k + αs cos θ

α2

(1 − e−αt

)

and

y(t, θ) = h− g

αt+

g + αs sin θ

α2

(1 − e−αt

).

Let t∗ > 0 and θ∗ ∈ R be such that

x(t∗, θ∗) ∈ J and (x(t∗, θ∗), y(t∗, θ∗)) ∈ Ω,

and suppose that (t∗, θ∗) provides a local extremum of the function

ρ(x(t, θ), y(t, θ))

subject to the constraint y(t, θ) = f(x(t, θ)). Then either x(t∗, θ∗) is a

critical point of σ, or

t∗ =1

αln

(1 +

αs

k cos θ∗ + g sin θ∗

)

and θ∗ solves the equation

h− g

α2ln

(1 +

αs

k cos θ + g sin θ

)+

s (g + αs sin θ)

α (αs+ k cos θ + g sin θ)

= f

(− k

α2ln

(1 +

αs

k cos θ + g sin θ

)+

s (k + αs cos θ)

α (αs+ k cos θ + g sin θ)

).

Page 8: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

286 R. KANTROWITZ AND M. M. NEUMANN

Proof. For the present choice of x(t, θ) and y(t, θ), condition (2) forthe partial derivatives from Theorem 1 assumes the form

(− k

α+k + αs cos θ

αe−αt

)s cos θ

α

(1 − e−αt

)

= −s sin θ

α

(1 − e−αt

)(− g

α+g + αs sin θ

αe−αt

).

When t > 0 this identity may be simplified to

−k cos θ +(k cos θ + αs cos2 θ

)e−αt = g sin θ −

(g sin θ + αs sin2 θ

)e−αt

or, equivalently,

(αs+ k cos θ + g sin θ) e−αt = k cos θ + g sin θ.

Since the condition that s, α 6= 0 ensures that both αs+ k cos θ+ g sin θand k cos θ + g sin θ are non-zero, the last identity may be rewritten as

t =1

αln

(1 +

αs

k cos θ + g sin θ

).

This establishes the assertion for t∗, and the final formula for θ∗ is nowimmediate from the identity y(t∗, θ∗) = f(x(t∗, θ∗)).

We note in passing that, for fixed g, k, s, and θ, a simple applicationof l’Hospital’s rule shows that

limα→0+

1

αln

(1 +

αs

k cos θ + g sin θ

)=

s

k cos θ + g sin θ.

In this sense, the optimality condition for motion without air resistancefrom Corollary 2 is obtained as the limit of the corresponding conditionfor motion under air resistance from Corollary 3 as the resistance coef-ficient α tends to 0. Consequently, it seems reasonable to expect thatthe optimal angle for launching a projectile without air resistance is ob-tained as the limit of the optimal angles for motion under air resistancewhen α approaches 0. This issue will be addressed in Corollary 6 below.

To illustrate the role of the critical point condition for σ in the pre-ceding results, we consider the following two examples. If ρ(x, y) = x,then this condition becomes vacuous, since σ′(x) = 1 for all x. On the

Page 9: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

OPTIMAL ANGLES FOR LAUNCHING PROJECTILES 287

other hand, if ρ(x, y) = (x2 +(y−h)2)1/2, then a point (x, y) 6= (0, h) onthe graph of f satisfies σ′(x) = 0 precisely when x+(y−h)f ′(x) = 0 or,equivalently, f ′(x) = x/(h−y). Geometrically, this condition means thatthe line through the launch point (0, h) and the point of impact (x, y)is perpendicular to the line tangent to the graph of f at (x, y). In par-ticular, if f ′(0) = 0, then x = 0 is a critical point of σ that correspondsto the launch angle θ = −π/2. As will be seen in the last section, thismay well be the optimal angle to maximize the distance from (0, h) tothe point of impact.

3 Launching from a tower to ground level In this section,we discuss our optimal angle problem in the special case where k = 0,f = 0, and ρ(x, y) = x. Clearly, the corresponding function σ(x) = xhas no critical point. We note that the choice ρ(x, y) = x2 + h2 wouldlead to exactly the same results, since here the only critical point of σyields the minimal distance to (0, h). Thus, not surprisingly, the optimalangle in the setting of the next two results also maximizes the distancefrom the launch point (0, h) to the point of impact.

Theorem 4. For given constants g, s > 0 and h ≥ 0, let

x(t, θ) = s cos θ t and y(t, θ) = h+ s sin θ t− 1

2g t2.

Then there exists a unique point (topt, θopt) that maximizes the function

x(t, θ) subject to the constraint y(t, θ) = 0 for t ≥ 0 and −π/2 ≤ θ ≤π/2. In fact,

(3) θopt = arcsin

(1√

2 + 2gh/s2

)and topt =

1

g

√2s2 + 2gh,

while the maximal distance is given by

x(topt, θopt) =s

g

√s2 + 2gh.

Proof. Evidently, the distance function d considered in (1) assumesits maximum at some point θ∗ for which −π/2 < θ∗ < π/2, and thecorresponding impact time t∗ satisfies t∗ > 0. Because k = 0 and f = 0,the last equation of Corollary 2 simplifies to

h+s2

g− s2

2g sin2 θ= 0.

Page 10: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

288 R. KANTROWITZ AND M. M. NEUMANN

But this means precisely that sin θ = 1/√

2 + 2gh/s2 and hence leadsto the assertion regarding θopt. Moreover, again by Corollary 2, we have

topt =s

g sin θopt

=1

g

√2s2 + 2gh.

The final formula for the maximal distance is now immediate.

The formula for θopt of the preceding result was found earlier, inChapter 2 of [8], based on Mathematica. Actually, the version of Math-

ematica available at that time did not handle the problem until thesecond author implemented the substitution u = sin θ to eliminate thetrigonometric functions in the critical point equation for the distancefunction d introduced in (1). Version 6.0 of Mathematica provides di-rectly the solution of this critical point equation, but in an equivalentform involving arccos. Formula (3) turns out to be more useful, since itmakes transparent that θopt is a strictly decreasing function of the singleparameter µ = gh/s2. In particular, it follows that, for fixed g and s,the optimal angle is a strictly decreasing function of the height h of thelaunch tower. Plausible as this result may be, we do not know how toprove it without an explicit formula for θopt. The reader is invited tofind an elementary argument using only basic physics. Moreover, (3)confirms the expectation that θopt tends to 0 as h → ∞ and to π/4as h → 0. In the same vein, it follows that θopt is increasing in s anddecreasing in g when the other parameters are kept fixed.

Chau [1] and Groetsch [5] consider a similar problem for launchinga projectile from ground level to level h, implicitly assuming, of course,that the initial speed is sufficient to reach this level. We note thatTheorem 4 remains valid for negative h and then covers the settingconsidered in [1] and [5]. Chau [1] employs a critical point approach fora suitable function of two variables, while Groetsch [5] uses the Lagrangemultiplier theorem in this particular case. His approach inspired someof the results of our paper.

To establish the counterpart of Theorem 4 for the case of air resis-tance, more machinery is needed. By basic calculus, the function T givenby T (w) = w ew for all w ≥ −1 is strictly increasing and maps the inter-val [−1,∞) onto [−1/e,∞). The inverse of T is known as the Lambert

W function. It maps [−1/e,∞) onto [−1,∞) and has become a usefultool for the solution of equations involving the exponential function; formore details, history, and references, we refer to [9]. In Mathematica

the notation for the Lambert W function is ProductLog, while Maple

Page 11: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

OPTIMAL ANGLES FOR LAUNCHING PROJECTILES 289

uses just LambertW. We will employ the fact that W ′(u) > 0 for allu > −1/e, which is immediate from T ′(w) > 0 for all w > −1.

Theorem 5. For given constants g, s, α > 0 and h ≥ 0, let

x(t, θ) =s cos θ

α

(1 − e−αt

)

and

y(t, θ) = h− g

αt+

g + αs sin θ

α2

(1 − e−αt

).

Then there exists a unique point (topt, θopt) that maximizes the function

x(t, θ) subject to the constraint y(t, θ) = 0 for t ≥ 0 and −π/2 ≤ θ ≤π/2. In fact, with the notation γ = αs/g the formula

(4) θopt = arcsin

( γ W((γ2 − 1) e−1−α2h/g

)

γ 2 − 1 −W((γ 2 − 1) e−1−α2h/g

))

holds if γ 6= 1, whereas

θopt = arcsin

(1

e1+α2h/g − 1

)

if γ = 1. Moreover,

topt =1

αln

(1 +

αs

g sin θopt

)=s (g + αs sin θopt)

g (αs+ g sin θopt)+αh

g,

while the maximal distance is given by

x(topt, θopt) =s2 cos θopt

αs+ g sin θopt

.

Proof. We first observe that the condition y(t, θ) = 0 entails that|t| ≤ (αh+ s) /g+1/α. Thus it is immediate that the set D of all points(t, θ) for which t ≥ 0, −π/2 ≤ θ ≤ π/2, and y(t, θ) = 0 is bounded,closed, and non-empty. Hence, by continuity, there exists a point (t, θ)in D for which x(t, θ) is maximal, and it is clear that this occurs whent > 0 and −π/2 < θ < π/2. Consequently, it remains to solve the last

Page 12: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

290 R. KANTROWITZ AND M. M. NEUMANN

equation of Corollary 3 for sin θ in the special case when k = 0 and f = 0.Evidently, sin θ > 0 in the maximal case. Isolating the logarithmic term,we obtain the identity

(5) ln

(1 +

αs

g sin θ

)=αs (g + αs sin θ)

g (αs+ g sin θ)+α2h

g.

We now apply the exponential function and collect the terms involvingsin θ on one side of the resulting equation so that

g sin θ

αs+ g sin θexp

(αs (g + αs sin θ)

g (αs+ g sin θ)

)= exp

(−α

2h

g

).

To solve for sin θ in terms of the Lambert W function, we note that thepreceding equation is of the form p eq = r, where r does not depend onsin θ. Since W (ueu) = u for all u ≥ −1, our strategy is to find c 6= 0and d both independent of sin θ so that cp = d + q. Indeed, for such cand d we would arrive at

cpecp = cped+q = cedr

and hence cp = W (cpecp) = W(cedr

)provided that cp ≥ −1. This

would then lead to a simple formula for sin θ, since the right-hand sideis independent of θ. In the present setting, the condition cp = d + qmeans that

cg sin θ

αs+ g sin θ= d+

αs (g + αs sin θ)

g (αs+ g sin θ)

which may be simplified to

cg2 sin θ = dg (αs+ g sin θ) + αs (g + αs sin θ) .

Collecting terms involving sin θ, we may rewrite this equation in theform (

cg2 − dg 2 − α2s2)sin θ = (d+ 1)gαs.

Evidently, the equation holds with the choice

d = −1 and c =α2s2

g2− 1 = γ2 − 1,

since both sides are equal to zero. Because cp = d + q ≥ d = −1, itfollows that

(γ2 − 1

)g sin θ

αs+ g sin θ= c p = W

(cedr

)= W

((γ 2 − 1)e−1−α2h/g

).

Page 13: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

OPTIMAL ANGLES FOR LAUNCHING PROJECTILES 291

Note that c 6= 0 precisely when γ 6= 1, and, in this case, the precedingformula easily leads to a formula for sin θ and hence the optimal angleitself. In fact, we obtain

(γ2 − 1

)g sin θ = (αs+ g sin θ)W

((γ2 − 1)e−1−α2h/g

)

and therefore,

sin θ =γW

((γ2 − 1)e−1−α2h/g

)

γ2 − 1 −W((γ2 − 1)e−1−α2h/g

) .

This shows that the optimal angle is unique and given by (4) when γ 6= 1.In the remaining case γ = 1, equation (5) assumes the simple form

ln

(1 +

1

sin θ

)= 1 +

α2h

g

which has the unique solution sin θ = 1/(e1+α2h/g − 1), as claimed.The final assertions are now immediate from (5) and the formula for t∗

provided in Corollary 3.

Since Mathematica fails to solve equation (5) even when assisted withthe substitution u = sin θ, it is perhaps not surprising that the precedingproof requires some work. On the other hand, version 11 of Maple

handles (5) nicely, but ignores the case γ = 1. We mention that ourresult for the optimal angle reduces to the one provided by Packel andYuen in Theorem 3 of [9] for h = 0. Our use of the Lambert W functionwas inspired by [9], but our approach appears to be somewhat shortereven in this particular case.

Using the data s = 330 m/sec, h = 50 m, and g = 9.81 m/sec2, weillustrate in Figure 1 the paths of projectiles launched at angles θ = π/6(dotted), θ = π/15 (dashed), and θopt = 0.312 (solid), all subject toa coefficient of drag α = 0.2 sec−1. As Groetsch aptly remarks in [6],resistance is the enemy of symmetry, and here, of course, the paths ofthe projectiles launched from a tower are not parabolic as they wouldbe without air resistance.

Page 14: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

292 R. KANTROWITZ AND M. M. NEUMANN

We now investigate the optimal angle of Theorem 5 as a function ofh when all the other parameters are fixed. For this the closed form rep-resentation (4) of the optimal angle in terms of the Lambert W functionturns out to be crucial. Clearly, the continuity of W ensures that θopt

depends continuously on h and hence approaches the optimal angle forlaunching from ground level as h → 0. Similarly, because W (0) = 0,it follows from Theorem 5 that the optimal angle tends to zero whenh→ ∞.

Moreover, it turns out that θopt is a strictly decreasing function ofh. Indeed, this is again a consequence of the formulas for θopt providedin Theorem 5. The case γ = 1 is obvious, and, when γ 6= 1, a routinecomputation based on (4) shows that

θ′opt(h) = −α2γ(γ2 − 1)2W ′(u)e−1−α2h/g

g(γ2 − 1 −W (u))2 cos θopt(h)

where u = (γ2−1)e−1−α2h/g . This ensures that θ′opt(h) < 0 for all h ≥ 0simply because W ′(u) > 0, while a closed form for W ′(u) is not neededhere. It seems it would be difficult to establish that θopt decreases asa function of h without explicit formulas such as the ones provided inTheorem 5. As a by-product of our monotonicity result together withTheorem 2 of [9], we obtain that θopt(h) < θopt(0) < π/4 for all h > 0.

In the special case h = 0, Packel and Yuen [9] proved that the optimalangle is a decreasing function of the parameter γ. The formulas for θopt

from Theorem 5 reveal that this result ceases to be true for h > 0. Infact, in this case, θopt even fails to be a function of γ alone. It remainsopen if θopt is decreasing in α, although this happened to be the case

Page 15: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

OPTIMAL ANGLES FOR LAUNCHING PROJECTILES 293

in all numerical examples we checked. We also leave it to the readerto explore how θopt depends on g when the other parameters are keptfixed.

To conclude this section, we show that the results of Theorems 4and 5 are connected by taking the limit as air resistance approaches 0.Corollary 6 supports with a rigorous proof what may be suggested by ourphysical intuition. Remarkably, Mathematica handles the limit of thenext result even without the need for substitutions or other shortcuts.Maple, however, is unable to perform this computation.

Corollary 6. Given g, s > 0 and h ≥ 0, let θopt(α) denote the optimal

angle provided by Theorem 5 for the air resistance coefficient α > 0, and

let θopt be the optimal angle provided by Theorem 4 for the case of no

air resistance. Then θopt(α) → θopt as α → 0+.

Proof. By (3) and (4), it remains to establish the convergence

γ(α)W((γ(α)2 − 1) e−1−α2h/g

)

γ(α)2 − 1 −W((γ(α)2 − 1) e−1−α2h/g

) → 1√2 + 2gh/s2

as α→ 0+, where γ(α) = αs/g. Note that the quotient on the left-handside may be rewritten in the form

W((γ(α)2 − 1) e−1−α2h/g

)

γ(α) −(1 +W

((γ(α)2 − 1) e−1−α2h/g

))/γ(α)

and that the resulting new numerator approaches W (−1/e) = −1 asα→ 0+. Hence our task reduces to proving that

1 +W( (γ(α)2 − 1

)e−1−α2h/g

)

γ(α)→√

2 + 2gh/s2

as α → 0+. Fortunately, a closely related case was settled in [9, p. 348]where a suitable power series was employed to establish the convergence

1 +W((β 2 − 1) e−1

)

β→

√2 as β → 0+.

To take advantage of this result, we introduce

β(α) =√

1 + (γ(α)2 − 1) e−α2h/g for all α > 0.

Page 16: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

294 R. KANTROWITZ AND M. M. NEUMANN

These quantities were born to satisfy

(β(α)2 − 1

)e−1 =

(γ(α)2 − 1

)e−1−α2h/g ,

and it is clear that β(α) → 0+ as α→ 0+. Because

1 +W( (γ(α) 2 − 1

)e−1−α2h/g

)

γ(α)=

1 +W( (β(α) 2 − 1

)e−1)

β(α)

β(α)

γ(α)

for all α > 0, it remains to be seen that β(α)/γ(α) tends to√

1 + gh/s2

as α → 0+. But this is not difficult. Indeed, by l’Hospital’s rule, weobtain

limα→0+

β(α)2

γ(α)2= lim

α→0+

g2 +(α2s2 − g2

)e−α2h/g

α2s2

= limα→0+

(2αs2 −

(α2s2 − g2

)2αh/g

)e−α2h/g

2αs2

= limα→0+

(1 −

(α2s2 − g2

) h

gs2

)e−α2h/g

= 1 +gh

s2,

the desired convergence.

4 Launching projectiles to linear and parabolic mountainsIn this last section, we revisit the motion of projectiles without air re-sistance, but now for certain non-trivial choices of the impact functiony = f(x). Unless noted otherwise, the goal is to maximize the canonicaldistance function ρ(x, y) = x. First let k = 0. In this case, the optimalitycondition of Corollary 2 simplifies to

h+s2

g− s2

2g sin2 θ= f

(s2

gcot θ

).

A particularly powerful substitution for this formula is u = cot θ. Indeed,because of the identity csc2 θ = 1 + cot2 θ, the preceding equation turnsinto

(6)2gh

s2+ 1 − u2 =

2g

s2f

(s2

gu

).

We now solve this optimality condition in a few typical cases.

Page 17: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

OPTIMAL ANGLES FOR LAUNCHING PROJECTILES 295

4.1 First let f(x) = mx with some arbitrary constant m. Then, as inTheorem 4, our optimization problem certainly has a solution. To finda formula for the optimal angle, we note that (6) reduces to the simplequadratic equation u2 + 2mu = 1 + 2µ with our old friend µ = gh/s2.Since the maximal solution occurs for 0 < θ < π/2, we have u > 0 andtherefore

θopt = arccot (u) = arccot(−m+

√m2 + 1 + 2µ

).

Evidently, the result agrees with the one found in (3) for the case m = 0.Here, somewhat surprisingly, the optimal angle turns out to be a

function of only m and µ. In particular, our solution formula makes itobvious that θopt increases in s and decreases in g and h when all theothers parameters are kept fixed. Moreover, since the function ψ givenby ψ(m) = −m+(m2+1+2µ)1/2 satisfies ψ′(m) < 0 for all m, it followsthat θopt is an increasing function of the slope m.

The present problem was also considered in [8]. Specifically, thesecond author employed Mathematica to solve the impact conditiony(t, θ) = mx(t, θ) for t in terms of θ and then to find the critical pointsof the resulting distance function. The version of Mathematica used inSections 4.10 and 7.4 of [8] led to

θopt = arcsin

√2ghs2 + 2s4 + 2m2s4 ± 2 (2ghm2s6 +m2s8 +m4s8)

1/2

4g2h2 + 8ghs2 + 4s4 + 4m2s4,

which makes it hard see that θopt is decreasing, for instance, in h.

Moreover, the solution provided by the latest version of Mathemat-

ica is equally intimidating and involves eight possibilities for θopt basedon arccos. Each of them has the same complexity as the one providedabove and does not improve even when the FullSimplify commandis employed. Of course, the blame here lies not with Mathematica, butrather with the critical point method which appears to provide signif-icantly less insight than our Lagrange approach from Corollary 2. Wenote that Mathematica handles (6) well, but fails to work without theu = cot θ substitution. Maple performs comparably to Mathematica forthis and similar problems.

If one replaces the distance function ρ(x, y) = x by either x2 + y2 orx2+(y−h)2, then the optimal angle remains the same. Indeed, for everypoint (x, y) on the graph of f, the condition σ′(x) = 0 holds preciselywhen ρ(x, y) is minimal.

Page 18: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

296 R. KANTROWITZ AND M. M. NEUMANN

4.2 Now let f(x) = mx2, where m is a real constant for whichg+ 2ms2 > 0. This condition ensures that, for each θ for which −π/2 ≤θ ≤ π/2, there exists some t ≥ 0 for which the impact equation y(t, θ) =mx(t, θ)2 holds and that our optimization problem for ρ(x, y) = x has amaximal solution. Since (6) simplifies to

(1 +

2ms2

g

)u2 = 1 +

2gh

s2,

the optimal launch angle is given by the formula

θopt = arccot (u) = arccot

√1 + 2gh/s2

1 + 2ms2/g= arccot

√gs2 + 2g2h

gs2 + 2ms4.

Thus θopt is decreasing in h and g, but increasing in s and m, whenall the other parameters are fixed. The critical point approach to thisproblem was discussed in Sections 4.11 and 7.5 of [8]. For this method,the current version of Mathematica leads to

θopt = ± arccos

ñ 2g2h+ gs2

2g2h+ 2gs2 + 2ms4.

Except for the issue of sign, this is equivalent to the preceding solution,but, as in 4.1, the result appears to be less useful. Maple yields a similarformula in terms of arctan.

While the optimal angle remains the same when ρ(x, y) = x2 + y2,the situation changes for the choice ρ(x, y) = x2 +(y−h)2. To constructa specific example, suppose that h > 0 is large enough to satisfy

s

g

√s2 + 2gh ≤ h

2,

and consider f(x) = mx2 with m = 1/h. Then it is easily seen thatσ(x) = ρ(x, f(x)) < h2 = σ(0) for all 0 < x ≤ h/2. Since the lastformula of Theorem 4 and the choice of h ensure that x(t, θ) ≤ h/2whenever y(t, θ) = f(x(t, θ)), we conclude that here the critical pointx = 0 of σ yields the optimal solution and hence that θopt = −π/2 isthe unique launch angle that maximizes the distance from (0, h) to thepoint of impact. This example shows that it is essential to include thecritical points of σ in Theorem 1.

Page 19: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

OPTIMAL ANGLES FOR LAUNCHING PROJECTILES 297

4.3 We finally explore the optimality condition of Corollary 2 in thecase where k may be non-trivial, while f = 0. In this case, the conditionfor θ assumes the form

h+s2 sin θ

k cos θ + g sin θ− g s2

2 (k cos θ + g sin θ)2= 0.

We do not recommend solving this equation by hand. After the substi-tution u = sin θ and a simplification command both Mathematica andMaple provide the solution

θopt = arcsinK

where

K = ±

√(g2 + k2)(2h2k2 + ghs2 + s4) ±

√k2(g2 + k2)s2(2gh+ s2)3

2(g2 + k2)(h2(g2 + k2) + 2ghs2 + s4).

Complicated as this formula may be, it is much simpler than the long so-lution that results from Mathematica through a critical point approach;see Section 7.4 of [8].

P

Β

hh`

Β

Β

100 200 300x

-100

100

200

y

Figure 2

Moreover, the appearance of the term g2 + k2 suggests some simpli-fication. Indeed, as indicated in Figure 2, let P denote the point of

Page 20: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

298 R. KANTROWITZ AND M. M. NEUMANN

intersection of the x-axis and the line through (0, h) with direction vec-tor 〈k, g〉 . Clockwise rotation around P by the angle β = arctan(k/g)then yields the setting of 4.1 with the new parameters

g =√g2 + k2, h = h secβ =

h

g

√g2 + k2, and m = tanβ =

k

g.

Since the optimal angle θopt for the rotated setting also maximizes the

distance from P to the point of impact, we obtain θopt = θopt +β. Thusthe main result of 4.1 leads to the surprisingly simple formula

θopt = arccot

(− k

g+

√k2

g2+ 1 +

2h(g2 + k2)

gs2

)− arctan

(k

g

).

Again, the message is that, even with all the power of a CAS, the ap-proach matters.

REFERENCES

1. W. Chau, Optimal initial angle to fire a projectile, Pi Mu Epsilon J. 11 (2002),363–364.

2. N. de Mestre, The Mathematics of Projectiles in Sport, Cambridge UniversityPress, Cambridge, 1990.

3. C. W. Groetsch, Tartaglia’s inverse problem in a resistive medium, Amer. Math.Monthly 103 (1996), 546–551.

4. C. W. Groetsch, Inverse Problems, Math. Assoc. of America, Washington, DC,1999.

5. C. W. Groetsch, Geometrical aspects of an optimal trajectory, Pi Mu Epsilon J.11 (2003), 487–497.

6. C. W. Groetsch, Another broken symmetry, College Math. J. 36 (2005), 109–113.

7. C. W. Groetsch and B. Cipra, Halley’s comment—projectiles with linear resis-tance, Math. Magazine 70 (1997), 273–280.

8. M. M. Neumann and T. L. Miller, Mathematica Projects for Vector Calculus,Kendall-Hunt Publishing Company, Dubuque, IA, 1996.

9. E. W. Packel and D. S. Yuen, Projectile motion with resistance and the LambertW function, College Math. J. 35 (2004), 337–350.

Page 21: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal

OPTIMAL ANGLES FOR LAUNCHING PROJECTILES 299

Corresponding author:

Michael M. Neumann,

Department of Mathematics and Statistics, Mississippi State University,

Mississippi State, MS 39762, USA

E-mail address: [email protected]

Robert Kantrowitz,

Department of Mathematics, Hamilton College, Clinton, NY 13323, USA

E-mail address: [email protected]

Page 22: OPTIMAL ANGLES FOR LAUNCHING PROJECTILES: …from the top of a tower at time t= 0 with initial position (0;h);muz-zle speed s;and angle of inclination with respect to the horizontal