User:Egm6322.s12.team1.zheng.zx/R8

Problem 4: Plot the following pairs in separate figures
 Solved without assistance 

Given
From [[media:pea1.f11.mtg42.djvu|Mtg 42]] Pg 42-2

Legendre polynomials

$$\begin{align} & {{P}_{0}}(x)=1 \\ & {{P}_{1}}(x)=x \\ & {{P}_{2}}(x)=\frac{1}{2}(3{{x}^{2}}-1) \\ & {{P}_{3}}(x)=\frac{1}{2}(5{{x}^{3}}-3x) \\ \end{align}$$

Legendre functions

$$\begin{align} & {{Q}_{0}}(x)=\frac{1}{2}\log \left( \frac{1+x}{1-x} \right) \\ & {{Q}_{1}}(x)=\frac{1}{2}x\log \left( \frac{1+x}{1-x} \right)-1 \\ & {{Q}_{2}}(x)=\frac{1}{4}(3{{x}^{2}}-1)\log \left( \frac{1+x}{1-x} \right)-\frac{3}{2}x \\ & {{Q}_{3}}(x)=\frac{1}{4}(5{{x}^{3}}-3x)\log \left( \frac{1+x}{1-x} \right)-\frac{5}{2}{{x}^{2}}+\frac{2}{3} \\ \end{align}$$ And the fourth pair: $$ \begin{align} P_4(x)&=\frac{35}{8}x^4-\frac{15}{4}x^2+\frac{3}{8} \\ Q_4(x)&= ((105*atan(x*i)*i)*x^4 + 105*x^3 + (-90*atan(x*i)*i)*x^2 - 55*x + 9*atan(x*i)*i)/24 \end{align} $$

(Q4 is the result calculated by Matlab)

Find
1.Plot the above 5 pairs in separate figures

2.Observe even-ness and odd-ness of {Pi,Qi},i=1,...,4 and guess the value of the scalar products: $$ =\int^{\mu=+1}_{\mu=-1}P_i(\mu)Q_i(\mu)d\mu $$

Solution










So, for Pn: when n is odd, Pn is odd; when n is even, Pn is even;

for Qn: when n is odd, Qn is even; when n is even, Qn is odd;

Thus, PnQn is always odd

So, $$ =\int^{\mu=+1}_{\mu=-1}P_i(\mu)Q_i(\mu)d\mu=0 $$ for i=0,...,n