User:Egm6341.s11.team5.reiss/HW2

Given
The expression to find the Legendre polynomial of degree n is given by: $${{\rm P}_n}(x) = \sum\limits_{i = 0}^{\left[ {\frac{n}{2}} \right]} {{{( - 1)}^i}\frac}$$ where $$\left[ \frac{n}{2}\right]$$ is the integer value of the fraction.

Find
A) Use the Legendre Polynomial expression to find $${{\rm P}_5}(x)$$ and $${{\rm P}_{10}}(x)$$ B) Find and plot the roots of both polynomials and comment on the location of the roots near the end points of the interval $$\left[ {-1,1}\right]$$

Solution
For $${{\rm P}_5}(x)$$ the equation is as follows: $${{\rm P}_5}(x) = \sum\limits_{i = 0}^{\left[ {\frac{5}{2}} \right]} {{{( - 1)}^i}\frac} $$ for $$i=0$$ $$ \Rightarrow \frac = \frac{8}{x^5}$$ for $$i = 1$$ $$ \Rightarrow - \frac =  - \frac{4}{x^3}$$ for $$i = 2$$ $$ \Rightarrow \frac = \frac{8}{x^{}}$$ $$ \Rightarrow {{\rm P}_5}(x)=\frac{8}{x^5} - \frac{4}{x^3} + \frac{8}x$$ For $${{\rm P}_{10}}(x)$$ the equation is as follows: $${{\rm P}_{10}}(x) = \sum\limits_{i = 0}^{\left[ {\frac{10}{2}} \right]} {{{( - 1)}^i}\frac} $$ for $$i=0$$ $$ \Rightarrow \frac = \frac{x^{10}}$$ for $$i=1$$ $$\Rightarrow - \frac =  - \frac{x^8}$$ for $$i=2$$ $$\Rightarrow \frac = \frac{x^6}$$ for $$i=3$$ $$\Rightarrow - \frac =  - \frac{x^4}$$ for $$i=4$$ $$ \Rightarrow \frac = \frac{x^2}$$ for $$i=5$$ $$ \Rightarrow - \frac =  - \frac$$ $$ \Rightarrow {{\rm P}_{10}}(x) = \frac{x^{10}} - \frac{x^8} + \frac{x^6} - \frac{x^4} + \frac{x^2} - \frac$$