Reputation: 117
I have a beautiful equation, where I am trying to compute for R2. I am using Mathematica. So far every single time that I have tried to use Solve[] or Reduce [] the computation takes forever. I hope You can help me what to do with this beauty in order to get a solution. Thank you! Below is my equation.
eq1 = (R2 + ((((p2x - R2*(vac2y + voby)) - (k1x +
vox ((vobx ((p2y + R2*(vac2x + vobx)) - k1y) +
voby (k1x - (p2x - R2*(vac2y + voby))))/(-voby*
vox + vobx*voy))))^2 + ((p2y +
R2*(vac2x + vobx)) - ((p2y + R2*(vac2x + vobx)) -
voby ((vox (k1y - (p2y + R2*(vac2x + vobx))) +
voy ((p2x - R2*(vac2y + voby)) - k1x))/(-voby*vox +
vobx*voy))))^2)^0.5))/
v2 == (R1 + (((k1x - (k1x +
vox ((vobx ((p2y + R2*(vac2x + vobx)) - k1y) +
voby (k1x - (p2x - R2*(vac2y + voby))))/(-voby*
vox + vobx*voy))))^2 + (k1y - ((p2y +
R2*(vac2x + vobx)) -
voby ((vox (k1y - (p2y + R2*(vac2x + vobx))) +
voy ((p2x - R2*(vac2y + voby)) - k1x))/(-voby*vox +
vobx*voy))))^2)^0.5))/v1
Upvotes: 2
Views: 290
Reputation: 6989
Your expression is of this form:
a + Sqrt[b + c R2 + d R2^2] == e R2 + Sqrt[f + g R2 + h R2^2]
Solve
readily returns four solutions.
Now just work out those parameters (a,b,c..
) in terms of your original parameters (vox,voy,..
,etc) and substitute into the Solve
result. (I suspect the result is too unwieldy to be of practical use though.)
Upvotes: 0
Reputation: 11
One thing I would note is that it is better to use ^(1/2) or Sqrt[] than ^0.5: Mathematica is very careful to distinguish between real numbers (with decimal points) and integers or rationals.
Even if you make that change, though, I fear the probability of getting a nice analytical solution is small. If you think about the ways you would rearrange the equation to get rid of the square roots, you would end up having to square twice so you will end up with a quartic equation. In principle that is analytically soluble, but only in special cases is the solution compact enough to be useful.
Upvotes: 1