Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am trying to use Mathematica to Eliminate 3 following variable from 4 equations. Any clue or link to similar solved problem is highly appreciated:

eq = {
  Cos[θ] + Cos[ϕ] + Cos[ψ] == a,
  Sin[θ] + Sin[ϕ] + Sin[ψ] == b,
  Cos[2 θ] + Cos[2 ϕ] + Cos[2 ψ] == c,
  Sin[2 θ] + Sin[2 ϕ] + Sin[2 ψ] == d};
Eliminate[eq, {θ, ϕ, ψ}]
share|improve this question
    
If you get rid of the double angles first, it works fine. Try eq = TrigExpand @ {... –  wxffles Sep 3 at 0:37
    
Very nice n simple. Thanks a lot. –  Max Jasper Sep 3 at 0:52
2  
Solve can eliminate variables too, e.g. Solve[eq, {a, b, c, d}, {θ, ϕ, ψ}, InverseFunctions -> True] it is even smarter than Eliminate (read carefully this answer). This can be helpful as well. –  Artes Sep 3 at 1:37
    
@wxffles Why not post an answer? –  Mr.Wizard Sep 3 at 2:45
    
@Mr.Wizard Because I'm lazy and I already have more internet points than I can spend. But I found something interesting about the answer. Behold! –  wxffles Sep 3 at 3:28

1 Answer 1

up vote 12 down vote accepted

Removing the double angles (e.g. $\cos(2 \theta) = \cos^2(\theta) - \sin^2(\theta)$) with TrigExpand allows the elimination to be performed:

eq = TrigExpand @ {
  Cos[θ] + Cos[ϕ] + Cos[ψ] == a,
  Sin[θ] + Sin[ϕ] + Sin[ψ] == b,
  Cos[2 θ] + Cos[2 ϕ] + Cos[2 ψ] == c,
  Sin[2 θ] + Sin[2 ϕ] + Sin[2 ψ] == d};
Eliminate[eq, {θ, ϕ, ψ}]

$a^4+2 a^2 \left(b^2-c-2\right)+\left(b^2+c\right)^2+d^2=4 b (a d+b)$

Let us plot this implicit surface:

ListAnimate @ Table[ContourPlot3D[
  a^4 + 2 a^2 (-2 + b^2 - c) + (b^2 + c)^2 + d^2 == 4 b (b + a d),
  {a, -5, 5}, {b, -5, 5}, {c, -5, 5}], {d, -5, 5, 0.2}]

pipepass

share|improve this answer
    
Simply amazing. Thanks for enlightening clues and animation. –  Max Jasper Sep 3 at 6:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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