Solving Linear ODE

Can someone help me prove that given

$$y'' + \frac{2}{x}y' + \lambda y = 0$$

and boundary conditions

$${\lim_{x \to 0} xy = 0 , \hspace{5mm} y(1) =0 }$$

that

$$y(x) = \frac{1}{x}\left[ A \sin{(\sqrt{\lambda}x)} + B \cos{(\sqrt\lambda x)} \right]$$

When trying to solve it the usual way I get

$$m^2 + \frac{2}{x}m + \lambda = 0$$ $$m = -\frac{1}{x} \pm j\sqrt{\lambda - \frac{1}{x^2}}$$

which obviously won't me to the solution because I have the $\sqrt{\lambda - \frac{1}{x^2}}$ term instead of a $\sqrt{\lambda x}$ term.

-
You need 1) to plug your solution into the equation and 2) check that the boundary conditions are satisfied. You do not need to solve the equation (and your approach is wrong anyway) – Artem Jan 13 '13 at 2:35
You can just plug in $y(x)$ given and show both boundary conditions are matched. edit: Ah, Artem beat me to it by 47 seconds, I think :) – Ryker Jan 13 '13 at 2:36
From the way the question is phrased, some justification that every solution has the given form is needed. – David Mitra Jan 13 '13 at 3:09
Have you already given the solution y(x)? – Mhenni Benghorbal Jan 13 '13 at 3:22
Already you have been given the solution and you need to find the eigenvalues $\lambda$. – Mhenni Benghorbal Jan 13 '13 at 4:12

Set $u(x) = x y(x)$. You may then show that

$$u'' + \lambda u = 0$$

with $u(0)=0$ and $u(1)=0$. Now solve as usual. When you get the solution for $u(x)$, then $y(x)=u(x)/x$.

EDIT

A few more details about where the above equation comes from. Note that

$$y' = \frac{x u'-u}{x^2}$$

$$y'' = \frac{x u'' - u'}{x^2} - \frac{x^2 u' - 2 x u}{x^4}$$

Plugging this back into the original equation above results in

$$\frac{u''}{x} + \lambda \frac{u}{x} = 0$$

which results in the derived equation for $u$ above.

-

Here is a related problem. Already, you have given the solution $y(x)$

$$y(x) = \frac{1}{x}\left[ A \sin{(\sqrt{\lambda}x)} + B \cos{(\sqrt\lambda x)} \right].$$

and you need to find the eigenvalues $\lambda$ and the corresponding eigenfunctions. Exploiting the boundary conditions we get the two equations

$$0 = B.$$

$$0 = A \sin( \sqrt{\lambda} ) + B\cos(\sqrt{\lambda} ).$$

From the above two equations, we have

$$\sin(\sqrt{\lambda}) = 0 \implies \lambda_n = n^2\pi^2 .$$

Now, you can find the eigenfunctions corresponding to $\lambda_n$.

-