Determining Weight function in Sturm Liouville problem By choosing the proper weight function $\sigma (x) $ solve the Sturm-Liouville problem and determine its eigenvalues and eigenfunctions.
$$ \frac{d}{dx}\left[x\frac{dy(x)}{dx}\right] + \frac{2}{x}y(x) +\lambda \sigma (x)y(x)=0,\; y'(1)=y'(2)=0,\; 1 \leq x \leq 2. $$
I don't understand what it means to "choose" the proper weight function. I tried to rewrite the problem in this form.
$$\frac{1}{\sigma(x)}\left[\frac{d}{dx}\left[x\frac{dy(x)}{dx} + \frac{2}{x}y(x)\right] +\lambda\sigma(x)=0\right], $$
then calculate it by setting  $p(x)=A(x)\sigma (x), p'(x)=B(x)\sigma(x)$ and using this formula:
$$\sigma(x)=e^{\int \frac{A-B'}{B}\,dX}, $$ 
but it doesn't get me anywhere; solving this gives you just $1=1.$ 
I tried extracting information about the weight function from the boundary condition but i am failing at that too and i tried solving the differential equation using an infinite series but that won't work either because of the unknown weight function. Any tips?

Your equation may be written as
$$
                 -xy''-y'+\frac{2}{x}y=\lambda\sigma(x)y \\
                 -x^2y''-xy'+2y=\lambda \sigma(x)xy.
$$
If you are allowed to choose $\sigma(x)$, I would choose $\sigma(x)x=1$. Then you have Euler's equation, which you can explicitly solve:
$$
                         x^2y''+xy'+(2-\lambda)y=0,\;\;\; y'(1)=y'(2)=0.
$$
The solutions where $y'(1)=0$ can be normalized by an added condition such as $y(1)=1$, for example. Then you can solve for $\lambda$ for which $y'(2)=0$, and that determines the eigenvalues $\lambda$.
