1
$\begingroup$

In a previous question I asked about how to apply $\operatorname{arctan2}$ to:

If $\sin(\theta) = \frac{-1}{2}$ and $\cos(\theta) = \frac{\sqrt{3}}{2}$ which is found as: $\operatorname{arctan2}( \frac{\sqrt{3}}{2} , \frac{-1}{2}) \implies \theta = \frac{-\pi}{6}$ or $-30^\circ$

Now I am asked to find:

If $\sin(\phi)\sin(\theta) = 0.2$ and $\sin(\phi) \cos(\theta) = -0.3$ and $\sin(\phi) > 0$ then, what is $\theta$? Repeat for $\sin(\phi) < 0$

I am confused as what I should do with the $\sin(\phi)$.

  • 4
    The nice thing about two-argument arctangent is that $\arctan(cx,cy)=\arctan(x,y),\quad c > 0$...2011-09-24
  • 0
    so arctan = (arcsin(.2),arcsin(-.3))2011-09-24
  • 0
    and $\operatorname{arctan2}(cx,cy)=\operatorname{arctan2}(x,y)\pm\pi$ when $c<0$.2011-09-24
  • 0
    $\operatorname{arctan2}(\cos(\theta),\sin(\theta))=\theta+2k\pi$2011-09-24
  • 0
    @rob: Most implementations of two-argument arctangent I've seen restrict their output to the interval $(-\pi,\pi]$...2011-09-24
  • 0
    @J. M.: all I have seen do, but if $\theta=100\pi/3$...2011-09-24
  • 0
    @rob, presumably, only the sines and cosines are at disposal when two-argument arctangent is called into play, and indeed all possible results are congruent $\mod 2\pi$; it's just that there's a standardized output...2011-09-24
  • 0
    one function for $\operatorname{arctan2}$ is $$\begin{align} \operatorname{arctan2}(x,y)& =2\arctan\left(\frac{y}{x+\sqrt{x^2+y^2}}\right)\\&=2\arctan\left(\frac{-x+\sqrt{x^2+y^2}}{y}\right) \end{align}$$This yields the proper range.2011-09-24
  • 0
    @J. M.: that is why I had the $\theta+2k\pi$. I guess I could have said $\theta\pmod{2\pi}$, but that might be interpreted as being in $[0,2\pi)$.2011-09-24

1 Answers 1

1

Hint: You can divide out the $\sin \phi$ between the two equations, leaving just an equation for $\tan \theta$.

  • 0
    For the $\sin(\phi) < 0$ case however...2011-09-24
  • 0
    @J.M.: Why can't we get $\tan \theta=\frac{-2}{3}$ in either case, leading to $\theta \approx -.588 + k \pi$? If $\sin \phi > 0$, this gives $\theta \approx 2.554 +2k\pi$, while if $\sin \phi < 0, \theta \approx -.588 + 2k\pi$2011-09-24
  • 1
    What I had in mind was that he'd first have to write $\arctan(0.3,-0.2)$ before doing the other necessary manipulations, so he can't outright cancel the common factor of the coordinates...2011-09-25
  • 0
    @J.M.: Yes, the title did talk about arctan2, so the $\sin \phi$ can confuse the signs.2011-09-25