4
$\begingroup$

This is a standard trigonometric identity that can be easily verified:

$a\cos (x) + b\sin (x) = \sqrt{a^2+b^2}\cos (x - p),\text{ where }\tan(p)=\frac ba.$

So for example,

$\sqrt2\cos(1)-\sqrt2\sin(1)=-0.43=2\cos(1-p_1),\text{ where }\tan(p_1)=-1,$

and

$-\sqrt2\cos(1)+\sqrt2\sin(1)=0.43=2\cos(1-p_2),\text{ where }\tan(p_2)=-1.$

My question is, why is is that $p_1$ is the principal value of $\arctan (-1) = -0.79$ radians, whereas for $p_2$, I have to add $\pi$ to the principal value so as to get the positive angle $2.36$ radians?

I.e. How could I have deduced that $p_1$ lies in the $4^\text{th}$ quadrant and that $p_2$ lies in the $2^\text{nd}$ quadrant??

  • 0
    @MichaelHardy Thank you so much for the valuable tip.2012-09-21

1 Answers 1

3

If we use the trigonometric identity $\cos(s-t)=\cos s\cos t+\sin s \sin t$, we can see that $p$ is any number (angle) whose sine is $\dfrac{b}{\sqrt{a^2+b^2}}$ and whose cosine is $\dfrac{a}{\sqrt{a^2+b^2}}$.

So in your first example, we want $p_1$ such that $\sin(p_1)=-1$ and $\cos(p_1)=1$. This happens to be $\arctan(-1)$.

In your second example, we want $\sin(p_2)=1$ and $\cos(p_2)=-1$. The same tangent as in the previous case, but definitely not given by $\arctan(-1)$.

If one remembers that it is not merely $\tan$ that needs to be matched, but both $\sin$ and $\cos$, the difficulty disappears.

Remark: Because this is a common issue, many computer languages have a built in function, often called something like atan2, which given an ordered pair of $(u,v)$ of numbers, produces an angle whose cosine is $u$ and whose sine is $v$. For each implementation, one has to check the details, because the syntax is not standard, sometimes the roles of $u$ and $v$ are reversed.

  • 0
    Thank you for your clear, direct, and comprehensive answer! I really needed this piece of trigo revision. :)2012-09-20