# Finding eigenvalues and eigenfunctions of a boudary value problem

Find eigenvalues and eigenfunctions of

$$\begin{cases} y'' + \lambda y = 0 \\ y(0) = y'( \pi ) = 0 \end{cases}$$

Also, express $f(x) = x$ as a series of eigenfunctions of the above problem.

### Attempt

I write down characteristic equation $\mu^2 + \lambda = 0$, thus $\mu = \sqrt{ - \lambda}$.

### If $\lambda > 0$, then

$$y(x) = C_1 \cos ( \sqrt{ \lambda } x ) + C_2 \sin ( \sqrt{ \lambda } x )$$

Since $y(0) = 0$, then $C_1 = 0$, thus $y(x) = C_2 \sin( \sqrt{ \lambda } x)$. Next, $y'(x) = \sqrt{ \lambda } C_2 \cos ( \sqrt{ \lambda } x )$ and

$$y'( \pi ) = \sqrt{ \lambda } C_2 \cos ( \sqrt{ \lambda } \pi ) = 0 \implies \sqrt{ \lambda } \pi = \frac{ (2n + 1) \pi }{2} \implies \boxed{ \lambda_n = \frac{ (2n + 1)^2 }{4} } \; \; \text{eigenvalues}$$

Thus, eigenfunctions are $$\boxed{ y_n(x) = C_2 \sin \left( \frac{ (2n - 1)^2 }{4} x \right) }$$

### If $\lambda < 0$, then

Write $\mu = \Lambda \in \mathbb{R}$, thus

$$y(x) = C_1 e^{\Lambda x} + C_2 e^{- \Lambda x} \implies y(0) = C_1 +C_2 = 0$$

and

$$y'(pi) = 0 \implies \Lambda C_1 e^{ \Lambda \pi } - \Lambda C_2 e^{ - \Lambda \pi } = 0$$

Thus, we have the system

$$\left( \begin{matrix} 1 & 1 \\ \Lambda e^{\Lambda \pi } & - \Lambda e^{- \Lambda pi } \end{matrix} \right) \left( \begin{matrix} C_1 \\ C_2 \end{matrix} \right) = 0$$

but the above matrix is nonsingular, thus there are no solutions to the system, thus there are no eigenvalue and no eigenfunctions in this situation.

## Question: How can we express $f(x) = x$ as a series of eigenfunctions? Also, is my above procedure correct? Any feedback would be extremely appreciated.

Your procedure is correct, regarding the eigenfunctions of the BVP. As for the last part, it is well known that the eigenfunctions form a basis of the function space on which the operator is defined. So, in our problem $\displaystyle x=\sum_{n=1}^{\infty}c_ny_n(x)$ and in order to find $c_n,~n\geq 1$ you should make use of the orthogonality property: $$\int\limits_{0}^{\pi}y_n(x)y_m(x)dx=\frac{\pi}{2},~n\neq m.$$ Multiply every part of the equation by $y_m(x)$ and integrate on $[0,\pi]$ (all the conditions needed to pass the integral through the sum are fullfilled), so you get:
$$c_m\int\limits_{0}^{\pi}y_m^2(x)dx=\int\limits_{0}^{\pi}xy_m(x)dx,$$
and all you have to do is to evaluate the integrals. In fact, $\displaystyle \int\limits_{0}^{\pi}y_m^2(x)dx=\pi/2$ and for the next one you will need integration by parts.