How can I calculate the intercept direction of a constant accelerating missile? I'm simulating missiles in 3d space and want the missiles to intercept a target which has constant velocity.
Given the targets velocity is "u" a vector and the missiles acceleration rate is "a" a constant scalar
what is the formula to calculate the direction the missile should be facing to intercept the target.
I have tried using the quadratic formula but that only works on constant speed missiles, I tried to run it iteratively: calculate the intercept position find the average velocity the missiles will have to reach that point and give that as the new speed input but it didn't work, its possible I messed up the formula somewhere or maybe that's just not a proper way to calculate it.
I'm lost any help will be greatly appreciated.
 A: From your question

Given the targets velocity is "u" and the missiles acceleration rate is "a" what is the formula to calculate the direction the missile should be facing to intercept the target.

I infer that you are analyzing a simple problem of straight-line motion for both target and missile. This problem would be (much) more complicated to analyze if the missile would follow a trajectory in which it is always directed towards the target. That would be a form of a well-known radiodrome (pursuit curve) problem.

Since the target moves in a straight line, we can orient our coordinate system such that the target is moving along one of the axis. Let $\vec{r}_m(t)$ and $\vec{r}_t(t)$ be missile and target position at time $t$, where
$$\vec{r}_m(0) = \vec{0} \qquad \text{and} \qquad \vec{r}_t(t) = \vec{r}_t(0) + (v_t t) \hat{k} = x_0 \hat{\imath} + y_0 \hat{\jmath} + (z_0 + v_t t) \hat{k}$$
The problem is to find an angle for $\vec{r}_m$ vector such that the missile and the target meet at time $t_0$.
The distance of the missile and the target from the origin at time $t$ is
$$|\vec{r}_m(t)| = \frac{1}{2} a t^2 \quad \text{and} \quad |\vec{r}_t(t)| = \sqrt{x_0^2 + y_0^2 + (z_0 + v_t t)^2} = \sqrt{d_0^2 + (2 z_0 + v_t t) (v_t t)}$$
where it is assumed that the missile starts from rest, and $d_0^2 = x_0^2 + y_0^2 + z_0^2$ is the initial distance between the missile and the target.
At time $t = t_0$ the missile and the target meet, which means $\vec{r}_m(t_0) = \vec{r}_t(t_0)$ and
$$|\vec{r}_m(t_0)| = |\vec{r}_t(t_0)| \quad \rightarrow \quad \frac{a^2}{4} t_0^4 - v_t^2 t_0^2 - 2 z_0 v_t t_0 - d_0^2 = 0$$
Solve the above quartic equation to get $t_0$ and then find the three (or two) angles of the $\vec{r}_t(t_0)$ vector. The missile needs to be launched at exactly these angles.
