Find the first few Legendre polynomials without using Rodrigues' formula If a polynomial is given by $$y=\color{red}{a_0\left[1-\frac{l(l+1)}{2!}x^2+\frac{l(l+1)(l-2)(l+3)}{4!}x^4-\cdots\right]}+\color{blue}{a_1\left[x-\frac{(l-1)(l+2)}{3!}x^3+\frac{(l-1)(l+2)(l-3)(l+4)}{5!}x^5-\cdots\right]}\tag{1}$$ where $l$ is a constant and $a_0,a_1$ are coefficients.  
The recurrence relation is given by $$a_{n+2}=-\frac{(l-n)(l+n+1)}{(n+2)(n+1)}a_n\tag{2}$$  The objective is to find the first few Legendre polynomials $P_l(x)$ such that $P_l(1)=1$ without using Rodrigues' formula:
$$\fbox{$P_l(x)=\frac{1}{2^{l}l!}\frac{\mathrm{d}^l}{\mathrm{d}x^l}{\left(x^2-1\right)}^l$}$$
The method given in my textbook states that:

If the value of $a_0$ or $a_1$ in each polynomial is selected so
  that $y = 1$ when $x = 1$, the resulting polynomials are called Legendre Polynomials, written $P_l(x)$. From $(1)$ and $(2)$ and the requirement $P_l(1) = 1$, we find the following expressions for the first few Legendre polynomials:
$\color{#180}{\quad P_0(x)=1,\quad P_1(x)=x}\quad \text{and}\quad \color{#180}{P_2(x)=\frac12(3x^2-1)}$ 

I don't understand how those polynomials marked $\color{#180}{\mathrm{green}}$ were obtained as I've only just started reading about Legendre polynomials and hence I'm not sure how to tackle this problem. But since it is mandatory that OP's show their efforts for questions of this nature
Here is my attempt anyway:
I substituted $l=0$ in the $\color{red}{\mathrm{red}}$ bracket to obtain $1=a_0(1)$ so $a_0=1$ and hence $P_0(x)=1$.
I substituted $l=1$ in the $\color{blue}{\mathrm{blue}}$ bracket to obtain $1=a_1(x)$ so $a_1=x$ and hence $P_1(x)=x$.
I substituted $l=2$ in the $\color{red}{\mathrm{red}}$ bracket to obtain $1=a_0\left[1-\dfrac{2(2+1)}{2!}x^2\right]=a_0\left[1-3x^2\right]$ so $a_0=\dfrac{1}{1-3x^2}\ne \frac12(3x^2-1)$.
Obviously I am doing something wrong. Can anyone please explain to me how to achieve the answers properly (and without using Rodrigues' formula)?


We consider for even $l$ the polynomial (OPs red part)
  \begin{align*}
  a_0^{(l)}\left[1-\frac{l(l+1)}{2!}x^2+\frac{l(l+1)(l-2)(l+3)}{4!}x^4-\cdots\right]\tag{1}
  \end{align*}
  and for odd $l$ the polynomial (OPs blue part)
  \begin{align*}
  a_1^{(l)}\left[x-\frac{(l-1)(l+2)}{3!}x^3+\frac{(l-1)(l+2)(l-3)(l+4)}{5!}x^5-\cdots\right]\tag{2}
  \end{align*}

Note, we use for convenience an upper index $(l)$ to indicate to which polynomial the index $a_0$ resp. $a_1$ belongs. (... and I suppose this helps to clarify the things ...)

Setting $l=0$  in (1) we obtain
\begin{align*}
  y_0(x)=a_0^{(0)}
  \end{align*}
We observe that all terms containing $x^2$ or higher powers of $x$ vanish, since they all contain the factor $l$.

$$ $$

Setting  $l=1$ in (2) we obtain
\begin{align*}
  y_1(x)=a_1^{(1)}x
  \end{align*}
We observe that all terms containing $x^3$ or higher powers of $x$ vanish, since they all contain the factor $l-1$.

$$ $$

Similarly to the first case we obtain with $l=2$:
\begin{align*}
  y_2(x)=a_0^{(2)}\left[1-\frac{2\cdot 3}{2!}x^2\right]=a_0^{(2)}\left(1-3x^2\right)
  \end{align*}
  since all other terms in (1) contain the factor $l-2$.

We also know that $y_l(1)=1$ for all polynomials $y_l(x)$. We obtain
\begin{align*}
  y_0(1)&=a_0^{(0)}=1\\
  y_1(1)&=a_1^{(1)}=1\\
  y_2(1)&=-2a_0^{(2)}=1
  \end{align*}
We conclude $a_0^{(2)}=-\frac{1}{2}$ and obtain finally

\begin{align*}
  y_0(x)&=a_0^{(0)}=1\\
  y_1(x)&=a_1^{(1)}x=x\\
  y_2(x)&=a_0^{(2)}\left(1-3x^2\right)=\frac{1}{2}\left(3x^2-1\right)
  \end{align*}

[2016-03-22]: Update  according to OPs comment: Why   can we restrict the consideration to   $a_0^{(l)}$ when $l$ is even and restrict the consideration to $a_1^{(l)}$ when $l$ is odd?
The short answer is: Since the other series diverges when considering the boundary condition at $x=1$ we can set $a_1^{(l)}=0$ when $l$ is even and we can set $a_0^{(l)}=1$ when $l$ is odd.

Some details: We   start with  the   Legendre differential  equation
  \begin{align*}
(1-x^2)y^{\prime\prime}-2xy^{\prime}+l(l+1)y=0\tag{3}
\end{align*}
  and we want to find polynomials  as solution which additionally fulfill the boundary condition 
\begin{align*}
y(1)=1
\end{align*}
We make an Ansatz with generating functions
  \begin{align*}
y(x)=a_0+a_1x+a_2x^2+\cdots
\end{align*}
  With the help of the differential equation (3) and via comparing coefficients we obtain
  \begin{align*}
  y(x)&=a_0^{(l)}\left[1-\frac{l(l+1)}{2!}x^2+\frac{l(l+1)(l-2)(l+3)}{4!}x^4-\cdots\right]\\
&+a_1^{(l)}\left[x-\frac{(l-1)(l+2)}{3!}x^3+\frac{(l-1)(l+2)(l-3)(l+4)}{5!}x^5-\cdots\right]
\end{align*}
  with $a_0^{l}$ and $a_1^{l}$ being two degrees of freedom.
We next apply the boundary condition $y(1)=1$.
First case: $l=2k$ even. In this case  $y$ has the shape
  \begin{align*}
 y(x)&=a_0^{(0)}\left[1-\frac{l(l+1)}{2!}x^2-\cdots
\pm\frac{l(l+1)\cdots(l-2k+2)(l+2k-1)}{(l-2k)!}x^{l-2k}\right]\\
&+a_1^{(l)}\left[x-\frac{(l-1)(l+2)}{3!}x^3+\frac{(l-1)(l+2)(l-3)(l+4)}{5!}x^5-\cdots\right]
\end{align*}
We see the  $a_0^{(l)}$ series contains only finitely many terms, since all  terms having factor $l-2k$ vanish. If we now consider $y(1)=1$, it can be shown that the other $a_1^{(l)}$ series diverges for $x=1$. To overcome this, we set $a_1^{(l)}=0$.

The second case is symmetrically. Here we correspondingly set $a_0^{(l)}=0$ since the $a_0^{(l)}$ series diverges, while the $a_1{(l)}$ series is a polynomial.
