Given this Sturm-Liouville problem: $$X'' + \lambda X = 0$$
There are general solutions (Eigenfunctions) for three cases on $\lambda$: $$\lambda > 0$$ Has the characteristic equation: $r^2+\lambda = 0$ with roots $r_1 = i \sqrt{\lambda}, r_2 = -i \sqrt{\lambda}$, inserting them into the derivative eigenfunction $e^{rx}$ results into: $$X(x) = c_1 e^{i \sqrt{\lambda}x} = c_1cos\sqrt{\lambda}x + c_2 sin \sqrt{\lambda}x$$
For the case: $$\lambda < 0 $$ $$X(x) = c_1 e^{\sqrt{\lambda}x} + c_2 e^{-\sqrt{\lambda}x}$$
Finally, for case $\lambda = 0$ the characteristic equation is $r^2 = 0$, thus $r=0$ and: $$X(x) = ce^{r x} = c$$
However the solution for this case is known to be: $$X(x) = c_1 x + c_2$$
What is the error I am making?
$$ X^{''} + \lambda X\tag{1} $$
In addition, it is simpler to just call the second one hyperbolics. If $\lambda < 0$
$$ r = \pm \sqrt{ -\lambda} \\ \lambda = -s \tag{2}$$
$$ X^{''} = sX \tag{3}$$ $$ X(x) = c_{1}e^{\sqrt{s}x} + c_{2}e^{-\sqrt{s}x} \tag{4}$$
which gives us hyperbolics
$$ X(x) = c_{3}\cosh(\sqrt{s}x) +c_{4} \sinh(\sqrt{s}x) \tag{5} $$
in case $3$ we have to integrate
$$ X^{''} = 0\cdot X \\ X^{''} = 0 \tag{6} $$
integrate as usual
$$ X^{'} = \int 0 dx = c_{1} \tag{7} $$
now integrate again
$$ \int X^{'} = \int c_{1} dx \implies X(x) = c_{1}x + c_{2} \tag{8} $$
You don't need to use a characteristic equation. Or also that there are two roots that are $0$ so you need to make one have a polynomial power. You can't have two equal solutions. In the general problem is
$$ ay^{''} + by^{'} +cy =0 \tag{9} $$
we have the characteristic equation $$ ar^{2} +br + c= 0\tag{10} $$
if we have double roots $r_{1} = r_{2} =r$
$$ y_{1}(t) =e^{r_{1}t} = e^{rt} ,y_{2}(t) =e^{r_{2}t} = e^{rt} \tag{11} $$
$$ r_{1,2} = \frac{-b \pm \sqrt{b^{2} -4ac }}{2a} \tag{12} $$
double roots come from $$ r_{1,2} = \frac{-b}{2a} \tag{13} $$
$$ y_{1}(t) = e^{\frac{-bt}{2a}} \tag{14}$$
to get a second solution you have multiply by $v(t)$
$$ y_{2}(t) = v(t)y_{1}(t) \tag{15} $$
you eventually figure out that $v(t) = t$