# Two different sets of independent solutions for ODE

The general solution of the following equation

$$\frac{d^2}{dx^2}f(x) + af(x) = 0$$

(with $f: \mathbb{R} \to \mathbb{R}, a \in \mathbb{R^+}$) may be in two forms. Let's consider the characteristic equation

$$m^2 + a = 0$$

and its roots $m_{1,2} = \pm i \sqrt{a} = \pm il$.

1. First form, using the set of independent solutions $e^{i l x}, e^{-i l x}$:

$$f(x) = Ae^{i l x} + Be^{-i l x}$$

1. Second form, using the set of independent solutions $\cos(lx), \sin(lx)$:

$$f(x) = C \cos(lx) + D \sin(lx)$$

This second set of independent solutions $\cos(lx), \sin(lx)$ has been obtained by the first set with (respectively) $A = B = 1/2$ and $A = -i/2, B = i/2$. So, two different linear combinations of the solutions of the first set gave a new set of two independent solutions.

My questions are:

• $e^{i l x}, e^{-i l x}$ has been found following an ordinary procedure with differential equations. But how is it possible that from a real differential equation some complex solutions arise?
• How is it possible that two different sets of linearly independent solutions exist? Does any other set exist for this equation?
• Are those sets always interchangeable or not? I mean, in geometric problems sometimes the equation used to determine a length is $x^2 = 1$, but only the $x = 1$ solution is acceptable as a result, $x = -1$ is not valid ans should be discarded. Does such a kind of situation happen with the above differential equation and these two sets of solutions too?

1. A real number is a special case of a complex number, thus, a real equation is a special case of a complex one. If you accept that the real equation $x^2+1=0$ has the complex solution $x=\pm i$ then it should not be a problem to accept that a real differential equation may have complex solutions.
2. The two sets of linearly independent solutions are not really very different since $$e^{ilx}=\cos(lx)+i\sin(lx),\quad e^{-ilx}=\cos(lx)-i\sin(lx),$$ that is the exponentials are linear combinations of $\sin$ and $\cos$ and vice versa. Of course, there exist many other linear combinations that produce linearly independent solutions, but they are not that nice looking as those above.
3. There is no special preferences to accept one solution or another in general, but in some applications it may be interesting to look only at real solutions. Then it is better to use the second form since it is easy to get all real solutions by simply taking $C$ and $D$ to be real numbers.