Solving for point closest to origin given initial position, velocity and constant acceleration

calculusmultivariable-calculusphysicspolynomials

Suppose an object at time $t=0$ has position $(p_x, p_y, p_z)$, velocity $(v_x, v_y, v_z)$, and has a constant acceleration $(a_x, a_y, a_z)$.

Then it's velocity at time $t$ is of course:

$$v(t) = (v_x + a_xt, v_y + a_yt, v_z + a_zt)$$

Therefore, integrating, I think it's position at time $t$ is:

$$p(t) = (p_x + tv_x + {{a_xt^2}\over{2}}, p_y + tv_y + {{a_yt^2}\over{2}}, p_z + tv_z + {{a_zt^2}\over{2}})$$

(Right?)

I'd like to find the time t at which the object is closest to the origin.

I think this means finding $argmin_t \vert p(t) \vert$ which is the same as:

$$argmin_t \sqrt{(p_x + tv_x + {{a_xt^2}\over{2}})^2 + (p_y + tv_y + {{a_yt^2}\over{2}})^2 + (p_z + tv_z + {{a_zt^2}\over{2}})^2}$$

Is that right? How would I go about solving that? It seems to involve minimizing the square root of a quartic polynomial. Or have I taken a wrong turn?

Best Answer

Using vectors, we have:

Initial position is $\mathbf{p_0}$, initial velocity is $\mathbf{v_0}$, and the constant acceleration is $\mathbf{a}$, then the position is

$\mathbf{p}(t) = \mathbf{p_0} + \mathbf{v_0} t + \frac{1}{2} \mathbf{a} t^2 $

And you want to solve for $t$ that has $\mathbf{p}(t)^T \mathbf{p} (t)$ minimum.

The time derivative of $\mathbf{p}(t)^T \mathbf{p}(t) $ is

$ 2 \mathbf{p}(t) \cdot \mathbf{ \dot{p} } (t) $

Setting this equal to zero will give us $t$, so we want to solve for $ t$ the expression,

$ (\mathbf{p_0} + \mathbf{v_0} t + \frac{1}{2} \mathbf{a} t^2 )\cdot (\mathbf{v_0} + \mathbf{a} t ) = 0 $

This is a cubic equation in $t$, which has a closed-form solution, in terms of the coefficients of $t^3 , t^2, t, 1$ , or you could solve it numerically using a root finding method, such as bisection, or Newton-Raphson method.

Related Question