Non trivial solutions to $ y'' + 2y' + ay = 0$ For which values of $a$ does the following equation has non trivial solutions
$y'' + 2y' + ay = 0 , \space y(0) = y(\pi ) = 0$
The characteristic equation is:
$$x^2+2x+a = 0$$
and I have found the roots to be
$$x_1 = \sqrt{(1-a)}-1$$
$$x_2 = -\sqrt{(1-a)}-1$$
I have tried for $a =1, a<1, a>1$.
$a=1$, I got: $y(t) = C_1e^{-t}+C_2e^{-t}$ and $C_1=C_2=0$
$a>1$, gives complex roots and the solution is of the style:
$y(t) = C_1e^{-t}\cos b+C_2e^{-t}\sin b$ and $C_1=C_2=0$
$a<1$, gives distinct roots. 
I don't know if I have calculated the complex roots right.
I have found that all solutions give the trivial. Is that correct?
The solution says that $a=1+n^2$
Where does that come from?

Hint. Consider the case when  $1-a>0$, $1-a<0$, $1-a=0$.
Note that when $1-a<0$, then the general solution is
$$y(x)=Ae^{-x}\cos(\sqrt{a-1}x)+Be^{-x}\sin(\sqrt{a-1}x).$$
The condition $y(0)=0$ implies that $A=0$ and $y(\pi)=0$ implies
$$Be^{-\pi}\sin(\sqrt{a-1}\pi)=0$$
The solution is non trivial if $B\not=0$, therefore $\sqrt{a-1}$ should be an integer.
