For context, I am trying to solve a ballistics problem in 3D where I want to find the minimum launch velocity of a projectile to be able to hit a moving target. The details can be found here.
I thought about the problem for a while, and I managed to come up with a solution for the case where the acceleration is constant (there are no higher order derivatives of position than 2).
Here is my reasoning (all the variables are scalars which are individual x,y,z components of the movement vectors):
We want the final position of the projectile to be equal to that of the target. Therefore,
$$p_p+v_p t+0.5a_pt^2=p_t+v_tt+0.5a_tt^2$$ where the $_p$ subscript denotes the projectile, and $_t$ the target. The values in the equation are all at initial time = 0.
Define $p=p_p-p_t$, $v=v_p-v_t$, $a=a_p-a_t$. We have the equation $$p+vt+0.5at^2=0$$ In this equation, the initial velocity of the projectile and the time to reach the target are unknown. We solve for t: $$t=\frac{-v \pm \sqrt{v^2-2pa}}{a}$$ Since the velocity is minimum, there should only be 1 viable trajectory to reach the target (If the velocity is too high, there would be multiple trajectories to take with smaller or greater angles, but the minimum possible velocity would only have 1 launch angle). Therefore, we impose the constraint that $\Delta=v^2-2pa=0$. Hence, $$v=\sqrt{2pa}$$ and we can now solve for time. $$t=\frac{-v}{a}$$
However, now I would like to add jerk, and higher derivatives of position to the problem. This is where my method falls apart, since using the discriminants isn't feasible for higher degree polynomials such as $x+\dot{x}t+\frac{1}{2}\ddot{x}t^2+\frac{1}{6}\dddot{x}t^3+...+\frac{1}{n!}x^{(n)}t^n$ because it becomes extremely expensive to calculate in real-time very quickly.
I read about multiplicity of roots, and it seems that what I am doing here is exactly imposing that the multiplicity of the root should be equal to the degree. This implies that the equation is able to be reduced to the form $$k(t-t_1)^n=c$$ where $t_1$ is the time to reach the target, while $k$ and $c$ are some constants (I think $k=\frac{1}{n!}x^{(n)}(0)$ if I am not mistaken).
How can I generalize this process to higher degree polynomials without the use of discriminants? Or are there some other solutions this problem (analytical or numerical) that allow for real-time computation?