Suppose I have a second order differential equation
I can find the complementary solution $y_c$ by finding the roots of the characteristic equation.
Let those roots be $\lambda \pm\mu$
Thus $y_c(t) = C_1e^{t(\lambda + \mu)} + C_2e^{t(\lambda - \mu)}$ where $C_1$ and $C_2$ are real constants
I was taught that this simplifies to $y_c = e^{\lambda}(Acos(\mu t) + Bsin(\mu t))$
I do not understand how the complex part disappears.
$$y_c = C_1e^{t(\lambda + \mu)} + C_2e^{t(\lambda - \mu)} = e^{\lambda t}(C_1e^{\mu t} + C_2e^{-\mu t})$$
$$= e^{\lambda t}(C_1cos(\mu t) +C_1isin(\mu t)+C_2cos(-\mu t) + C_2isin(-\mu t))$$
Since $cos(\mu t) = cos(-\mu t)$ and $sin(\mu t) = -sin(\mu t)$
$$= e^{\lambda t}(C_1cos(\mu t) +C_1isin(\mu t)+C_2cos(-\mu t) + C_2isin(-\mu t))$$
$$= e^{\lambda t}((C_1 + C_2)cos(\mu t) + (C_1-C_2)isin(\mu t))$$
If we let $A = C_1 + C_2$ and $B = C_1 - C_2$ then $$= e^{\lambda t}(Acos(\mu t) + Bisin(\mu t))$$
Notice that there $i$ is still present in the equation. How is the complex part removed?
We should have $\lambda \pm i\mu$ and
$$y_c(t) = C_1e^{t(\lambda + i\mu)} + C_2e^{t(\lambda - i\mu)}$$
with $C_2 =\overline{C_1}$, since $y_c$ needs to be real, and with this set upwe can show that
$$y_c(t) = e^{\lambda}(A\cos(\mu t) + B\sin(\mu t))$$
indeed we have
$$y_c(t) = C_1e^{t(\lambda + i\mu)} + C_2e^{t(\lambda - i\mu)}=e^{\lambda t}\left(C_1e^{i\mu t} + C_2e^{- i\mu t}\right)=$$
and by $C_1=\frac{A+iB}2$ and $C_2=\frac{A-iB}2$
$$=e^{\lambda t}\left(A\frac{e^{i\mu t}+e^{-i\mu t}}2 + B\frac{e^{i\mu t}-e^{-i\mu t}}{2i}\right)=e^{\lambda}(A\cos(\mu t) + B\sin(\mu t))$$