$$ X = \frac{2VA}{J} + \frac{A^3}{J^2} + \frac{D^3}{Q^2} $$ $$ \frac{D^2}{Q} = V + \frac{A^2}{J} $$
I have two equation two unknowns that I ultimately need to solve. The two unknowns are $A$ and $D$, assume all other variables are known. I am looking for a solution that is $A = f(X,V,J,Q)$ or $D = f(X,V,J,Q)$.
To help you get to the solution that I am looking for, I will add more information.
- X,V, J, and Q will be user define to help us build a trajectory. Therefore, the solution should be in terms of X,V, J and Q.
- Solution is able to execute in one pass. No loop, no recursion.
- Numerical approximation is allowed only if the solution is in terms of X,V, J and Q. Approximation should be correct up to at least 5 decimal place. a. Example: A is approximately $120.000000589$ when X,V, J and Q values are plugged in however the correct solution is $120$.
What method are there to solve for variables inside rational root. I tried to solve for $D$, $D = \sqrt{Q(V+\frac{A^2}{J})}$, but then it becomes hard to solve for $A$.
I tried Wolfram and the solution returned the form Root[#1^6 + #1^2 &, 1]. My understanding is that if I plugged 1 into (#1), I can get a possible answer. I tried to plug in all 6 roots and all of them are incorrect with my check case.
My Wolfram code:

If it will help, X, V, J, and Q should all be $> 0$. I do not have access to Matlab.
i would compute $D$ from the second equation: $$D=\pm\sqrt{VQ+\frac{A^2Q}{J}}$$ and plug this in the first equation.Then we get $$XQ^2-2\frac{VAQ^2}{J}-\frac{A^3Q}{J^2}=\left(VQ+\frac{A^2Q}{J}\right)^{3/2}$$ now you can square this equation and then you will get a polynomial in $A$ Simplifying we get $$-\frac{Q^2 \left(A^6 J Q-A^6+3 A^4 J^2 Q V-4 A^4 J Q V+2 A^3 J^2 Q X+3 A^2 J^3 Q V^2-4 A^2 J^2 Q^2 V^2+4 A J^3 Q^2 V X-J^4 Q^2 X^2+J^4 Q V^3\right)}{J^4}=0$$