Scenario: Suppose there is a projectile traveling in two-dimensional space. It is currently at point $(p_x, p_y)$ and has velocity $(v_x, v_y)$. It can accelerate in any direction but the magnitude of its acceleration must be $m$.
Goal: I want to find out what acceleration $(a_x, a_y)$ will cause its trajectory to go through the origin.
Work so far: I have the following system of three equations, with three unknowns $a_x$, $a_y$, and $t$: $$\frac{1}{2}a_xt^2+v_xt+p_x=0$$ $$\frac{1}{2}a_yt^2+v_yt+p_y=0$$ $$a_x^2+a_y^2=m^2$$ The first two come from integrating each respective component of acceleration twice with respect to time and setting the result equal to 0. The last one is from the requirement that the magnitude of its acceleration be a constant $m$.
If I solve the third equation for $a_y$ in terms of $a_x$, I get:
$$a_y = \sqrt{m^2 - a_x^2}$$
If I solve the second equation for $t$ in terms of $a_y$, I get:
$$t = \frac{-v_y + \sqrt{v_y^2 - 2p_ya_y}}{a_y}$$
Composing these provides $t$ in terms of $a_x$:
$$t = \frac{-v_y + \sqrt{v_y^2 - 2p_y\sqrt{m^2-a_x^2}}}{\sqrt{m^2-a_x^2}}$$
I can then set this equal to the first equation solved for $t$ in terms of $a_x$:
$$\frac{-v_y + \sqrt{v_y^2 - 2p_y\sqrt{m^2-a_x^2}}}{\sqrt{m^2-a_x^2}} = \frac{-v_x + \sqrt{v_x^2 - 2p_xa_x}}{a_x}$$
And here I am stuck. I have one equation with unknown, $a_x$, but I cannot get any computer algebra system to solve for $a_x$. I can't proceed from here using this approach, but I can't think of any other way to approach the problem, either.
My question: Am I going in the right direction? Is there an easier way to solve it?