Phase shift/ cosine within Differential equation (Oscillation).

For instance consider one arbitrary solution of a Differential equation:

$$x_1 = {C_1}'\,e^{-\gamma\,t + i\,\omega\,t} + {C_2}'\,e^{-\gamma\,t-i\,\omega\,t}$$

$$\left[\textsf{this is the Solution of \ddot{x}_1(t)+ 2\,\gamma\,\dot{x}_1(t)+{w_0}^2\,x_1(t) = 0 where \omega = \sqrt{{w_0}^2-\gamma^2}}\right]$$

I took it for granted you can only rewrite it like:

\begin{align}&x_1 = ({C_1}'+{C_2}')\,\cos(\omega\,t) + i\,({C_1}'-{C_2}')\,\sin(\omega\,t) \\[12pt] &x_1= C_1\,\cos(\omega\,t)+C_2\sin(\omega\,t)\end{align}

Apparently it is possible to write instead $$x_1 = B_1\,\cos(\omega\,t+\varphi)$$

Is this due to some kind of addition theorems? I'm really bad at those, so don't right see the connection. The reason being I've seen this often recently I need some clarification.

Edit

Actually I found an attempt to the problem in my tattered documents:

Write $$C_1 = c\,e^{i\,\varphi}$$ and $$C_2 = c\,e^{-i\,\varphi}$$ (complex constant in polar form)

Hence the solution becomes: \begin{align} &x_1 = c\,e^{i\,\varphi}\,e^{-\gamma\,t + i\,\omega\,t} + c\,e^{-i\,\varphi}\,e^{-\gamma\,t-i\,\omega\,t} \\\\ &x_1 = c\,e^{-\gamma\,t}\,\left(\,e^{i\,(\varphi+\omega\,t)}+\,e^{-i\,(\varphi+\omega\,t)}\right) \\\\ &\text{importantly: \cos(x) = \dfrac{e^{i\,x}+e^{-i\,x}}{ 2}} \\\\ & \quad\Rightarrow \quad x_1 = 2\,c\,e^{-\gamma\,t}\,\cos(\varphi+\omega\,t) \\\\\\ &\text{Also 2\,c can be renamed to "B_1" e.g.} \end{align}

My only problem remaining is how $$C_1$$ and $$C_2$$ both have same magnitude $$c$$. So it seems to work only if $$C_1$$ and $$C_2$$ are complex conjugate.

• Do you remember the formula for $\cos(A+B)?$ Jun 1 at 0:54
• $\cos(A+B) = \cos(A)\,\cos(B)-\sin(A)\,\sin(B)$. There is no multiplication however?
– Leon
Jun 1 at 10:05

Hint: $$\varphi$$ is such that $$\cos\varphi =\frac{C_1}{\sqrt{C_1^2+C_2^2}},\\\sin\varphi=\frac{C_2}{\sqrt{C_1^2+C_2^2}}$$
When $$C_1,C_2$$ are real, there is a real $$\varphi.$$
For complex $$C_i,$$ there is a complex $$\varphi$$ unless $$C_1^2+C_2^2=0.$$