# Confused about characteristic equation of a linear ODE

Reading the Wikipedia page on linear ODEs, I've stumbled upon something I don't understand. In the section Homogeneous equations with constant coefficients, it says the following:

If the coefficients $A_i$ of the differential equation are real, then real-valued solutions are generally preferable. Since non-real roots $z$ then come in conjugate pairs, so do their corresponding basis functions $x^ke^{zx}$, and the desired result is obtained by replacing each pair with their real-valued linear combinations $Re(y)$ and $Im(y$), where $y$ is one of the pair.

I mean, why can you do this, that is, replace a pair of conjugate basis functions with their real and imaginary parts? The article gives as an example the equation $y'' -4y +5y = 0$. The roots of the characteristic equation are $2+i$ and $2-i$. Therefore, any solution of the equation will be of the form $c_1 e^{(2+i)x} + c_2 e^{(2-i)x}$ with $c_1, c_2 \in \mathbb{C}$. So far, so good. Then, one takes the real and imaginary parts of $e^{(2+i)x}$, so that any solution of the differential equation will be a linear combination of them, that is, $y = a_1e^{2x}\cos x + a_2e^{2x}\sin x$, with $a_1, a_2 \in \mathbb{R}$.

I don't understand the last step. You have a pair of complex functions, wich are conjugates of each other (because the characteristic equation has real coefficients), that form a basis of the space of solutions of the equation. Then, you claim that you can instead take the real and imaginary parts of one of them (it doesn't matter which one, since they are conjugates), and they will form a basis. Why is this true?

-

Hint: it's simply a change of basis $[f,\bar f]\:\mapsto\: [\frac{1}2 (f-\bar f),\: \frac{1}2 (f+\bar f)]$

-
I guess that makes sense. If I understand correctly the idea is that you want a real space of solutions so you try to find a base made out of real functions, right? –  Javier Badia Feb 16 '12 at 1:37
Right.${}{}{}{}$ –  Gerry Myerson Feb 16 '12 at 2:51

Suppose the differential equation is $y'' = -y$. Then $t\mapsto e^{it}$ and $t\mapsto e^{-it}$ are linearly independent solutions. Suppose $$f(t) = a_1 e^{it} + a_2 e^{-it}$$ where $a_1$ and $a_2$ are complex numbers. Then $$f(t) = a_1 e^{it} + a_2 e^{-it} = (a_1+a_2)\cos t + i(a_1-a_2)\sin t = c_1 \cos t + c_2\sin t.$$

The coefficients $c_1$ and $c_2$ are real if $a_1+a_2$ is real and $a_1-a_2$ is a pure imaginary. That happens if and only if $a_1$ and $a_2$ are complex conjugates of each other.

We have $$c_1=a_1+a_2,$$ $$c_2 = i(a_1-a_2),$$ and $$a_1 = (c_1-ic_2)/2,$$ $$a_2 = (c_1+ic_2)/2.$$ So every linear combination of $e^{it}$ and $e^{-it}$ with complex coefficients is a linear combination of $\cos t$ and $\sin t$ with complex coefficients, and every linear combination of $\cos t$ and $\sin t$ with complex coefficients is a linear combination of $e^{it}$ and $e^{-it}$ with complex coefficients.

-