Message Boards Message Boards

0
|
7092 Views
|
5 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Interpolation of functions

Posted 9 years ago

Hey guys,

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?

Best Michael

POSTED BY: Michael S
5 Replies

explicit and implicit equation enter image description here

POSTED BY: Simon Cadrin

simplifying the equationenter image description here

POSTED BY: Simon Cadrin

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.

POSTED BY: John Doty
Posted 9 years ago

Hi,

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".

Edit: What do you mean be "substitute"? What exactly?

Best Michael

POSTED BY: Michael S

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.

POSTED BY: John Doty
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract