Determine the amplitude and phase shift of $f(x) = \sqrt{3} \cos2x-\sin2x$ Question:
Determine the amplitude and phase shift of $f(x) = \sqrt{3} \cos2x-\sin2x$
Attempted solution:
The amplitude can be calculated by:
$$A = \sqrt{(\sqrt{3})^2 + (-1)^2} = \sqrt{4} = 2$$
The sine and cosine of the phase shift then becomes
$$\sin \delta = \frac{\sqrt{3}}{2}, ~~~~~~~~ \cos \delta = -\frac{1}{2}$$
because the factor before cosine goes into the sine equation and vice versa.
The $\delta$ that fulfills these two criteria is $\frac{\pi}{3}$. In other words,
$A = 2$
$\delta = \frac{\pi}{3}$
However, the answer to the phase shift actually turns out to be $\frac{2\pi}{3}$. Where did I go wrong?
How does the factor in front of $x$ inside the sine and cosine functions affect this kind of calculations in the general case? It is clearly tempting to just multiply by 2 (in this case) because it produces the correct answer, but that is obviously not a mathematically sound approach.

$$\begin{align}\operatorname{arccos}{\frac{-1}{2}}&=\pi-\operatorname{arcos}{\frac{1}{2}}\\&=\frac{2\pi}{3}\end{align}$$
Edit One has $\sin(\pi-x)=\sin{x}$ and $\cos(\pi-x)=-\cos x$ ; solving
$$\begin{align} \cos{\delta}&=-\frac{1}{2}\\\sin{\delta}&=\frac{\sqrt{3}}{2}\end{align}$$
is therefore the same as solvant
$$\begin{align} \cos{(\pi-\delta)}&=\frac{1}{2}\\\sin{(\pi-\delta)}&=\frac{\sqrt{3}}{2}\end{align}$$
And this means $\pi-\delta=\frac{\pi}{3}$ whence $\delta=\frac{2\pi}{3}$
