# How to analytically solve this equation with trigonometric function

The equation containing trigonometric function is:

R == Sqrt[(i1-Sin[t])^2 + j1^2 + (k1-Cos[t])^2]*Sqrt[(i2-Sin[t])^2 + j2^2 + (k2-Cos[t])^2]*c/Sqrt[(Sqrt[(i1-Sin[t])^2 + j1^2 + (k1-Cos[t])^2]+Sqrt[(i2-Sin[t])^2 + j2^2 + (k2-Cos[t])^2]+c)*(-Sqrt[(i1-Sin[t])^2 + j1^2 + (k1-Cos[t])^2]+Sqrt[(i2-Sin[t])^2 + j2^2 + (k2-Cos[t])^2]+c)*(Sqrt[(i1-Sin[t])^2 + j1^2 + (k1-Cos[t])^2]-Sqrt[(i2-Sin[t])^2 + j2^2 + (k2-Cos[t])^2]+c)*(Sqrt[(i1-Sin[t])^2 + j1^2 + (k1-Cos[t])^2]+Sqrt[(i2-Sin[t])^2 + j2^2 + (k2-Cos[t])^2]-c)]


The t falls in range of (0,Pi/2). I want to solve t. How to make it?

This equation is too complicated and my computer could solve it for a long time?

• Use the Weierstrass substitution (with suitable parameter restrictions) to convert it to a purely algebraic problem. Aug 10, 2017 at 11:20
• Maybe also square both sides, but then you'll have to check which solutions are spurious. One might quickly eliminate some by numerically substituting sample values for the parameters. Checking probably is what is taking so long, and that's where @J.M.'s suggestion about parameter restrictions would be helpful. Aug 10, 2017 at 11:44

eq1 = R == Sqrt[(i1 - Sin[t])^2 + j1^2 + (k1 - Cos[t])^2]*
Sqrt[(i2 - Sin[t])^2 + j2^2 + (k2 - Cos[t])^2]*
c/Sqrt[(Sqrt[(i1 - Sin[t])^2 + j1^2 + (k1 - Cos[t])^2] +
Sqrt[(i2 - Sin[t])^2 + j2^2 + (k2 - Cos[t])^2] +
c)*(-Sqrt[(i1 - Sin[t])^2 + j1^2 + (k1 - Cos[t])^2] +
Sqrt[(i2 - Sin[t])^2 + j2^2 + (k2 - Cos[t])^2] +
c)*(Sqrt[(i1 - Sin[t])^2 + j1^2 + (k1 - Cos[t])^2] -
Sqrt[(i2 - Sin[t])^2 + j2^2 + (k2 - Cos[t])^2] +
c)*(Sqrt[(i1 - Sin[t])^2 + j1^2 + (k1 - Cos[t])^2] +
Sqrt[(i2 - Sin[t])^2 + j2^2 + (k2 - Cos[t])^2] - c)];


Let us transform it as follows:

eq2 = eq1 /. Sin[t] -> Sqrt[1 - Cos[t]^2] /. Cos[t] -> x


That gives a rather long expression. For this reason I do not write it here. It is in terms of x=Cos[t]. If we get x, we can then calculate arccos(x), provided -1<x<1. OK, let us solve it:

Solve[eq2, x]


It is solved exactly in somewhat about 10 min, but the result is a huge analytic expression, such that one can hardly make use of it.

Depending on the nature of the problem in such a situation I would look for some sort of a simplification of this equation.

Have fun!

• I tried you solution on my workstation. It do be a huge formulation. Thank you. I wonder if there is any way to accelerate Command Solve[]? (My workstation has a GPU Nvidia K80) Aug 11, 2017 at 5:13
• I do not think that you can do it considerably. Aug 11, 2017 at 6:34