User:Egm6321.f2010.team5.riveros/hw7p10

=Problem 10 - Legendre Polynomial Expansion and Recurrence Method= From lecture 41-3.

Given
We have the Legendre polynomial,
 * $$\displaystyle P_{n}(x)=\sum\limits_{i=0}^{n/2}\left[(-1)^{i}\cdot\frac{(2n-2i)!\cdot x^{n-2i}}{2^{n}\cdot i!\cdot(n-i)!\cdot(n-2i)!}\right]$$

and their recurrence relation,
 * $$\displaystyle (n+1)\cdot P_{n+1}-(2n+1)\cdot x\cdot P_n+n\cdot P_{n-1}=0$$

From lecture 41-3 we have,
 * $$\displaystyle P_0(x)=1$$
 * $$\displaystyle P_1(x)=x$$
 * $$\displaystyle P_2(x)=3/2\cdot x^2-1/2$$

Find
We are to find $$\left\{P_3,\ldots,P_6\right\}$$ using the given power series expansion and compare results with those obtained using the second recurrence relation.

Polynomial Expansion
We first find $$\left\{P_3,\ldots,P_6\right\}$$ by using the given polynomial expansion, wherein the subscripts 3 through 6 are substituted for $$n$$. This yields,
 * $$\displaystyle P_3(x)=5/2\cdot x^3-3/2\cdot x$$
 * $$\displaystyle P_4(x)=35/8\cdot x^4-15/4\cdot x^2+3/8$$
 * $$\displaystyle P_5(x)=63/8\cdot x^5-35/4\cdot x^3+15/8$$
 * $$\displaystyle P_6(x)=231/16\cdot x^6-315/16\cdot x^4+105/16\cdot x^2-5/16$$

Recurrence Relation
We know that $$\displaystyle P_0(x)=1$$ and $$\displaystyle P_1(x)=x$$. We then must find $$\left\{P_2,\ldots,P_6\right\}$$ by using the recurrence relation, which may be rewritten as,
 * $$\displaystyle P_n=\frac{(n+1)\cdot P_{n+1}+n\cdot P_{n-1}}{(2n+1)\cdot x}$$

We must solve for the following,
 * $$\displaystyle P_2=\frac{3\cdot P_{3}+2\cdot P_{1}}{5\cdot x}$$
 * $$\displaystyle P_3=\frac{4\cdot P_{4}+3\cdot P_{2}}{7\cdot x}$$
 * $$\displaystyle P_4=\frac{5\cdot P_{5}+4\cdot P_{3}}{9\cdot x}$$
 * $$\displaystyle P_5=\frac{6\cdot P_{6}+5\cdot P_{4}}{11\cdot x}$$

We now have enough equations to solve for the polynomials by substitution. The results yield,
 * $$\displaystyle P_0(x)=1$$
 * $$\displaystyle P_1(x)=x$$
 * $$\displaystyle P_2(x)=3/2\cdot x^2-1/2$$
 * $$\displaystyle P_3(x)=5/2\cdot x^3-3/2\cdot x$$
 * $$\displaystyle P_4(x)=35/8\cdot x^4-15/4\cdot x^2+3/8$$
 * $$\displaystyle P_5(x)=63/8\cdot x^5-35/4\cdot x^3+15/8$$
 * $$\displaystyle P_6(x)=231/16\cdot x^6-315/16\cdot x^4+105/16\cdot x^2-5/16$$

Comparison
The polynomials, computed by both methods as shown above yield the same solutions.