# A simple problem that occupies too much time

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?

## 1 Answer

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->…}*)

• Thank you! What's the idea behind this particular substitution used? Nov 10, 2020 at 19:37
• The Weierstrass substitution transforms Cos[], Sin[],... into rational expressions, solution becomes easier . Nov 10, 2020 at 19:41