A particle in the plane has initial position $P$ and initial velocity $V$. It can accelerate at exactly rate $A$ in any direction $\theta$. What path describes the time-optimal trajectory to a target point, $G$?

My intuition leads me to believe there is a single value of $\theta$ that if the particle accelerates in that direction, will lead it on the minimal-time trajectory to $G$. If that intuition is true, the optimal value for $\theta$ can be formulated by solving the system of equations:

$$ G_x = P_x + V_x t + \frac{cos(\theta) A t^2}{2} $$

$$ G_y = P_y + V_y t + \frac{sin(\theta) A t^2}{2} $$

When I try to solve these on a whiteboard, I quickly wind up in a mess of quartic craziness, and I suspect some vector notation could help clarify the situation.

Is my intuition true regarding the time-optimal path? And, if so, what is the solution for $\theta$ in terms of the initial conditions?

  • $\begingroup$ Here's a tutorial and reference for typesetting math on this site. $\endgroup$
    – joriki
    Mar 31, 2020 at 4:17
  • $\begingroup$ The fact that this is in two dimensions isn't mentioned in the body of the question. $\endgroup$
    – joriki
    Mar 31, 2020 at 4:18
  • $\begingroup$ Shouldn't the rate of acceleration $A$ appear in the quadratic terms in the equations? $\endgroup$
    – joriki
    Mar 31, 2020 at 4:24
  • $\begingroup$ Addressed your comments $\endgroup$
    – GrantS
    Mar 31, 2020 at 4:47

1 Answer 1


I’ll write the equations as

$$ \vec s+t\vec v+\frac12at^2\vec n_\theta=0\;, $$

where $\vec s=\vec p-\vec g$ and $\vec n_\theta=(\cos\theta,\sin\theta)$ is the unit vector at angle $\theta$ with the positive $x$ axis.

This isn’t really an optimization problem. There are only discrete values of $\theta$ for which the target is reached at all. To find them, multiply the equation with $\vec u_\theta=\vec n_{\theta+\frac\pi2}$, a direction vector orthogonal to $\vec n_\theta$:

$$ \vec s\cdot\vec u_\theta+t\vec v\cdot\vec u_\theta=0 $$

and thus

$$ t=-\frac{\vec s\cdot\vec u_\theta}{\vec v\cdot\vec u_\theta}\;. $$

Multiplying the original equation by $\vec n_\theta$, substituting $t$ from above and multiplying by $\vec v\cdot\vec u_\theta$ yields

$$ \left(\vec v\cdot\vec u_\theta\right)\left(\vec s\cdot\vec n_\theta\right)-\left(\vec v\cdot\vec n_\theta\right)\left(\vec s\cdot\vec u_\theta\right)+\frac12a\frac{\left(\vec s\cdot\vec u_\theta\right)^2}{\vec v\cdot\vec u_\theta}=0\;. $$

If the first two terms are written out in terms of the trigonometric functions, half the terms cancel and the other half can be combined using $\cos^2+\sin^2=1$. Then multiplying by $\vec v\cdot\vec u_\theta$ again yields

$$ (v_ys_x-v_xs_y)\left(\vec v\cdot\vec u_\theta\right)+\frac12a\left(\vec s\cdot\vec u_\theta\right)^2=0\;. $$

This is a trigonometric equation in $\theta$. You can turn it into a quartic algebraic equation either by writing it as an equation in $\mathrm e^{\mathrm i\theta}$ or by using $\sin^2=1-\cos^2$, bringing the terms proportional to $\sin\theta$ to one side, squaring and using $\sin^2=1-\cos^2$ again to obtain a quartic equation in $\cos\theta$. (The squaring introduces spurious solutions that you need to discard.) The solutions for which $t$ (as found above) is positive are the only values of $\theta$ for which the target is reached at all. If there is more than one such solution, the optimization consists merely in comparing the corresponding $t$ values. I suspect there will always be one solution for positive $t$ and one for negative $t$, but I’m not sure about that.

  • $\begingroup$ Thank you for simplifying the math with the vector notation. The optimization part of the problem, I think, involves proving that the path followed by picking the single value of $\theta$ that hits the target is the time-optimal path. In other words, is there a shorter path that involves changing the direction of acceleration while traveling? If not, why? Intuitively, I believe the single-acceleration-vector solution is time-optimal, but I don't know how to prove it. $\endgroup$
    – GrantS
    Mar 31, 2020 at 16:21

You must log in to answer this question.

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