1

This seems really easy and I'm probably just messing up on the syntax somewhere (I'm pretty new to Mathematica and I did pour through the Solve page trying to find an answer). I'm basically interested in the intersection points of a parametric equation with a plane at $z=.49$. Furthermore, my parametric equation can undergo a rotation, so I would like the intersection coordinates ($x,y,z$) as a function of rotation angle $\theta$.

Easy enough, so I have my parametric equation and I dot it into my rotation matrix and set it equal to $(x,y,.49)$. My question is what am I doing wrong on the syntax since it doesn't realize I'm setting $\phi$ in the range of $0,2\pi$.

    Solve[{Sin[ϕ], Cos[ϕ], 0.5}.{{Cos[θ], 0, -Sin[θ]}, {0, 1, 
 0}, {Sin[θ], 0, Cos[θ]}} == {x, y, 0.49}, {ϕ, 0, 2 π}, {x, y}]

Once again easy syntax question, but I can't figure it out. Thanks!

LCarvalho
  • 9,233
  • 4
  • 40
  • 96
Josh
  • 545
  • 2
  • 13
  • 2
    Does Solve[{Sin[\[Phi]], Cos[\[Phi]], 0.5}.{{Cos[\[Theta]], 0, -Sin[\[Theta]]}, {0, 1, 0}, {Sin[\[Theta]], 0, Cos[\[Theta]]}} == {x, y, 0.49}, {x, y, \[Phi]}] give the desired result? – Daniel Lichtblau Mar 02 '18 at 23:39
  • @DanielLichtblau Yes I guess that would work since there would only be two $\phi$ conditions that would satisfy the set of equations. For some reason I didn't think about that. Thanks! – Josh Mar 03 '18 at 02:28

1 Answers1

3

It might be easier to employ the Weierstrass substitution first:

Solve[{2 u/(1 + u^2), (1 - u^2)/(1 + u^2), 1/2}.RotationMatrix[-θ, {0, 1, 0}] ==
      {x, y, 49/100}, {x, y, u}] // FullSimplify
   {{x -> -((49 Cot[θ])/100) + Csc[θ]/2,
     y -> 1/100 Sqrt[1349 + 4900 Cos[θ] - 6250 Cos[2 θ]] Csc[θ],
     u -> (Sqrt[1349 + 4900 Cos[θ] - 6250 Cos[2 θ]] - 100 Sin[θ])/(49 - 50 Cos[θ])},
    {x -> -((49 Cot[θ])/100) + Csc[θ]/2,
     y -> -(1/100) Sqrt[1349 + 4900 Cos[θ] - 6250 Cos[2 θ]] Csc[θ],
     u -> (Sqrt[1349 + 4900 Cos[θ] - 6250 Cos[2 θ]] + 100 Sin[θ])/(-49 + 50 Cos[θ])}}

To get expressions in terms of $\phi$, just undo the substitution:

2 ArcTan[u] /. %

which has the advantage of the results being guaranteed to be within $(-\pi,\pi)$; adjust accordingly to get results in $[0,2\pi)$ instead.

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574