How to find eigenvalues and eigenfunctions of this boundary value problem? $$ y'' + \lambda y = 0 \\ y'(0)=0, y(\pi/2)=0 $$ I want to find only positive eigenvalues. I proceed like this: $$ y=C_1 \cos(\sqrt{\lambda} x) + C_2 \sin(\sqrt{\lambda} x)\\ y(\pi/2)=0 \Rightarrow C_2=0\\ \therefore y=C_1 \cos(\sqrt{\lambda }x \\ y'=-C_1 \sqrt{\lambda } \sin(\sqrt{\lambda} x) \\ y'(0)=0 \Rightarrow -C_1 \sqrt{\lambda } \sin(\sqrt{\lambda} x) $$ So, $C_1=0$ or $\lambda=0$. In these cases, we only get trivial solution.
So, does any value of $ \lambda $ is eigenvalue? Or have I made errors?
For simplicity $\lambda\mapsto\lambda^2$, then we have $$ y'' + \lambda^2y = 0 $$ which is the differential equation for SHO. Thus, $y(x) = A\cos(\lambda x) + B\sin(\lambda x)$. The first BC we should use is $y'(0) = 0$. \begin{alignat}{2} y'(0) &= B\lambda &&{}=0\\ B &= 0\\ y(x) &= A\cos(\lambda x)\\ y(\pi/2) &= \cos(\lambda\pi/2) &&{}=0 \end{alignat} Cosine is zero when the argument is $n\pi/2$ where $n$ is an odd integer. Therefore, $\lambda = 2n-1$. Your eigenfunction is then $$ y_n(x) = A_n\cos[(2n-1)x] $$