Well, the best way I can think of to introduce a real physical problem where Laguerre ànd Legendre (even of the associated form!) differential equations play a role, is the (exact, that is, without taking spin into consideration) solution of the combined angular momentum / magnetic moment / energy eigenvalue-problem for the hydrogen atom.
I cannot tell the whole story here, but I can sketch the process.
When solving the Schrodinger equation involved, and transforming it to spherical coordinates, all applicable quantum numbers roll into your lap and on route you will encounter the Laguerre and associated Legendre differential equations.
Now for the approach of solving these equations. Let's have a look at the Laguerre equation first.
$$xy'' + (1+\alpha-x)y' + ny = 0$$
If you try $y = \sum_{j=0}^{\infty}a_jx^j$, you will find that
$$\frac{a_{j+1}}{a_j} = -\frac{n-j}{(j+1)(j+1+\alpha)}$$
So, when moving from one coefficient to the next, the sign changes, it is divided by $j+1$, multiplied by $n-j$ and divided by $j+1+\alpha$. When j reaches n, the coefficients vanish.
That means that we will not be far off if we try
$$a_j = \frac{(-1)^j}{j!}\binom{n+\alpha}{n-j}$$
In fact, this is exactly what we need.
Now, which function will this be? The factor $\frac{(-1)^j}{j!}$ points at $e^{-x}$.
The factor $\binom{n+\alpha}{n-j}$ points at the $j^{th}$ derivative of $x^{n+\alpha}$, and we saw above that the series ends for j=n. But when we try $[e^{-x}x^{n+\alpha}]^{(n)}$, firstly we have to compensate for all the $e^{-x}$ factors by multiplying the result by $e^x$ , and secondly we would get terms for the running index j that have a factor $x^{n + \alpha - (n-j)} = x^{j + \alpha}$ and we would like to have $x^j$. So we have to compensate at the end here too, by multiplying by $x^{-\alpha}$. This reasoning leads to trying
$$y = e^xx^{-\alpha}[e^{-x}x^{n+\alpha}]^{(n)}$$
Where $f^{(n)}$ stands for the $n^{th}$ derivative of $f$.
And funnily enough, it's spot on again.
Over to the Legendre equation, first the ordinary one.
$$[(1-x^2)y']' + n(n+1)y = 0$$
Trying $y = \sum_{j=0}^{\infty}a_jx^j$ again, we find that
$$\frac{a_{j+2}}{a_j} = \frac{j(j+1) - n(n+1)}{(j+1)(j+2)}$$
As can be seen in one of my other posts (About the Legendre differential equation) there are solutions that are polynomials ($P_n$) and solutions that are represented by an unending series expansion ($Q_n$).
The $P_n$ are either odd-powered or even powered polynomials, depending on $n$ which is also the degree of $P_n$.
The $Q_n$ contain a factor $ln(\frac{1+x}{1-x})$, see (About the Legendre differential equation) again.
Finally, the associated Legendre equation.
$$[(1-x^2)y']' + \{l(l+1) - \frac{m^2}{1-x^2}\}y = 0$$
It is natural to try $y = (1-x^2)^{\alpha}P_l$. It is easily checked that we get the desired term $\frac{m^2}{1-x^2}y$ if we take $\alpha = m/2$. Further analysis shows that if we wish to arrive at all the correct terms, we have to use $P_l^{(m)}$ instead of $P_l$. Note that I still use the notation $f^{(m)}$ as denoting the $m^{th}$ derivative of $f$. The notation I use for the solutions of the associated Legendre equation is
$$P_{l,m} = (1-x^2)^{m/2}P_l^{(m)}$$
I hope this helps :-).
The Legendre Polynomials are given by:
$\displaystyle P_0(x) = 1$
$\displaystyle P_1(x) = x$
$\displaystyle P_2(x) = \frac{1}{2}(3x^2 - 1)$
$\displaystyle P_3(x) = \frac{1}{2}(5x^3 - 3x)$
$\displaystyle P_4(x) = \frac{1}{8}(35x^4 -30 x^2 + 3)$
$\displaystyle P_5(x) = \frac{1}{8} (63 x^5-70 x^3+15 x)$
$\displaystyle P_6(x) = \frac{1}{16}(231 x^6-315 x^4+105 x^2-5)$
$\displaystyle P_7(x) = \frac{1}{16}(429 x^7-693 x^5+315 x^3-35 x)$
$\ldots$
We want to expand $f(x)$ as an infinite series of Legendre polynomials $P_l(x)$, given:
$$
f(x)=\left\{\begin{matrix} +1
& 0<x<1\\
-1 & -1<x<0
\end{matrix}\right.
$$
To use the Legendre Series, we put:
$$\tag 1 f(x) = \sum_{i=0}^\infty c_iP_i(x)$$
To solve this, we solve a series of integrals given by:
$$\int_{-1}^1 f(x)P_i(x)~dx = \sum_{i=0}^\infty c_i \int_{-1}^1 (P_i(x))^2 ~dx$$
Because the Legendre polynomials are orthogonal, all the integrals on the right are zero except the one we care about, namely $c_i$. So, lets crank those $c_i$ using this approach.
$i = 0$
$$\int_{-1}^1 f(x)P_0(x)~dx = \sum_{i=0}^\infty c_0 \int_{-1}^1 (P_0(x))^2 ~dx$$
Note that because we have a piecewise continuous function, we split the integral up into two pieces (you know which rule allows us to do this), but also this is a symmetric function, so we can double the result. That is:
$$\int_{-1}^1 (f(x))(1)~dx = \int_{-1}^0 (f(x))(1)~dx + \int_{0}^1 (f(x))(1)~dx = \int_{-1}^0 (-1)(1)~dx + \int_{0}^1 (1)(1)~dx = 2\int_{0}^1 (1)(1)~dx = \sum_{i=0}^\infty c_0 \int_{-1}^1 (P_0(x))^2 ~dx = c_0 \int_{-1}^1 (1)^2~dx$$
This yields $0 = c_0 \cdot 2 \rightarrow c_0 = 0$
$i = 1$
$$\int_{-1}^1 f(x)P_1(x)~dx = \sum_{i=0}^\infty c_1 \int_{-1}^1 (P_1(x))^2 ~dx$$
$$2\int_{0}^1 (1)(x)~dx = \sum_{i=0}^\infty c_1 \int_{-1}^1 (P_1(x))^2 ~dx = c_1 \int_{-1}^1 (x)^2~dx$$
This yields $1 = c_1 \cdot \frac{2}{3} \rightarrow c_1 = \frac{3}{2}$
$i = 2$
$$\int_{-1}^1 f(x)P_2(x)~dx = \sum_{i=0}^\infty c_2 \int_{-1}^1 (P_2(x))^2 ~dx$$
$$2\int_{0}^1 (1)(\frac{1}{2}(3x^2-1))~dx = \sum_{i=0}^\infty c_2 \int_{-1}^1 (P_2(x))^2 ~dx = c_2 \int_{-1}^1 (\frac{1}{2}(3x^2-1))^2~dx$$
This yields $0 = c_2 \cdot 0 \rightarrow c_2 = 0$ (All even terms are zero)
If we continue this process, we find:
- $c_0 = 0$
- $\displaystyle c_1 = \frac{3}{2}$
- $c_2 = 0$
- $\displaystyle c_3 = -\frac{7}{8}$
- $c_4 = 0$
- $\displaystyle c_5 = \frac{11}{16}$
- $c_6 = 0$
- $\displaystyle c_7 = -\frac{75}{128}$
- $\ldots$
Thus,
$\displaystyle f(x)=\left\{\begin{matrix} +1 & 0 <x<1\\-1 & -1<x<0\end{matrix}\right. = c_1P_1(x) + c_3P_3(x)+ c_5P_5(x) + c_7P_7(x) + \ldots + c_nP_n(x)$
$$\displaystyle \therefore ~ f(x) = \frac{3}{2}P_1(x) - \frac{7}{8}P_3(x) + \frac{11}{16}P_5(x) - \frac{75}{128}P_7(x) + \ldots + c_nP_n(x)$$
Best Answer
First of all, your differential equation is wrong. It should be $$ x y'' + (1-x) y' + \lambda y = 0$$
In general, the solutions of this differential equation can be defined in terms of Kummer M and U functions:
$$ y \left( x \right) = c_1\,{{\mathrm M}\left(-\lambda,1,x \right)}+c_2 \,{{\mathrm U}\left(-\lambda,1,x\right)}$$
The Kummer M function is a solution that is analytic on the whole complex plane. It's only if $\lambda$ is a nonnegative integer that you can get a polynomial solution, which is a Laguerre polynomial.