# Reducing sum of cosines

This might seem a silly question but I'm kind of lost here... I'm reading a physics book and stumbled upon a solved problem where they go from this expression:

$$z = 48.21cos(\beta t + 0.323) + 18.14cos(\beta t + 3.022)$$

To this:

$$z = 32.75cos(\beta t + 0.5625)$$

Pardon me, but... could anyone explain me how to pass from the first result to the second in the most straightforward/short/fast way possible? This is probably an easy question solved with Euler formulas or something but for some reason I don't make the connection.

Thanks!

## 2 Answers

Since this is tagged with complex-numbers, I can use phasors. Which is good. Consider the following two complex numbers: $z_1 = A_1 e^{i \delta_1}$ and $z_2 = A_2 e^{i \delta_2}$. When we add these two numbers together, we get another complex number $z = z_1 + z_2 \equiv A e^{i \delta}$. We can visualize this by drawing these numbers as vectors in the complex plane: We can see here that the angle opposite the side $A$ is $\pi - (\delta_2 - \delta_1)$, and so from the law of cosines we have $$A^2 = A_1^2 + A_2^2 - 2 A_1 A_2 \cos (\pi + \delta_1 - \delta_2) = A_1^2 + A_2^2 + 2 A_1 A_2 \cos (\delta_1 - \delta_2).$$ Once $A$ is calculated, you can then use the real (or imaginary) part of $z_1$ or $z_2$ to find the cosine (or sine) of $\delta$: $$\cos \delta = \frac{A_1 \cos \delta_1 + A_2 \cos \delta_2}{A}$$

And, just in case it's not obvious what all this has to do with your original equation, note that we have $$A_1 \cos (\beta t + \delta_1) + A_2 \cos (\beta t + \delta_2) = \Re \left( A_1 e^{i (\beta t + \delta_1)} + A_2 e^{i (\beta t + \delta_2)} \right) = \Re \left( A e^{i (\beta t + \delta)} \right) = A \cos(\beta t + \delta).$$ So by viewing the cosines as the real part of two complex numbers $z_1$ and $z_2$, adding them together, and taking the real part of the result, we get an equivalent expression.

• Thanks for the detailed proof, recalling phasors and how we neglect frequencies with them (same freq), I see now this is simply a phasor sum. Of course the whole relation is invalid if frequencies are not the same. Have a virtual beer! – Yannick Sep 15 '16 at 20:27

If you expand the first expression by using addition formulas, you get: $$z=A\cos\beta t-B\sin\beta t=\sqrt{A^2+B^2}\cos(\beta t+\alpha),$$ where $A$ and $B$ are two numbers and $\cos\alpha=A/\sqrt{A^2+B^2}$, $\sin\alpha=B/\sqrt{A^2+B^2}$.

• Could you expand on the expansion? – DJohnM Sep 16 '16 at 1:43
• You just need this formula: $\cos(a+b)=\cos a\cos b-\sin a\sin b$. Use it to expand all the cosines in the first expression, then compute all sines and cosines whose argument is a number and collect terms in $\cos \beta t$ and $\sin \beta t$. You'll obtain then $A\cos\beta t-B\sin\beta t$, where $A$ and $B$ are some numbers. – Intelligenti pauca Sep 16 '16 at 6:52