Find the eigenvalues $\lambda_n$ and eigenfunctions $y_n(x)$ for the given boundary value problem. (Give your answers in terms of $n$, making sure that each value of $n$ corresponds to a unique eigenvalue.)
$$y'' + \lambda y = 0, \quad y'(0) = 0, \quad y(L) = 0 $$
I've gone through $\lambda = 0$ and $\lambda < 0$, both being trivial.
on $\lambda > 0$, $a = \sqrt{\lambda}$, I end up with $C_1\cos(aL) = 0$ thus
$$ aL = {\pi \over2}, {3\pi \over 2}, {5\pi \over 2} \dots = {2n-1 \over 2} $$
$$\lambda = \left({2n-1\over 2L}\right)^2$$ but this wasn't correct and I'm lost as to why.
Any help would be appreciated.
Note: I also tried setting as just $\lambda = \left({n\pi \over 2L}\right)^2$ but that still wasn't the correct eigenvalue..
$$ aL = \frac{2n-1}{2}\pi $$
$$ a_n = \frac{2n-1}{2L}\pi $$
$$ \lambda_n = \left( \frac{2n-1}{2L}\pi \right)^2 $$
Note: You can also have $$ \lambda_n = \left( \frac{2n+1}{2L}\pi \right)^2 $$ which is the same answer except $n$ starts from $0$ instead of $1$