Show that $$y = A_1e^{ix} + A_2e^{-ix}$$ can be written as $$y = A\cos(x - \delta)$$ where A and $\delta$ are real.
So far I have done the following: $$y = (A+B)\cos(x) + (A-B) i\sin(x)$$
Am I on the right track? I can't seem to figure out where to go next.
Hint
Since $$ A_1e^{ix} + A_2e^{-ix}= A\cos(x - \delta)$$ must hold for any $x$, write it for $x=0$ and $x=\frac \pi 2$. This gives $$A_1+A_2=A \cos (\delta )$$ $$i(A_1-A_2)=A \sin (\delta )$$ Start squaring both equations and add them; this could give $A$. Make the ratio to get $\tan(\delta )$.