I've been studying multivariable calculus the last 2 weeks, and I understand (I think) how to optimize 2 variable equations through normal optimization and constrained optimization via Lagrange.

I couldn't draw the connection though when I tried to optimize the projectile motion equations, attempting to find the optimal angle to cover a constant distance in the minimum amount of time.

$$π‘₯ = 𝑣\cos(πœƒ)𝑑$$ $$𝑦 = 𝑣\sin(πœƒ)t βˆ’ \frac{1}{2}𝑔\mathrm{𝑑}^2$$

I also don't understand how to implement the constrain of covering a certain distance nor how to rewrite this equation minimizing time in the optimization. I am genuinely confused by the amount of variables and can't seem to 'make the leap' so to speak from what I know to what I don't.


I apologize for the lack of clarity on this post.

The problem is covering a certain distance in the least amount of time by finding the optimal launch angle at a constant velocity.

Through your responses, I think this means that $d$, total displacement, and $v$, constant velocity have been defined in our equations. This leaves θ and $t$ as our two variables.

If we then rewrite the two main equations in terms of $t$ as a function of θ, I believe this would point us towards finding the solution.

$$t = \frac{x}{vcos(πœƒ)}$$ and $$ t = \frac{y}{vsin(πœƒ)-\frac{1}{2}gt}$$ This would mean $$ \frac{x}{vcos(πœƒ)} = \frac{y}{vsin(πœƒ)-\frac{1}{2}gt}$$

I am stumped however on what to do after this. Mainly, given a total displacement of $d$, how would I go about writing that in terms of $x$ and $y$. I think $x = dcos(πœƒ)$ and $y = dsin(πœƒ)$ through vector resolution, but how would I incorporate that into the equations to calculate the optimal angle for the least amount of time.

If anything is incorrect or still unclear, do let me know. I appreciate all of your responses; they have indeed helped expand my thinking about this.

  • $\begingroup$ Solve for the distance ($x$) as a function of time $t$ when $y=0$ (object lands. You'll get a function of $\theta$. Find the $\theta$ that maximizes $x$ when $y=0$. You'll have two solutions (ignore the initial point $x=0$). $\endgroup$ Commented Jan 30, 2019 at 21:38
  • $\begingroup$ So, you're saying I should rewrite the the first equation in terms of time, which would give me the equations as a function of theta, assuming initial velocity is constant, right? After doing so, I'd try to maximize x while y is 0, meaning the object has landed again for any non-zero x, meaning the object has traversed x distance, and since I'm maximizing x I'm finding the greatest amount of distance covered through angle theta but not the minimum amount of time. I feel like my last conclusion may be faulty, however. I'd love to hear your input. $\endgroup$
    – Valz
    Commented Jan 30, 2019 at 21:59
  • $\begingroup$ Is $v$ a constant? Also, is the starting position at the ground level or is it a variable? $\endgroup$
    – Andrei
    Commented Jan 31, 2019 at 3:23
  • $\begingroup$ What kind of β€œdistance” are you trying to cover? If the goal is to be at distance $R$ (in any direction) from the starting point, and there is no ground to stop the projectile, then you minimize time by shooting straight down. If the idea is to reach a point at the same height but distance $R$ horizontally, there are only two angles that will hit that point at all, and the shallower angle will be faster. $\endgroup$
    – David K
    Commented Jan 31, 2019 at 4:34
  • $\begingroup$ @Andrei I edited the post to clarify and answer your questions. The staring position is variable and v is indeed a constant. $\endgroup$
    – Valz
    Commented Jan 31, 2019 at 11:26

2 Answers 2


If the goal is to cover the optimal distance in a given minimum time, then yes... shoot the projectile horizontally. But that makes no physical sense... why would you care about that? If on level ground, that would mean shooting the projectile horizontally and it stops immediately (hitting the ground).

Presumably you want to get the maximum distance or range.

Here are graphs of a projectile leaving a cliff with the same initial speed but at different angles. Note especially that the (red) horizontal trajectory does NOT yield the greatest range. That is because even though it has the highest horizontal speed, it does not stay aloft as long as some other projectiles.

enter image description here

  • $\begingroup$ The problem has nothing whatsoever to do with rolling. Who said that the ground is frictionless?? It makes the whole problem meaningless, and vertical motion irrelevant. Ugh!!! (P.S. I was a Professor of Physics for many many years and taught this material until I could do it in my sleep.) $\endgroup$ Commented Jan 31, 2019 at 0:26

Does this require a Lagrangian (or any calculus)?

The greater the horizontal component of motion the better.

If we are firing off of a cliff, then $\theta = 0.$

If we are firing over level ground, then we need to find the minimal angle to cover the distance.

There is some time $t^*$ such that $y(t^*) = y(0) = 0$

$0 = t^*(v\sin\theta - \frac 12 gt^*)\\ t^* = \frac {2v\sin\theta}{g}$

$x(t^*) = \frac {2v^2\sin\theta\cos\theta}{g} = d\\ \sin2\theta = \frac {dg}{v^2}\\ \theta = \frac 12\arcsin(\frac {dg}{v^2})$

Update: since there seems to be some confusion with the "firing off a cliff."

enter image description here

The shot fired horizontally will cover more horizontal distance in the same amount of time, then a shot with the same initial velocity but different angle of trajectory.

  • $\begingroup$ Firstly, thank you for your explanation, although I don't quite understand what you've done. The reason why I thought calculus and Lagrange were necessary is due to this paper I found online $\endgroup$
    – Valz
    Commented Jan 30, 2019 at 21:57
  • $\begingroup$ "The greater the initial horizontal motion the better." False. If the projectile is pointed horizontally (to get the greatest horizontal velocity) it will have the minimum vertical velocity, and hence hit the ground immediately... zero range (for a ground launching). Even when sent from a cliff, you will trade initial velocity for vertical velocity (and hence longer flight time... and hence greater range). $\endgroup$ Commented Jan 30, 2019 at 22:04
  • $\begingroup$ @DavidG.Stork If you fire off of a cliff, you do not "trade" horizontal velocity for vertical velocity. The vertical component is independent from the horizontal component. The total velocity might be increasing, but that is irrelevant. And most of my answer covers the "ground launch." $\endgroup$
    – Doug M
    Commented Jan 30, 2019 at 22:21
  • $\begingroup$ To maximize horizontal velocity, you'd have to sacrifice vertical velocity by firing the projectile horizontally, i.e (ΞΈ = 0). This has the express effect of making the vertical component of velocity 0 initially, but due to acceleration via gravity, the vertical component becomes negative. That's what I understand from @DavidG.Stork 's explanation. $\endgroup$
    – Valz
    Commented Jan 30, 2019 at 22:35
  • $\begingroup$ @Valz if you are firing off a cliff, the vertical component can be negative. $\endgroup$
    – Doug M
    Commented Jan 30, 2019 at 22:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .