I have some problems with an optimization problem. I have many different constraints, the easiest one is for example:
-Cos[x1]^4 + Cos[x1]^2 Sin[x1]^2 (Cos[x2]^2 - Sin[x2]^2 Sin[x3]^2 (Cos[x4]^2 + Cos[x5]^2 Sin[x4]^2)) + Sin[x1]^4 (-Cos[x2]^4 + Cos[x2]^2 Sin[x2]^2 (Cos[x3]^2 - 1/8 (6 + 10 Cos[2 x4] + Cos[2 (x4 - x5)] - 2 Cos[2 x5] + Cos[2 (x4 + x5)]) Sin[x3]^2) + Cos[x4]^2 Sin[x2]^4 Sin[x3]^2 (Cos[x3]^2 + Sin[x3]^2 (-Cos[x4]^2 + Sin[x4]^2 Sin[x5]^2)) - Cos[x2] Cos[x4] Cos[ x6 - x7 + x8] Sin[x2]^3 Sin[x3]^3 Sin[x4]^2 Sin[2 x5])==0
Since these constraints get more complicated, mathematica is not able to solve it anymore (even numerically). Therefore I want to try to approximate the constraints first.
But I'm not sure how. The variables go all from 0 to Pi.
Got anyone an idea how to interpolate functions like that?
explicit and implicit equation
simplifying the equation
Consider that reformulating an Euler angle problem (3 variables) as a quaternion problem (4 variables) or a rotation matrix problem (9 variables) often makes it easier to solve, especially with computer assistance. Yes, you wind up with more equations, but plain algebraic equations are much more tractable than trig functions.
By "substitute", I mean what Replace does.
thanks for your answer!
If I would subsitute alls Cos[xi] with cxi and Sin[xi] with sxi I would get many more variables and they would also be correlated somehow? Or did you mean something else?
I will try using "TrigExpand".
What do you mean be "substitute"? What exactly?
It would help to know more about the problem. It's often better to formulate a problem like this in a rectangular Cartesian fashion rather than in angles as you've done it. So Cos[x1]->cx1, etc. Starting with your formula, use TrigExpand to expand the functions of sums, then substitute. The result is more complicated, but at least it's algebraic, with no special functions. Mathematica is very good at algebra.