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

Problem 5: Verify table for Gauss Legendre Quadrature
 Solved without assistance 

Find: Verify Table
(1) Verify values in table against corresponding numerical values from NIST Digital Library of Math Functions (2) Discuss the relative merits of using the exact, but irrational vaules versus using the numerical values. (3) Extend above table to include $$ n=6 \ $$

Solution:
(1).Verify the values for the roots of the Legendre polynomials:
 * {| style="width:100%" border="0" align="left"

\displaystyle \begin{align} P_0 &= 1\\ P_1 &= x \\ P_2 &= \frac{1}{2}(3x^2-1) \\ P_3 &= \frac{1}{2}(5x^3-3x) \\ P_4 &= \frac{1}{8}(35x^4-30x^2+3) \\ P_5 &= \frac{1}{8}(63x^5-70x^3+15x) \\ P_6 &= \frac{1}{16}(231x^6-315x^4+105x^2-5) \end{align} $$
 * }
 * }
 * }

To verify the values of the roots in the table just plug them into Legendre polynomials and see whether they are equal to 0.
 * {| style="width:100%" border="0" align="left"

\displaystyle \begin{align} P_1 &= x =0\\ P_2 &= \frac{1}{2}(3(\pm 1/\sqrt{3})^2-1)=0 \\ P_3 &= \frac{1}{2}(5(\pm \sqrt{3/5})^3-3(\pm \sqrt{3/5}))=0 \\ P_4 &= \dots =0 \\ P_5 &= \dots =0 \end{align} $$ So, the roots are verified.
 * }
 * }
 * }

Verify the weights in the table using:
 * {| style="width:100%" border="0" align="left"

\displaystyle w_j=\frac{-2}{(n+1)P_n'(x_j)P_{n+1}(x_j)} $$ n=1:
 * }
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle w_1=\frac{-2}{(1+1)P_1'(0)P_2(0)}=\frac{-2}{2\cdot 1\cdot (-\frac{1}{2})}=2 $$
 * }
 * }
 * }

n=2:
 * {| style="width:100%" border="0" align="left"

\displaystyle w_1=\frac{-2}{(2+1)P_2'(-1/\sqrt{3})P_3(-1/\sqrt{3})}=\frac{-2}{3\cdot (-3/\sqrt{3})(2/3\cdot \sqrt{3})}=1 $$
 * }
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle w_2=\frac{-2}{3\cdot (3/\sqrt{3})\cdot (-2/3\cdot \sqrt{3})}=1 $$
 * }
 * }
 * }

n=3:
 * {| style="width:100%" border="0" align="left"

\displaystyle w1=\frac{-2}{(3+1)P_3'(-\sqrt{3/5})P_4(-\sqrt{3/5})}=\frac{5}{9} $$
 * }
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle w_2=\frac{-2}{(3+1)\cdot P_3'(0)\cdot P_4(0)}=\frac{8}{9} $$
 * }
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle w_3=\frac{5}{9} $$
 * }
 * }
 * }

n=4:
 * {| style="width:100%" border="0" align="left"

\displaystyle w_1=\frac{-2}{(4+1)\cdot P_4'(x_1)P_5(x_1)}=\frac{18-\sqrt{30}}{36} $$
 * }
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle w_2=\frac{18+\sqrt{30}}{36} $$
 * }
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle w_3=\frac{18+\sqrt{30}}{36} $$
 * }
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle w_4=\frac{18-\sqrt{30}}{36} $$
 * }
 * }
 * }

n=5:
 * {| style="width:100%" border="0" align="left"

\displaystyle w_3=\frac{128}{225} $$
 * }
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle w_1=w_5=\frac{322-13\sqrt{70}}{900} $$
 * }
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle w_2=w_4=\frac{322+13\sqrt{70}}{900} $$
 * }
 * }
 * }

(2)Verify these exact values in the table against the corresponding numerical values in NIST: There's only a table for 5-point Gauss-Legendre formula:
 * {| style="width:100%" border="0" align="left"

\displaystyle \begin{matrix} \pm x_k & w_k \\ 0.00000 \ 00000 \ 00000 & 0.56888\ 88888\ 88889 \\ 0.53846\ 93101\ 05683 & 0.47862\ 86704\ 99366 \\ 0.90617\ 98459\ 38664 & 0.23692\ 68850\ 56189 \end{matrix} $$
 * }
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle \begin{matrix} x_3=0 \\ w_3=\frac{128}{225}=0.5689 \\ x_2,x_4=\pm \frac{1}{3} \sqrt{5-2 \sqrt{10/7}}=\pm 0.5385\\ w_{2,4}=\frac{322+13\sqrt{70}}{900}=0.4786\\ x_1,x_5=\pm \frac{1}{3}\sqrt{5+2\sqrt{10/7}}=\pm 0.9062\\ w_1,5=\frac{322-13\sqrt{70}}{900}=0.2369 \end{matrix}

$$ So, using numerical values will be more convenient when the expression of the function is comlicated. But exact, irrational values will be more precise.
 * }
 * }
 * }

(3)Extend the table to 6.
 * {| style="width:100%" border="0" align="left"

\displaystyle \begin{matrix} Number\ of\ points,n & Points,x_i & Weights,n_i\\ 6 & \pm 0.9325 & 0.1715 \\ & \pm 0.6612 & 0.3607 \\ & \pm 0.2386 & 0.4679 \end{matrix}

$$
 * }
 * }
 * }