Sturm-Liouville Equation Problem I am having some difficulty solving the equation $y'' + \lambda y = 0; y(0) = y'(L) = 0$. I've been able to solve the cases $\lambda = 0$ and $\lambda < 0 $; however, for $\lambda > 0$, I encounter some problems.
I know that the general solution is $y(x) = C_1 \cos(kx) + C_2 \sin(kx)$, by letting $λ = k^2$, where $k > 0$.
$y(0) = C_1 = 0$ 
$y(x) = C_2 \sin(kx)$ 
$y'(L) = C_2 k \cos(kx) = 0$  
Then, 
$\cos(kx) = 0 \implies \cos(x\sqrt\lambda )$
It is at this point that I struggle. I know the answer is $\lambda= \left(\frac{2n+1}{2L}\right)^2,$ but I don't understand how we got here from $\cos(kx) = 0$.
 A: The last step is using our knowledge of zeros of $\cos$: $\cos(z) = 0$ if and only if $z = \frac{\pi}{2} + \pi n$ for some $n \in \mathbb{Z}$.
Given that fact, the equality $\cos(kL) = 0$ is equivalent to $kL = \frac{\pi}{2} + \pi n$ for some $n\in\mathbb{Z}$, i.e. $k = \frac{(2n+1)\pi}{2L}$ or $\lambda = \left(\frac{(2n+1)\pi}{2L}\right)^2$.
A: Start by solving
$$
       y''+\lambda y=0,\;\; y(0)=0,\; y'(0)=1. \tag{*}
$$
The condition $y'(0)=1$ normalizes the solution, and you can always do this unless $y'(0)=0$, which is a case you don't worry about because $y''+\lambda y=0$, $y(0)=0,y'(0)=0$ has only the trivial solution $y\equiv 0$. The solution of the "normalized" problem $(*)$ is
$$
        y_{\lambda}(x) = \frac{\sin(\sqrt{\lambda}x)}{\sqrt{\lambda}}.
$$
This even works for $\lambda=0$ as a limiting case of the above as $\lambda\rightarrow 0$:
$$
            y_{0}(x)=x.
$$
Now, the solution you want must also satisfy $y'(L)=0$, which gives
$$
            \cos(\sqrt{\lambda}L)=0 \\
       \implies \sqrt{\lambda}L = (n+\frac{1}{2})\pi,\;\; n=0,\pm 1,\pm 2,\cdots, \\
        \implies \lambda = \frac{(n+1/2)^2\pi^2}{L^2},\;\; n=0,1,2,3,\cdots.
$$
This has the form of solution that you stated.
