1
$\begingroup$

I'm trying to get Mathematica to solve the following system, consisting of two identical equations, except that the variables z1, u1, u3 (in the first) and zz1, uu1, uu3 (in the second) represent different known numbers.

eq1 = z1 - 1/2*(u1 + s1 + Sqrt[s1^2 + u1^2 - 2*u1*s1*(Cos[s2 - u3])]) == 0;
eq2 = zz1 - 1/2*(uu1 + s1 + Sqrt[s1^2 + uu1^2 - 2*uu1*s1*(Cos[s2 - uu3])]) == 0;
Reduce[{eq1, eq2}, {s1, s2}, Reals]

He has been running for about an hour without giving me answers. I solved it by hand and it can be reduced to a second degree equation in $ \cos (s_2) $, so the solutions actually exist.

Is there any error in my setting the problem in the code?

$\endgroup$
0

1 Answer 1

4
$\begingroup$

With a little help you can solve it.

First Eliminate s1

eq=Eliminate[{eq1,eq2},s1]
(*z1^2 (-uu1 + 2 zz1 - uu1 Cos[s2 - uu3]) +z1 (u1 uu1 - 2 u1 zz1 + 2 uu1 zz1 - 2 zz1^2 +u1 uu1 Cos[s2 - uu3]) ==u1 zz1 (uu1 - zz1 + uu1 Cos[s2 - u3] - zz1 Cos[s2 - u3])*)

The unknown solution s2 of this equation has 2Pi periodic. Weierstrass substitution s2->2 ArcTan[us2] evaluates two solutions for s2

Solve[eq /. s2 -> 2 ArcTan[us2] // TrigExpand, us2] ;
ergs2 = Map[s2 -> # &, 2 ArcTan[us2] /. %]
(*{s2->…,s2->…}*)
$\endgroup$
2
  • 1
    $\begingroup$ Thank you! What's the idea behind this particular substitution used? $\endgroup$
    – Nameless
    Nov 10, 2020 at 19:37
  • $\begingroup$ The Weierstrass substitution transforms Cos[], Sin[],... into rational expressions, solution becomes easier . $\endgroup$ Nov 10, 2020 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.