Simplifiying $A \cos(x-\phi)$ I have to proof that we can transform this expression : $$a \cos x + b \sin x$$
to this one :  $$A \cos (x-\phi)$$
Indeed, I can do the reverse path using the formula of $\cos(x-y)= \cos x \cos y + \sin x \sin y$
but I get stuck on the initial path.
Which trig formula should I use?
Thanks
 A: You have
\begin{align*}
A\cos(x-\phi)&=A\cos x\cos \phi+A\sin x\sin \phi\\
&=(A\cos \phi)\cos x+(A\sin \phi)\sin x\\
&=a\cdot \cos x+ b\cdot \sin x
\end{align*}
where $a=A\cos \phi$ and $b=A\sin \phi$
Now, let us try to solve the equations
$$a=A\cos \phi\\ b=A\sin \phi$$
Squaring the equations and adding them, we get
$$a^2+b^2=A^2\cos^2\phi+A^2\sin^2\phi=A^2\left(\cos^2\phi+\sin^2\phi\right)=A^2$$
which gives
$$A=\sqrt{a^2+b^2}$$
Put this back into the first equation and see that
$$a=\sqrt{a^2+b^2}\cos \phi$$
which means
$$\phi=\cos^{-1}\frac a {\sqrt{a^2+b^2}}$$
So, we have proved that given the expression
$$a\cos x+b\sin x$$
we can write it as
$$\sqrt{a^2+b^2}\cos\left(x-\cos^{-1}\frac a {\sqrt{a^2+b^2}}\right)$$
which gives you the required form.
A: Starting with
$$a \cos x + b \sin x
$$
$$
\Longrightarrow a\cdot \frac{e^{ix}+e^{-ix}}{2} + b\cdot \frac{e^{ix}-e^{-ix}}{2i}
$$
$$\Longrightarrow \frac{e^{ix}(2ia+2b) -e^{-ix}(-2ia+2b)}{4i}$$
$$\Longrightarrow \frac{Me^{ix}e^{\theta} -Me^{-ix}e^{-\theta}}{4i}$$
where $M=\sqrt{4a^2+4b^2}$ , $\theta=\tan^{-1}(\frac{a}{b})$ then
$$\Longrightarrow\frac{M\sin(x+\theta)}{2}$$
It can be seen as
$$\Longrightarrow A\cos(x-\phi)$$
where $A=\frac{M}{2}$ and  $\phi=-\theta+\pi$
A: You can proceed with your initial path as follows
$$a\cos x +b\sin  x$$
Multiply and divide by $\displaystyle\frac{1}{\sqrt{a^2+b^2}}$
$$\sqrt{a^2+b^2}(\frac{a}{\sqrt{a^2+b^2}}\cos x +\frac{b}{\sqrt{a^2+b^2}}\sin  x)$$
Now $(\frac{a}{\sqrt{a^2+b^2}})^2+(\frac{b}{\sqrt{a^2+b^2}})^2=1$ and both terms are less than $1$
Therefore if we let one as $\cos \phi $ other can be let us $\sin \phi$
Therefore we have
$$\sqrt{a^2+b^2}(\cos\phi\cos x + \sin\phi\sin x)$$
$$A\cos (\phi-x)$$
Thus there exists two reals $A=\sqrt{a^2+b^2}$ and $\phi= \cos^{-1}(\frac{a}{\sqrt{a^2+b^2}})$ for which $a\cos x +b\sin  x$ is identically equal to $A\cos (\phi-x)$
