text:
User:EGM6341.s11.TEAM1.Sujin.HW2

Find
1) Construct Taylor series around (2.2)

2) Plot these series for each n.

3) Find/Estimate max $$ \left | R_{n+1}(x=\frac{3 \pi\ }{4}) \right \vert $$

1) Construct Taylor series

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

$$\displaystyle \begin{align} P_0(x)=\sin(\frac{3\pi}{8})=0.4730 \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * }
 * }
 * }

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

$$\begin{align}       =0.9239 + (x-\frac{3\pi}{8})(\cos(\frac{3\pi}{8})) \end{align}$$
 * $$\displaystyle P_1(x)=f(\frac{3\pi}{8}) + \frac{(x-x_0)^{(1)}}{1!} f^{(1)}(x_0) $$
 * }

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

$$\displaystyle \begin{align} P_1(x)=0.4730 + 0.3827x \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * }
 * }
 * }

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

$$\displaystyle        = (0.3827x + 0.4730) + \frac{(x-\frac{3\pi}{8})^{2}}{2!} (-\sin(\frac{3\pi}{8}))$$
 * $$\displaystyle P_2(x) = P_1(x) + \frac{(x-x_0)^{(2)}}{2!} f^{(2)}(x_0) $$
 * }

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

$$\displaystyle \begin{align} P_2(x) = 0.4730 + 0.3827x + \frac{(x-\frac{3\pi}{8})^{2}}{2!}(-0.9239) \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * }
 * }
 * }

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

$$\displaystyle = 0.3827x + 0.4730 + \frac{(x-\frac{3\pi}{8})^{2}}{2!} (-\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{3}}{3!}(-\cos(\frac{3\pi}{8}))  $$
 * $$\displaystyle P_3(x) = P_2(x) + \frac{(x-x_0)^{3}}{3!} f^{(3)}(x_0) $$
 * }

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

$$\displaystyle \begin{align} P_3(x) = 0.4730 + 0.3827x + \frac{(x-\frac{3\pi}{8})^{2}}{2!}(-0.9239) + \frac{(x-\frac{3\pi}{8})^{3}}{3!}(-0.3827) \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * }
 * }
 * }

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

$$\displaystyle = 0.3827x + 0.4730 + \frac{(x-\frac{3\pi}{8})^{2}}{2!} (-\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{3}}{3!}(-\cos(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{4}}{4!} (\sin(\frac{3\pi}{8})) $$
 * $$\displaystyle P_4(x) = P_3(x) + \frac{(x-x_0)^{4}}{4!} f^{(4)}(x_0) $$
 * }

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

$$\displaystyle \begin{align} P_4(x) = 0.4730 + 0.3827x + \frac{(x-\frac{3\pi}{8})^{2}}{2!}(-0.9239) + \frac{(x-\frac{3\pi}{8})^{3}}{3!}(-0.3827) + \frac{(x-\frac{3\pi}{8})^{4}}{4!} (0.9239) \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * }
 * }
 * }

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

$$\displaystyle = 0.3827x + 0.4730 + \frac{(x-\frac{3\pi}{8})^{2}}{2!} (-\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{3}}{3!}(-\cos(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{4}}{4!} (\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{5}}{5!} (\cos(\frac{3\pi}{8})) $$
 * $$\displaystyle P_5(x) = P_4(x) + \frac{(x-x_0)^{5}}{5!} f^{(5)}(x_0) $$
 * }

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

$$\displaystyle \begin{align} P_5(x) = 0.4730 + 0.3827x + \frac{(x-\frac{3\pi}{8})^{2}}{2!}(-0.9239) + \frac{(x-\frac{3\pi}{8})^{3}}{3!}(-0.3827) + \frac{(x-\frac{3\pi}{8})^{4}}{4!} (0.9239) + \frac{(x-\frac{3\pi}{8})^{5}}{5!} (0.3827) \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * }
 * }
 * }

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

$$\displaystyle = 0.3827x + 0.4730 + \frac{(x-\frac{3\pi}{8})^{2}}{2!} (-\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{3}}{3!}(-\cos(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{4}}{4!} (\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{5}}{5!} (\cos(\frac{3\pi}{8})) $$ $$\displaystyle + \frac{(x-\frac{3\pi}{8})^{6}}{6!} (-\sin(\frac{3\pi}{8})) $$
 * $$\displaystyle P_6(x) = P_5(x) + \frac{(x-x_0)^{6}}{6!} f^{(6)}(x_0) $$
 * }

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

$$\displaystyle \begin{align} P_6(x) = 0.4730 + 0.3827x + \frac{(x-\frac{3\pi}{8})^{2}}{2!}(-0.9239) + \frac{(x-\frac{3\pi}{8})^{3}}{3!}(-0.3827) + \frac{(x-\frac{3\pi}{8})^{4}}{4!} (0.9239) + \frac{(x-\frac{3\pi}{8})^{5}}{5!} (0.3827) \\+ \frac{(x-\frac{3\pi}{8})^{6}}{6!} (-0.9239)\\ \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * }
 * }
 * }

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

$$\displaystyle = 0.3827x + 0.4730 + \frac{(x-\frac{3\pi}{8})^{2}}{2!} (-\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{3}}{3!}(-\cos(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{4}}{4!} (\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{5}}{5!} (\cos(\frac{3\pi}{8})) $$ $$\displaystyle + \frac{(x-\frac{3\pi}{8})^{6}}{6!} (-\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{7}}{7!} (-\cos(\frac{3\pi}{8})) $$
 * $$\displaystyle P_7(x) = P_6(x) + \frac{(x-x_0)^{7}}{7!} f^{(7)}(x_0) $$
 * }

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

$$\displaystyle \begin{align} P_7(x) = 0.4730 + 0.3827x + \frac{(x-\frac{3\pi}{8})^{2}}{2!}(-0.9239) + \frac{(x-\frac{3\pi}{8})^{3}}{3!}(-0.3827) + \frac{(x-\frac{3\pi}{8})^{4}}{4!} (0.9239) + \frac{(x-\frac{3\pi}{8})^{5}}{5!} (0.3827) \\+ \frac{(x-\frac{3\pi}{8})^{6}}{6!} (-0.9239) \frac{(x-\frac{3\pi}{8})^{7}}{7!} (-0.3827)\\ \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * }
 * }
 * }

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

$$\displaystyle = 0.3827x + 0.4730 + \frac{(x-\frac{3\pi}{8})^{2}}{2!} (-\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{3}}{3!}(-\cos(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{4}}{4!} (\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{5}}{5!} (\cos(\frac{3\pi}{8})) $$ $$\displaystyle + \frac{(x-\frac{3\pi}{8})^{6}}{6!} (-\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{7}}{7!} (-\cos(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{8}}{8!} (\sin(\frac{3\pi}{8})) $$
 * $$\displaystyle P_8(x) = P_7(x) + \frac{(x-x_0)^{8}}{8!} f^{(8)}(x_0) $$
 * }

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

$$\displaystyle \begin{align} P_8(x) = 0.4730 + 0.3827x + \frac{(x-\frac{3\pi}{8})^{2}}{2!}(-0.9239) + \frac{(x-\frac{3\pi}{8})^{3}}{3!}(-0.3827) + \frac{(x-\frac{3\pi}{8})^{4}}{4!} (0.9239) + \frac{(x-\frac{3\pi}{8})^{5}}{5!} (0.3827) \\+ \frac{(x-\frac{3\pi}{8})^{6}}{6!} (-0.9239) \frac{(x-\frac{3\pi}{8})^{7}}{7!} (-0.3827) + \frac{(x-\frac{3\pi}{8})^{8}}{8!} (0.9239)\\ \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * }
 * }
 * }

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

$$\displaystyle = 0.3827x + 0.4730 + \frac{(x-\frac{3\pi}{8})^{2}}{2!} (-\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{3}}{3!}(-\cos(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{4}}{4!} (\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{5}}{5!} (\cos(\frac{3\pi}{8})) $$ $$\displaystyle + \frac{(x-\frac{3\pi}{8})^{6}}{6!} (-\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{7}}{7!} (-\cos(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{8}}{8!} (\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{9}}{9!} (\cos(\frac{3\pi}{8})) $$
 * $$\displaystyle P_9(x) = P_8(x) + \frac{(x-x_0)^{9}}{9!} f^{(9)}(x_0) $$
 * }

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

$$\displaystyle \begin{align} P_9(x) = 0.4730 + 0.3827x + \frac{(x-\frac{3\pi}{8})^{2}}{2!}(-0.9239) + \frac{(x-\frac{3\pi}{8})^{3}}{3!}(-0.3827) + \frac{(x-\frac{3\pi}{8})^{4}}{4!} (0.9239) + \frac{(x-\frac{3\pi}{8})^{5}}{5!} (0.3827) \\+ \frac{(x-\frac{3\pi}{8})^{6}}{6!} (-0.9239) \frac{(x-\frac{3\pi}{8})^{7}}{7!} (-0.3827) + \frac{(x-\frac{3\pi}{8})^{8}}{8!} (0.9239) + \frac{(x-\frac{3\pi}{8})^{9}}{9!} (0.3827)\\ \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * }
 * }
 * }

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

$$\displaystyle = 0.3827x + 0.4730 + \frac{(x-\frac{3\pi}{8})^{2}}{2!} (-\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{3}}{3!}(-\cos(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{4}}{4!} (\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{5}}{5!} (\cos(\frac{3\pi}{8})) $$ $$\displaystyle + \frac{(x-\frac{3\pi}{8})^{6}}{6!} (-\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{7}}{7!} (-\cos(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{8}}{8!} (\sin(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{9}}{9!} (\cos(\frac{3\pi}{8})) + \frac{(x-\frac{3\pi}{8})^{10}}{10!} (-\sin(\frac{3\pi}{8})) $$
 * $$\displaystyle P_{10}(x) = P_9(x) + \frac{(x-x_0)^{10}}{10!} f^{(10)}(x_0) $$
 * }

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

$$\displaystyle \begin{align} P_{10}(x) = 0.4730 + 0.3827x + \frac{(x-\frac{3\pi}{8})^{2}}{2!}(-0.9239) + \frac{(x-\frac{3\pi}{8})^{3}}{3!}(-0.3827) + \frac{(x-\frac{3\pi}{8})^{4}}{4!} (0.9239) + \frac{(x-\frac{3\pi}{8})^{5}}{5!} (0.3827) \\+ \frac{(x-\frac{3\pi}{8})^{6}}{6!} (-0.9239) \frac{(x-\frac{3\pi}{8})^{7}}{7!} (-0.3827) + \frac{(x-\frac{3\pi}{8})^{8}}{8!} (0.9239) + \frac{(x-\frac{3\pi}{9})^{9}}{9!} (0.3827) + \frac{(x-\frac{3\pi}{8})^{10}}{10!} (-0.9239)\\ \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * }
 * }
 * }

2) Plot Taylor series

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

 *  Matlab code:
 * }

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

 Matlab code:
 * (a) Plot f(x) in Taylor series expansion for n=0, 1, and 2
 * }

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

 Matlab code:
 * (b) Plot f(x) in Taylor series expansion for n=3, 4, and 5
 * }

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

 Matlab code:
 * (c) Plot f(x) in Taylor series expansion for n=6, 7, and 8
 * }

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

 Matlab code:
 * (e) Plot sin(x) and f(x) in Taylor series expansion for n=9 and 10
 * }

3)Find/Estimate Max Remainder $$ \left | R_{n+1}(x=\frac{3 \pi\ }{4}) \right \vert $$
$$\begin{align}R_{n+1}(x) \end{align}$$ in eqn.(2.4) is defined as following;

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

 * $$\begin{align} max \bigg| R_1(x) \bigg|=\frac{x-x_0}{1!} = \frac{\frac{3\pi}{4}-\frac{3\pi}{8}}{1!}\end{align}$$
 * }

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

$$\displaystyle max \bigg| R_1(x) \bigg| = 1.1781$$
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

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

 * $$\begin{align} max \bigg| R_2(x) \bigg|=\frac{{x-x_0}^2}{2!} = \frac{(\frac{3\pi}{4}-\frac{3\pi}{8})^2}{2!}\end{align}$$
 * }

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

$$\displaystyle max \bigg| R_2(x) \bigg| = 0.6940$$
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

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

 * $$\begin{align} max \bigg| R_3(x) \bigg|=\frac{{x-x_0}^3}{3!} = \frac{(\frac{3\pi}{4}-\frac{3\pi}{8})^3}{3!}\end{align}$$
 * }

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

$$\displaystyle max \bigg| R_3(x) \bigg| = 0.2725$$
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

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

 * $$\begin{align} max \bigg| R_4(x) \bigg|=\frac{{x-x_0}^4}{4!} = \frac{(\frac{3\pi}{4}-\frac{3\pi}{8})^4}{4!}\end{align}$$
 * }

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

$$\displaystyle max \bigg| R_4(x) \bigg| = 0.0803$$
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

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

 * $$\begin{align} max \bigg| R_5(x) \bigg|=\frac{{x-x_0}^5}{5!} = \frac{(\frac{3\pi}{4}-\frac{3\pi}{8})^5}{5!}\end{align}$$
 * }

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

$$\displaystyle max \bigg| R_5(x) \bigg| = 0.0189$$
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

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

 * $$\begin{align} max \bigg| R_6(x) \bigg|=\frac{{x-x_0}^6}{6!} = \frac{(\frac{3\pi}{4}-\frac{3\pi}{8})^6}{6!}\end{align}$$
 * }

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

$$\displaystyle max \bigg| R_6(x) \bigg| = 0.0037$$
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

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

 * $$\begin{align} max \bigg| R_7(x) \bigg|=\frac{{x-x_0}^7}{7!} = \frac{(\frac{3\pi}{4}-\frac{3\pi}{8})^7}{7!}\end{align}$$
 * }

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

$$\displaystyle max \bigg| R_7(x) \bigg| = 6.2494e-004$$
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

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

 * $$\begin{align} max \bigg| R_8(x) \bigg|=\frac{{x-x_0}^8}{8!} = \frac{(\frac{3\pi}{4}-\frac{3\pi}{8})^8}{8!}\end{align}$$
 * }

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

$$\displaystyle max \bigg| R_8(x) \bigg| = 9.2030e-005$$
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

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

 * $$\begin{align} max \bigg| R_9(x) \bigg|=\frac{{x-x_0}^9}{9!} = \frac{(\frac{3\pi}{4}-\frac{3\pi}{8})^9}{9!}\end{align}$$
 * }

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

$$\displaystyle max \bigg| R_9(x) \bigg| = 1.2047e-005$$
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

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

 * $$\begin{align} max \bigg| R_{10}(x) \bigg|=\frac{{x-x_0}^{10}}{10!} = \frac{(\frac{3\pi}{4}-\frac{3\pi}{8})^{10}}{10!}\end{align}$$
 * }

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

$$\displaystyle max \bigg| R_{10}(x) \bigg| = 1.4192e-006$$
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

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

 * $$\begin{align} max \bigg| R_{11}(x) \bigg|=\frac{{x-x_0}^{11}}{11!} = \frac{(\frac{3\pi}{4}-\frac{3\pi}{8})^{11}}{11!}\end{align}$$
 * }

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

$$\displaystyle max \bigg| R_{11}(x) \bigg| = 1.5200e-007 $$
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

Author

Find
1) Expand $$ e^x \ $$ in Taylor Series up to order n, with remainder $$ R_{n+1}[e^x_ix] $$

2) Find Taylor Series of $$ f(x) \ $$ up to order n, with remainder $$ R_{n+1}[f_{i}x] \ $$ equal to:

1) Expand Taylor series of exponential function $$\begin{align}, e^x \end{align}$$

 * Taylor series expansion of $$\displaystyle f(x) $$ is defined as following, refer eqn.(2.4);

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

$$\begin{align} f_n(x) =\underbrace{P_n(x)}_{\text{Taylor Series}} +\underbrace{R_{n+1}(x)}_{\text{Remainder}} \end{align}$$ where,
 * style="width:95%" |
 * style="width:95%" |
 * }

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

$$\begin{align} P_n(x)= f(x_0) + \frac{{(x-x_0)}^{(n)}}{1!} f^{(1)}(x_0) + ... + \frac{(x-x_0)^{(n)}}{n!} f^{(n)}(x_0) \end{align}$$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * ,and
 * {| style="width:100%" border="0"

$$\begin{align} R_{n+1}(x)=\frac{1}{n!}\int_{x_{0}}^{x}(x-t)^{n}f^{(n+1)}(t)dt=\frac{(x-x_{0})^{n+1}}{(n+1)!}f^{(n+1)}(\xi), \quad \xi\in[x_{0},x] \end{align}$$ (3.5)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

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

By using eqn.(2.4) we can expand $$\begin{align} e^x \end{align}$$ in Taylor series around $$\begin{align} x_0=0 \end{align}$$ ; Derivative of $$\begin{align}e^x\end{align}$$ is its own; $$\begin{align} \frac{d^{n}}{dx^{n}}(e^{x})=e^{x} \end{align}$$ So, by using above property of $$\begin{align}e^x\end{align}$$ and eqn.(3.4) $$\begin{align} P_n(x) \end{align}$$ can obtaine $$\begin{align} P_n(x)=e^{0}+\frac{(x-0)}{1!}e^{0}+\frac{(x-0)^{2}}{2!}e^{0}+\cdots+\frac{(x-0)^{n}}{n!}e^{0} \end{align}$$ $$\begin{align} =P_n(x) = 1 + \frac{x}{1!} + \frac{x^2}{2!} + \cdots + \frac{x^n}{n!} = \sum_{i=0}^{n}\frac{x^i}{i!} \end{align}$$ (3.6)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }
 * From eqn.(3.5), we can also find $$\begin{align} R_{n+1}(x) \end{align}$$.
 * {| style="width:100%" border="0"

$$\begin{align} R_{n+1}(x)=\frac{(x-0)^{n+1}}{(n+1)!}e^{\xi}=\frac{x^{n+1}}{(n+1)!}e^{\xi} \end{align}$$ (3.7)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }
 * Plugging eqn.(3.5) and eqn.(3.6) into eqn(2.4), we can meet Taylor series expansion of $$\displaystyle e^x $$

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

$$\displaystyle \begin{align} e^{x}=P_{n}(x)+R_{n+1}(x)=\sum_{j=0}^{n}\frac{x^{j}}{j!}+\underbrace{\frac{x^{n+1}}{(n+1)!}e^{\xi}}_{R_{n+1}[e^x;x]} {}, \xi\epsilon [0,x] \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |

(3.8)
 *
 * }

2) Expand Taylor series of f(x) $$\begin{align}, f(x)=\frac{e^x-1}{x} \end{align}$$

 * Taylor expansion of $$\begin{align}, f(x)=\frac{e^x-1}{x} \end{align}$$ can be expressed as following;
 * {| style="width:100%" border="0"

$$\begin{align} f(x) = \frac{e^x-1}{x} = \frac{1}{x}(e^{x}-1)=\frac{1}{x}(\cancel{1}+\underbrace{\frac{x}{1!}+\frac{x^2}{2!}+\cdots+\frac{x^n}{n!}}_{P_n(x)}+\underbrace{\frac{x^{n+1}}{(n+1)!}e^{\xi}}_{R_{n+1}} { } \cancel{-1}) \end{align}$$ $$\begin{align} = \cancel{\frac{1}{x}} \sum_{i=1}^{n}\frac{x^ {\cancelto{i-1}{i}} }{i!}+\frac{x^ {\cancelto{n}{n+1}} }{\cancel{x}(n+1)!} e^{\xi} = \sum_{i=1}^{n}\frac{x^ {i-1} }{i!}+\frac{x^{n}}{(n+1)!} e^{\xi} \end{align}$$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * Thus,

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

$$\displaystyle \begin{align} f(x) = \frac{e^x-1}{x}=P_{n}(x)+R_{n+1}(x)=\sum_{j=0}^{n}\frac{x^{j-1}}{j!}+\underbrace{\frac{x^{n}}{(n+1)!}e^{\xi}}_{R_{n+1}[f(x);x]} {}, \xi\epsilon [0,x] \end{align} $$      (3.9)
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 *
 *
 * }

 * Furthermore, we can confirm equation [[media:Egm6341.s11.mtg7.pdf|(2)p.7-1]] using eqn.(3.8) and eqn.(3.9);
 * {| style="width:100%" border="0"

From eqn.(3.8), we can find $$\begin{align}R_n[e^x;x]\end{align}$$ $$\begin{align} R_n[e^x;x]=\frac{(x-0)^n}{n!}e^{\xi} {},{} \xi \epsilon [0,x] \end{align}$$ ,and we confirmed $$\begin{align} R_{n+1}[f(x)=\frac{e^x-1}{x};x] \end{align}$$ from eqn.(3.9); $$\begin{align} R_{n+1}[f;x] = \frac{x^{n}}{(n+1)!}e^{\xi} {},{} \xi \epsilon [0,x] \end{align}$$ $$\begin{align} f(x)-f_n(x)=R_{n+1}(x)=\frac{x^{n}}{(n+1)!}e^{\xi} = \underbrace{\frac{(x)^n}{n!}e^{\xi}}_{R_n[e^x;x]}\frac{1}{n+1} \end{align}$$ $$\begin{align} \Rightarrow R_{n+1}[f;x]=\frac{R_n[e^x;x]}{n+1} \end{align}$$
 * style="width:95%" |
 * style="width:95%" |
 * }

Find
Consider $$ n=1,2,4,8,16 \ $$.

Construct $$ f_n(x) \ $$ as shown in Eq12.2.

Plot $$ f,f_n,n=1,2,4,8,16 \ $$

Compute $$ I_n= \int_{a}^{b} f_n(x)\, dx $$ for $$ n=1,2,4,8 \ $$  and compare to $$ I \ $$ (use Wolfram Alpha with more digits)

Plot $$ l_0,l_1,l_2 \ $$ for $$ n=5 \ $$

How would $$ l_3,l_4 \ $$ look?

Solution
1) Construct $$ f_n(x) \ $$ as shown in Eq12.2. (a) $$\displaystyle n=1 $$

 * $$\displaystyle x_0=-1,\quad x_1=1 $$

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

\begin{align} f_1(x) &= P_1(x)\\ &=\sum_{i=0}^{1} l_{i,1}(x)f(x_i)\\ &=l_{0,1}(x)f(x_0)+l_{1,1}f(x_1) \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }

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

\begin{align} l_{0,1}(x)&=\frac{(x-x_1)}{(x_0-x_1)}=\frac{x-1}{-2}, \quad f(x_0)=f(-1)=1-e^{-1} \\ l_{1,1}(x)&=\frac{(x-x_0)}{(x_1-x_0)}=\frac{x+1}{2}, \quad f(x_1)=f(1)=e-1 \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }

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

$$\displaystyle \begin{align} f_1(x)&=p_1(x)\\ &=(\frac{x-1}{-2})(1-e^{-1}) + (\frac{x+1}{2})(e-1)\\ \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = | (12.3)
 * }
 * }

(b) $$\displaystyle n=2 $$
 * $$\displaystyle x_0=-1,\quad x_1=0,\quad x_2=1 $$
 * {| style="width:100%" border="0" align="left"

\begin{align} f_2(x) &= P_2(x)\\ &=\sum_{i=0}^{2} l_{i,2}(x)f(x_i)\\ &=l_{0,2}(x)f(x_0)+l_{1,2}f(x_1)+l_{2,2}f(x_2)\\ \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * Where
 * $$\displaystyle

\begin{align} l_{0,2}(x)&=\frac{(x-x_1)}{(x_0-x_1)}\frac{(x-x_2)}{(x_0-x_2)}=\frac{x(x-1)}{2}, &&f(x_0)=f(-1)=1-e^{-1} \\ l_{1,2}(x)&=\frac{(x-x_0)}{(x_1-x_0)}\frac{(x-x_2)}{(x_1-x_2)}=\frac{(x+1)(x-1)}{-1}, && f(x_1)=f(0)=1 \\ l_{2,2}(x)&=\frac{(x-x_0)}{(x_2-x_0)}\frac{(x-x_1)}{(x_2-x_1)}=\frac{(x+1)x}{2}, && f(x_1)=f(1)=e+1 \end{align} $$
 * Thus,

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

$$\displaystyle \begin{align} f_2(x)&=P_2(x)\\ &=( \frac{x(x-1)}{2} )(1-e^{-1}) + (\frac{(x+1)(x-1)}{-1})(1) + (\frac{(x+1)x}{2})(e+1)\\ \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = | (12.4)
 * }
 * }

(c)$$\displaystyle n=4 $$
 * $$\displaystyle

x_0=-1,\quad x_1=-\frac{1}{2}, \quad x_2=0, \quad x_3=\frac{1}{2}, \quad x_4=1 $$

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

\begin{align} f_4(x)&=P_4(x)\\ &=\sum_{i=0}^{4}l_{i,4}(x)f(x_{i})\\ &=l_{0,4}(x)f(x_{0})+l_{1,4}(x)f(x_{1})+l_{2,4}(x)f(x_{2})+l_{3,4}(x)f(x_{3})+l_{4,4}(x)f(x_{4}) \end{align}$$
 * $$\displaystyle
 * $$\displaystyle
 * }

 * Where,
 * $$\displaystyle

\begin{align} l_{0,4}&=\frac{(x+\frac{1}{2})(x-0)(x-\frac{1}{2})(x-1)}{(-1+\frac{1}{2})(-1-0)(-1-\frac{1}{2})(-1-1)}, &&f(x_{0})=f(-1)=1-e^{-1} \\ l_{1,4}&=\frac{(x+1)(x-0)(x-\frac{1}{2})(x-1)}{(-\frac{1}{2}+1)(-\frac{1}{2}-0)(-\frac{1}{2}-\frac{1}{2})(-\frac{1}{2}-1)}, &&f(x_{1})=f(-\frac{1}{2})=\frac{e^{-\frac{1}{2}}-1}{-\frac{1}{2}} \\ l_{2,4}&=\frac{(x+1)(x+\frac{1}{2})(x-\frac{1}{2})(x-1)}{(0+1)(0+\frac{1}{2})(0-\frac{1}{2})(0-1)}, &&f(x_{2})=f(0)=1 \\ l_{3,4}&=\frac{(x+1)(x+\frac{1}{2})(x-0)(x-1)}{(\frac{1}{2}+1)(\frac{1}{2}+\frac{1}{2})(\frac{1}{2}-0)(-\frac{1}{2}-1)}, &&f(x_{3})=f(\frac{1}{2})=\frac{e^{\frac{1}{2}}-1}{\frac{1}{2}} \\ l_{4,4}&=\frac{(x+1)(x+\frac{1}{2})(x-0)(x-\frac{1}{2})}{(-1+1)(-1+\frac{1}{2})(-1-0)(-1-\frac{1}{2})}, &&f(x_{4})=f(1)=e^{1}-1 \\ \end{align} $$

 * Thus,

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

$$\displaystyle \begin{align} f_4(x) =& P_4(x)\\ =&(\frac{(x+\frac{1}{2})(x-0)(x-\frac{1}{2})(x-1)}{(-1+\frac{1}{2})(-1-0)(-1-\frac{1}{2})(-1-1)}) (1-e^{-1}) +(\frac{(x+1)(x-0)(x-\frac{1}{2})(x-1)}{(-\frac{1}{2}+1)(-\frac{1}{2}-0)(-\frac{1}{2}-\frac{1}{2})(-\frac{1}{2}-1)})(\frac{e^{-\frac{1}{2}}-1}{-\frac{1}{2}})\\ &+(\frac{(x+1)(x+\frac{1}{2})(x-\frac{1}{2})(x-1)}{(0+1)(0+\frac{1}{2})(0-\frac{1}{2})(0-1)})(1) +(\frac{(x+1)(x+\frac{1}{2})(x-0)(x-1)}{(\frac{1}{2}+1)(\frac{1}{2}+\frac{1}{2})(\frac{1}{2}-0)(-\frac{1}{2}-1)})(\frac{e^{\frac{1}{2}}-1}{\frac{1}{2}})\\ &+(\frac{(x+1)(x+\frac{1}{2})(x-0)(x-\frac{1}{2})}{(-1+1)(-1+\frac{1}{2})(-1-0)(-1-\frac{1}{2})})(e^{1}-1)\\ \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = | (12.5)
 * }
 * }

(d) $$\displaystyle n=8 $$
 * $$\displaystyle

x_0=-1,\quad x_1=-\frac{3}{4},\quad x_2=-\frac{1}{2},\quad x_3=-\frac{1}{4},\quad x_4=0,\quad x_5=\frac{1}{4},\quad x_6=\frac{1}{2},\quad x_7=\frac{3}{4}, \quad x_8=1 $$
 * {| style="width:100%" border="0" align="left"

\begin{align} f_8(x)=P_8(x)=\sum_{i=0}^{8}l_{i,8}(x)f(x_{i})&=l_{0,8}(x)f(x_{0})+l_{1,8}(x)f(x_{1})+l_{2,8}(x)f(x_{2})+l_{3,8}(x)f(x_{3})\\ &+l_{4,8}(x)f(x_{4})+l_{5,8}(x)f(x_{5})+l_{6,8}(x)f(x_{6}) + l_{7,8}(x)f(x_{7})+l_{8,8}(x)f(x_{8}) \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }

 * where,
 * $$\displaystyle

\begin{align} l_{0,8}&=\frac{(x+\frac{3}{4})(x+\frac{1}{2})(x+\frac{1}{4})(x-0)(x-\frac{1}{4})(x-\frac{1}{2})(x-\frac{1}{4})(x-\frac{3}{4})(x-1)}{(-1+\frac{3}{4})(-1+\frac{1}{2})(-1+\frac{1}{4})(-1-0)(-1-\frac{1}{4})(-1-\frac{1}{2})(-1-\frac{3}{4})(-1-1)}, \quad f(x_{0})=f(-1)=1-e^{-1} \\ l_{1,8}&=\frac{(x+1)(x+\frac{1}{2})(x+\frac{1}{4})(x-0)(x-\frac{1}{4})(x-\frac{1}{2})(x-\frac{1}{4})(x-\frac{3}{4})(x-1)}{(-\frac{3}{4}+1)(-\frac{3}{4}+\frac{1}{2})(-\frac{3}{4}+\frac{1}{4})(-\frac{3}{4}-0)(-\frac{3}{4}-\frac{1}{4})(-\frac{3}{4}-\frac{1}{2})(-\frac{3}{4}-\frac{3}{4})(-\frac{3}{4}-1)}, \quad f(x_{1})=f(-\frac{3}{4})==\frac{e^{-\frac{3}{4}}-1}{-\frac{3}{4}} \\ l_{2,8}&=\frac{(x+1)(x+\frac{3}{4})(x+\frac{1}{4})(x-0)(x-\frac{1}{4})(x-\frac{1}{2})(x-\frac{1}{4})(x-\frac{3}{4})(x-1)}{(-\frac{1}{2}+1)(-\frac{1}{2}+\frac{3}{4})(-\frac{1}{2}+\frac{1}{4})(-\frac{1}{2}-0)(-\frac{1}{2}-\frac{1}{4})(-\frac{1}{2}-\frac{1}{2})(-\frac{1}{2}-\frac{3}{4})(-\frac{1}{2}-1)}, \quad f(x_{2})=f(-\frac{1}{2})=\frac{e^{-\frac{1}{2}}-1}{-\frac{1}{2}} \\ l_{3,8}&=\frac{(x+1)(x+\frac{3}{4})(x+\frac{1}{2})(x-0)(x-\frac{1}{4})(x-\frac{1}{2})(x-\frac{1}{4})(x-\frac{3}{4})(x-1)}{(-\frac{1}{4}+1)(-\frac{1}{4}+\frac{3}{4})(-\frac{1}{4}+\frac{1}{2})(-\frac{1}{4}-0)(-\frac{1}{4}-\frac{1}{4})(-\frac{1}{4}-\frac{1}{2})(-\frac{1}{4}-\frac{3}{4})(-\frac{1}{4}-1)}, \quad f(x_{2})=f(-\frac{1}{4})=\frac{e^{-\frac{1}{4}}-1}{-\frac{1}{4}} \\ l_{4,8}&=\frac{(x+1)(x+\frac{3}{4})(x+\frac{1}{2})(x+\frac{1}{4})(x-\frac{1}{4})(x-\frac{1}{2})(x-\frac{3}{4})(x-1)}{(0+1)(0+\frac{3}{4})(0+\frac{1}{2})(0+\frac{1}{4})(0-\frac{1}{4})(0-\frac{1}{2})(0-\frac{3}{4})(0-1)}, \quad f(x_{4})=f(0)=1 \\ l_{5,8}&=\frac{(x+1)(x+\frac{3}{4})(x+\frac{1}{2})(x+\frac{1}{4})(x-0)(x-\frac{1}{2})(x-\frac{3}{4})(x-1)}{(\frac{1}{4}+1)(\frac{1}{4}+\frac{3}{4})(\frac{1}{4}+\frac{1}{2})(\frac{1}{4}+\frac{1}{4})(\frac{1}{4}-0)(\frac{1}{4}-\frac{1}{2})(\frac{1}{4}-\frac{3}{4})(\frac{1}{4}-1)}, \quad f(x_{5})=f(\frac{1}{4})=\frac{e^{\frac{1}{4}}-1}{\frac{1}{4}} \\ l_{6,8}&=\frac{(x+1)(x+\frac{3}{4})(x+\frac{1}{2})(x+\frac{1}{4})(x-0)(x-\frac{1}{4})(x-\frac{3}{4})(x-1)}{(\frac{1}{2}+1)(\frac{1}{2}+\frac{3}{4})(\frac{1}{2}+\frac{1}{2})(\frac{1}{2}+\frac{1}{4})(\frac{1}{2}-0)(\frac{1}{2}-\frac{1}{4})(\frac{1}{2}-\frac{3}{4})(\frac{1}{2}-1)}, \quad f(x_{6})=f(\frac{1}{2})=\frac{e^{\frac{1}{2}}-1}{\frac{1}{2}} \\ l_{7,8}&=\frac{(x+1)(x+\frac{3}{4})(x+\frac{1}{2})(x+\frac{1}{4})(x-0)(x-\frac{1}{2})(x-\frac{1}{4})(x-1)}{(\frac{3}{4}+1)(\frac{3}{4}+\frac{3}{4})(\frac{3}{4}+\frac{1}{2})(\frac{3}{4}+\frac{1}{4})(\frac{3}{4}-0)(\frac{3}{4}-\frac{1}{4})(\frac{3}{4}-\frac{1}{2})(\frac{3}{4}-1)}, \quad f(x_{7})=f(\frac{3}{4})=\frac{e^{\frac{3}{4}}-1}{\frac{3}{4}} \\ l_{8,8}&=\frac{(x+1)(x+\frac{3}{4})(x+\frac{1}{2})(x+\frac{1}{4})(x-0)(x-\frac{1}{2})(x-\frac{1}{4})(x-\frac{3}{4})}{(1+1)(1+\frac{3}{4})(1+\frac{1}{2})(1+\frac{1}{4})(1-0)(1-\frac{1}{4})(1-\frac{1}{2})(1-\frac{3}{4})}, \quad f(x_{8})=f(1)=\frac{e-1}{1} \\ \end{align} $$

 * Thus,

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

$$\displaystyle \begin{align} f_8(x)=&(\frac{(x+\frac{3}{4})(x+\frac{1}{2})(x+\frac{1}{4})(x-0)(x-\frac{1}{4})(x-\frac{1}{2})(x-\frac{1}{4})(x-\frac{3}{4})(x-1)}{(-1+\frac{3}{4})(-1+\frac{1}{2})(-1+\frac{1}{4})(-1-0)(-1-\frac{1}{4})(-1-\frac{1}{2})(-1-\frac{3}{4})(-1-1)}) (1-e^{-1}) \\ &+(\frac{(x+1)(x+\frac{1}{2})(x+\frac{1}{4})(x-0)(x-\frac{1}{4})(x-\frac{1}{2})(x-\frac{1}{4})(x-\frac{3}{4})(x-1)}{(-\frac{3}{4}+1)(-\frac{3}{4}+\frac{1}{2})(-\frac{3}{4}+\frac{1}{4})(-\frac{3}{4}-0)(-\frac{3}{4}-\frac{1}{4})(-\frac{3}{4}-\frac{1}{2})(-\frac{3}{4}-\frac{3}{4})(-\frac{3}{4}-1)}) (\frac{e^{-\frac{3}{4}}-1}{-\frac{3}{4}})\\ &+(\frac{(x+1)(x+\frac{3}{4})(x+\frac{1}{4})(x-0)(x-\frac{1}{4})(x-\frac{1}{2})(x-\frac{1}{4})(x-\frac{3}{4})(x-1)}{(-\frac{1}{2}+1)(-\frac{1}{2}+\frac{3}{4})(-\frac{1}{2}+\frac{1}{4})(-\frac{1}{2}-0)(-\frac{1}{2}-\frac{1}{4})(-\frac{1}{2}-\frac{1}{2})(-\frac{1}{2}-\frac{3}{4})(-\frac{1}{2}-1)}) (\frac{e^{-\frac{1}{2}}-1}{-\frac{1}{2}} )\\ &+(\frac{(x+1)(x+\frac{3}{4})(x+\frac{1}{2})(x-0)(x-\frac{1}{4})(x-\frac{1}{2})(x-\frac{1}{4})(x-\frac{3}{4})(x-1)}{(-\frac{1}{4}+1)(-\frac{1}{4}+\frac{3}{4})(-\frac{1}{4}+\frac{1}{2})(-\frac{1}{4}-0)(-\frac{1}{4}-\frac{1}{4})(-\frac{1}{4}-\frac{1}{2})(-\frac{1}{4}-\frac{3}{4})(-\frac{1}{4}-1)}) (\frac{e^{-\frac{1}{4}}-1}{-\frac{1}{4}})\\ &+(\frac{(x+1)(x+\frac{3}{4})(x+\frac{1}{2})(x+\frac{1}{4})(x-\frac{1}{4})(x-\frac{1}{2})(x-\frac{3}{4})(x-1)}{(0+1)(0+\frac{3}{4})(0+\frac{1}{2})(0+\frac{1}{4})(0-\frac{1}{4})(0-\frac{1}{2})(0-\frac{3}{4})(0-1)}) (1)\\ &+(\frac{(x+1)(x+\frac{3}{4})(x+\frac{1}{2})(x+\frac{1}{4})(x-0)(x-\frac{1}{2})(x-\frac{3}{4})(x-1)}{(\frac{1}{4}+1)(\frac{1}{4}+\frac{3}{4})(\frac{1}{4}+\frac{1}{2})(\frac{1}{4}+\frac{1}{4})(\frac{1}{4}-0)(\frac{1}{4}-\frac{1}{2})(\frac{1}{4}-\frac{3}{4})(\frac{1}{4}-1)}) (\frac{e^{\frac{1}{4}}-1}{\frac{1}{4}})\\ &+(\frac{(x+1)(x+\frac{3}{4})(x+\frac{1}{2})(x+\frac{1}{4})(x-0)(x-\frac{1}{4})(x-\frac{3}{4})(x-1)}{(\frac{1}{2}+1)(\frac{1}{2}+\frac{3}{4})(\frac{1}{2}+\frac{1}{2})(\frac{1}{2}+\frac{1}{4})(\frac{1}{2}-0)(\frac{1}{2}-\frac{1}{4})(\frac{1}{2}-\frac{3}{4})(\frac{1}{2}-1)}) (\frac{e^{\frac{1}{2}}-1}{\frac{1}{2}})\\ &+(\frac{(x+1)(x+\frac{3}{4})(x+\frac{1}{2})(x+\frac{1}{4})(x-0)(x-\frac{1}{2})(x-\frac{1}{4})(x-1)}{(\frac{3}{4}+1)(\frac{3}{4}+\frac{3}{4})(\frac{3}{4}+\frac{1}{2})(\frac{3}{4}+\frac{1}{4})(\frac{3}{4}-0)(\frac{3}{4}-\frac{1}{4})(\frac{3}{4}-\frac{1}{2})(\frac{3}{4}-1)}) (\frac{e^{\frac{3}{4}}-1}{\frac{3}{4}})\\ &+(\frac{(x+1)(x+\frac{3}{4})(x+\frac{1}{2})(x+\frac{1}{4})(x-0)(x-\frac{1}{2})(x-\frac{1}{4})(x-\frac{3}{4})}{(1+1)(1+\frac{3}{4})(1+\frac{1}{2})(1+\frac{1}{4})(1-0)(1-\frac{1}{4})(1-\frac{1}{2})(1-\frac{3}{4})}) (\frac{e-1}{1})\\ \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = | (12.6)
 * }
 * }

(e) $$\displaystyle n=16 $$
 * $$\displaystyle

\begin{align} x_0&=-1,\quad x_1=-\frac{7}{8},\quad x_2=-\frac{3}{4},\quad x_3=-\frac{5}{8}, \cdots ,\quad x_{15}=\frac{7}{8},\quad x_{16}=1 \end{align} $$
 * {| style="width:100%" border="0" align="left"

\begin{align} f_{16}(x)=P_{16}(x)=\sum_{i=0}^{16}l_{i,16}(x)f(x_{i})&=l_{0,16}(x)f(x_{0}) + l_{1,16}(x)f(x_{1}) + l_{2,16}(x)f(x_{2})+l_{3,16}(x)f(x_{3})\\ &+ l_{4,16}(x)f(x_{4}) + l_{5,16}(x)f(x_{5}) + l_{6,16}(x)f(x_{6}) + l_{7,16}(x)f(x_{7}) + l_{8,16}(x)f(x_{8})+l_{9,16}(x)f(x_{9})\\ &+l_{10,16}(x)f(x_{10}) + l_{11,16}(x)f(x_{11}) + l_{12,16}(x)f(x_{12}) + l_{13,16}(x)f(x_{13})+l_{14,16}(x)f(x_{14})\\ &+l_{15,16}(x)f(x_{15}) + l_{16,16}(x)f(x_{16}) \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * $$\displaystyle

\begin{align} l_{0,16}&=\prod_{j=0}^{16}\frac{x-x_{j}}{x_{0}-x_{j}}, \quad f(x_{0})=f(-1)=\frac{e^{-1}-1}{-1} \\ l_{1,16}&=\prod_{j=0}^{16}\frac{x-x_{j}}{x_{1}-x_{j}}, \quad f(x_{1})=f(-\frac{7}{8})=\frac{e^{-\frac{7}{8}}-1}{-\frac{7}{8}}\\ & \vdots \\ l_{16,16}&=\prod_{j=0}^{16}\frac{x-x_{j}}{x_{16}-x_{j}}, \quad f(x_{16})=f(1)=\frac{e-1}{1} \end{align} $$ Thus,

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

$$\displaystyle \begin{align} f_{16}(x)=&(\prod_{j=0}^{16}\frac{x-x_{j}}{x_{0}-x_{j}})(\frac{e^{-1}-1}{-1}) + (\prod_{j=0}^{16}\frac{x-x_{j}}{x_{1}-x_{j}}) (\frac{e^{-\frac{7}{8}}-1}{-\frac{7}{8}}) + \cdots + (\prod_{j=0}^{16}\frac{x-x_{j}}{x_{16}-x_{j}}) (\frac{e-1}{1}) \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = | (12.7)
 * }
 * }

2) Compute $$ I_n= \int_{a}^{b} f_n(x)\, dx $$ for $$ n=1,2,4,8 $$

3) Plot $$ l_0,l_1,l_2 \ $$ for $$ n=5 \ $$

matlab
Matlab generated LIET plot for n={1,2,4,8,16}

Matlab generated Lagrange-Interpolation for n={1,2,4,8,16}

When n=1 When n=2 When n=4 When n=8 When n=16

title: User:EGM6341.s11.TEAM1.Sujin.HW2


text:
Talk:SPIR608 Political Simulations and Gaming/2011/Week 1

Evaluation
Initial Evaluation forms were circulated:

Name: …........................................ This evaluation process is designed to help us better understand the role Wikiversity plays on this course. It does not effect your assessment. We want you to identify yourself so that we can see how involved you become in Wikiversity and related projects.

Please indicate what experience you have had editing media-wikis:

Summary of responses:
From 17 respondents:

Wikiversity Guidance
Create an account and register for course: Remember: Check your talk page and use talk pages to keep in touch Use double square brackets for page name, e.g. Topic:Board game design Any page with a general name can be edited by anyone, but if you start a page “user:your username/****” should not be disturbed by other people. There are a range of pages with information useful to you: “Game Creation Guidelines”, “Game mechanics” etc. Some pages are just good ideas – i.e. they are blank. Feel free to add and develop pages. If you are unsure, each page has a discussion area which you can use. If you make a mistake it can be rectified. Start with straightforward editing. If you want to know how more complex editing is done, look at the source text by clicking “edit”. You can cut and paste material, changing the relevant words, even if you do not understand all the principles involved.
 * 1) Click on create account at top right corner
 * 2) Create an account with a username of your choice
 * 3) Put “SPIR608 Political Simulation and Gaming/2011” in search
 * 4) Go to bottom of page  and look for Wikiversity course registration
 * 5) Click “Edit” to the right of “Wikiversity course registration”
 * 6) Insert link to your User page as *user:“your username” beneath other usernames
 * 7) Click “Save page” beneath edit box.
 * 8) A link to your user page should now exist: click on link
 * 9) You should now see your user page. Click on “edit” at top right of page
 * 10) Add whatever information about yourself you would to make available to browsers
 * 11) Add user:“your username”/SPIR608 : this creates a page for course notes.
 * 12) If you need help, please leave questions at “User talk:Leutha”

Some people find it intuitive, other people find it more tricky. You only need develop the basic skills to meet the course requirements, but it is also an opportunity to develop wiki-skills. Remember, above all enjoy!

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
TESOL/Perceiver and perceived

In English, a word may describe how the speaker is perceived by others, or the impression that others have of the speaker, but not both.

Endings
In English, words that describe our impression of something outside of us often end in -ed, and words that describe the impression we make on other people often end in -ing.

Other examples
Other words follow no particular pattern in their spelling.

 * That test is hard. I am hard.
 * My job is stressful. I am stressful.

Quiz
{That is a - explanation. + confusing - confused
 * type=""}

{When I go to a concert I am -. - exciting + excited
 * type=""}

{Yesterday I was very - when I saw the news. + interested - interesting
 * type=""}

title: TESOL/Perceiver and perceived


text:
User:Yongtao-Li/HW1.4

=Problem 1.4=

Find
Plot f, g and find $$ {\left\| f \right\|_\infty } {\left\| g \right\|_\infty } {\left\| {f - g} \right\|_\infty }$$

Given
$$ f(x) = 3x + 5{x^3},x \in [0,1]; g(x) = \sinh x,x \in [0,1] $$

Solution
Because

$$ {f^'}(x) = 3 + 15{x^2} > 0,\;\;x \in [0,1], {g^'}(x) = {(\sinh x)^'} = {(\frac{2})^'} = \frac{2} > 0,\;\;x \in [0,1] {\left( {f(x) - g(x)} \right)^'} = 3 + 15{x^2} - \cosh x > 0,\;\;x \in [0,1] $$

Which means that f(x) keeps increasing at [0,1], and g(x) and f(x)-g(x) as well

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

$$ {\left\| f \right\|_\infty } = \max \left| {f(x)} \right| = {\left. {\left| {f(x)} \right|} \right|_{x = 1}} = 8 $$     (4-1)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

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

$$ {\left\| g \right\|_\infty } = \max \left| {g(x)} \right| = {\left. {\left| {g(x)} \right|} \right|_{x = 1}} = \frac{1}{2}(e - \frac{1}{e}) \approx 1.71520 $$     (4-2)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

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

$$ {\left\| {f - g} \right\|_\infty } = \max \left| {f(x) - g(x)} \right| = {\left. {\left| {f(x) - g(x)} \right|} \right|_{x = 1}} = 8 - \frac{1}{2}(e - \frac{1}{e}) \approx 6.82479 $$     (4-3)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

Using the following Fortran code

program main real,allocatable::x,f,g integer::i,n real::e=2.71828 open (unit=10, file="input", status="old") read(10,*)n allocate(x(n+1),f(n+1),g(n+1)) do i=1,n+1 x(i)=-1.0+2.0/n*(i-1) f(i)=3.0*x(i)+5*x(i)**3 g(i)=0.5*(e**x(i)-e**(-1.0*x(i))) end do  open (unit=11, file="hw1.4.plt", status="replace") do i=1,n+1 write(11,"(3F12.4)") x(i),f(i),g(i) end do   end program main

We can easily get the image of f(x) and g(x) as following

title: User:Yongtao-Li/HW1.4


text:
User:Yongtao-Li/HW2.2

=Problem 2.2: "MOTIVATION OF WRF"=

Given
$$ \{ {{\mathbf{b}}_i},i = 1, \cdot \cdot  \cdot ,n\} $$ are basis vectors for $$ {{\mathbf{R}}^n} $$ which are not necessarily orthonormal.

In order to find $$ \{ {{\mathbf{v}}_i} \} $$ s.t. $$ {\mathbf{v}} = \sum\limits_{i = 1}^n $$ , we consider $$ \{ {{\mathbf{a}}_i},i = 1, \cdot \cdot  \cdot ,n\} $$ are orthonormal basis in Cartesian coordinates, and $$ {{\mathbf{b}}_j} = b{_{jk}}{{\mathbf{a}}_k} $$ , $$ {{\mathbf{v}}=5{{\mathbf{a}}_1}-7{{\mathbf{a}}_2}-4{{\mathbf{a}}_3}} $$

where $$ \left[ \right] = \left[ {\begin{array}{ccccccccccccccc} 1&1&1 \\ 2&{ - 1}&3 \\  3&2&6 \end{array}} \right] $$

Find
A) Find $$ \det \left[ \right] $$

B) Find $$ \det \Gamma $$ where $$ {\mathbf{\Gamma }} = \left\{ \right\} = {\mathbf{K}} $$

C) Find $$ {\mathbf{F}} = \left\{ \right\} = \left\{ {{{\mathbf{b}}_{\mathbf{i}}} \cdot {\mathbf{v}}} \right\}$$

D) Solve equation (5) P7-2 for $$ {\mathbf{d}} = \left\{ \right\} $$

E) Use equation (1) P7-4 to find $$ \overline {\mathbf{K}} {\mathbf{d} = \overline {\mathbf{F}} }$$ and what is $$ \overline {\mathbf{K}}, \overline {\mathbf{F}} $$

F) Solve for $$ {\mathbf{d}}$$ and compare of $$ {\mathbf{K}}$$ and $$ \overline {\mathbf{K}} $$

G) Observe symmetric properties of $$ {\mathbf{K}}$$ and $$ \overline {\mathbf{K}} $$ and discuss pros and cons of these two methods

Solution
A) The determinant of $$ \left[ \right] $$ is as following:

B) Write $$ \left[ \Gamma \right] = \left[ K \right] $$ in matrix form:

Then the determinant is as following

C) Write $$ \left[ K \right] $$ in matrix form:

D) Use equation (5) P7-2 and write it in matrix form:

$$ \left[ {\begin{array}{ccccccccccccccc} 3&4&{11} \\ 4&{14}&{22} \\  {11}&{22}&{49} \end{array}} \right] \times \left[ d \right] = \left[ {\begin{array}{ccccccccccccccc} { - 6} \\ 5 \\  { - 23} \end{array}} \right] $$

Multiply the above equation with the inverse of matrix K, we can get d in matrix form:

E) Consider $$ {w_i} = {a_i},i = 1, \cdot \cdot  \cdot ,n $$ and follow the steps above, it is easy to get K and F in matrix form:

F) Similar with step D, we can get d in matrix form:

G)Both $$ {\mathbf{K}}$$ and $$ \overline {\mathbf{K}} $$ are symmetric matrix. However $$ \overline {\mathbf{K}} $$ will be symmetric only if the basis are orthonormal otherwise not and $$ {\mathbf{K}}$$ will always be symmetric matrix.

Bubnov-Galerkin method is more difficult to compute, but can choose arbitrary vector to find the answer.

Petrov-Galerkin method is easy to use, but have no find orthonormal vectors which sometimes difficult in specific problems.

title: User:Yongtao-Li/HW2.2


text:
User:Eml5526.s11.team6.deshpande/hwk2

=Problem 2.1= = Conductive Bar PDE, Dynamic situation.=

Find
For the heat problem, derive the following partial differential equation by performing a balance of heat:

$$ \frac{\partial}{\partial x}\left [ A(x)k(x)\frac{\partial u}{\partial x} \right ]+f(x,t)=A(x) \rho(x)c\cdot \frac{\partial u}{\partial t}\ $$

Solution
Consider the FBD of an infinitesimally small section of length dx of the 1-D conductive bar with varying material properties at a distance x from the origin. Where, A(x) - Varying cross section of the bar, k(x) - conductivity of the material, rho (x) - Mass density, u - Temperature constrained only to x- axis (1-D bar), t - Time.

Where, heat flux at $$\displaystyle x=q(x)$$,

heat flux at $$\displaystyle x+dx=q(x+dx)$$

outward heat flow through A(x)=Q(x), at n(x)=-1,

$$\displaystyle Q(x)=q(x)A(x)n(x)= -q(x)A(x)$$ $$\displaystyle (Eq. 2.1.1) $$

Similarly, outward heat flow through $$\displaystyle A(x+dx)=Q(x+dx), at n(x+dx)=1,$$

$$\displaystyle Q(x+dx)=q(x+dx)A(x+dx)n(x+dx)= q(x+dx)A(x+dx) $$ $$\displaystyle (Eq. 2.1.2) $$

Also, internal heat source per unit volume= r(x,t)

Hence, heat source per unit length= r(x,t)A(x) = f(x,t) $$\displaystyle (Eq. 2.1.3) $$

Now, balance of heat can be done as follows:

$$\displaystyle H_{1}= $$heat flow in control volume

$$\displaystyle =-[Q(x)+Q(x+dx)]$$

$$\displaystyle =-[-q(x)A(x)+q(x+dx)A(x+dx)]$$ $$\displaystyle (Eq. 2.1.4) $$

$$\displaystyle H_{2}= $$Heat by internal source r(x,t) $$\displaystyle =f(x,t)dx$$$$\displaystyle (Eq. 2.1.5) $$

$$\displaystyle H_{3}= $$heat by temperature difference $$\displaystyle=\;\; A(x)\rho (x)c\cdot\frac{\partial u}{\partial t}$$$$\displaystyle (Eq. 2.1.6) $$

Now, for balance of heat

$$\displaystyle H_{1}+H_{2}=H_{3}$$$$\displaystyle (Eq. 2.1.7) $$

Therefore, from $$\displaystyle (Eq. 2.1.4) $$, $$\displaystyle (Eq. 2.1.5) $$,  $$\displaystyle (Eq. 2.1.6) $$,  $$\displaystyle (Eq. 2.1.7) $$ we can write,

$$\displaystyle q(x)A(x)-q(x+dx)A(x+dx)+f(x,t)dx=\;\; A(x)\rho (x)c\cdot\frac{\partial u}{\partial t}$$$$\displaystyle (Eq. 2.1.8) $$

put equations $$\displaystyle (Eq. 2.1.1) $$ and $$\displaystyle (Eq. 2.1.2) $$ in $$\displaystyle (Eq. 2.1.8) $$

$$\displaystyle Q(x,t)-Q(x+dx,t)+f(x,t)dx=\;\; A(x)\rho (x)c\cdot\frac{\partial u}{\partial t}$$

Including Taylor series expansion for $$Q(x+dx,t)$$ and neglecting the higher order terms (h.o.t) yields:

$$ \cancel {Q(x,t)}-[\cancel {Q(x,t)}+\frac {\partial }{\partial x}(Q(x,t))+(h.o.t)]+f(x,t)=\;\; A(x)\rho (x)c\cdot\frac{\partial u}{\partial t}$$

Hence, $$ -\frac {\partial }{\partial x}(Q(x,t))+(h.o.t)]+f(x,t)=\;\; A(x)\rho (x)c\cdot\frac{\partial u}{\partial t}$$$$\displaystyle (Eq. 2.1.9) $$

where, $$\displaystyle Q(x,t)= -q(x)A(x)$$ and $$\displaystyle q(x)=k(x)\frac {\partial u}{\partial x}$$

Therefore we get,

=Problem 2.4=

Find
To Prove Solution provided by Wolfram Alpha

Prove Following steps and use them to get the final proof of the above eqution:

Part 1: $$ \int log(x)dx = x*log(x) - x$$ Solution provided by Wolfram Alpha using integration by parts.

Part 2: $$ \int x*log(x)dx = \frac {1}{2}*x^2* \left [ log(x) - \frac {1}{2} \right ] $$

Part 3: $$ \int \frac {x^2 dx}{1+C*x} = \frac {2*log(C*x + 1) + x*(C*x-2)*C}{2*C^3} $$

Part 4: $$ \int \frac {x^2 dx}{A+C*x} = \frac {2*log(C*x + A) + C*x*(C*x-2*A)}{2*C^3} $$

Part 5: Now refer to meeting 9 [[media:fe1.s11.mtg9.djvu|Mtg 9 (c)]] and find exact solution $$\displaystyle u(x)$$ for problem (3)

Part 6: Plot $$\displaystyle u(x)$$

Solution
Part 1

Prove Solution provided by Wolfram Alpha

using integration by parts, i.e.,

Part 2

Prove Solution provided by Wolfram Alpha

using integration by parts, (Eq. 2.4.3)

Part 3

Prove Solution provided by Wolfram Alpha

Using integration by parts, (Eq. 2.4.3)

Continuing with the integration by parts with the latter part of the RHS of (Eq. 2.4.15), Given (Eq. 2.4.7) and the substitution given in (Eq. 2.4.14),

Applying integration by parts again, we obtain the following relations:

Finally, the integral in the RHS of (Eq. 2.4.19) can be solved for and simplified using (Eq. 2.4.12) and the integration by substitution given (Eq. 2.4.14), i.e., Combining the former portion of the RHS of (Eq. 2.4.15), the former portion of the RHS of (Eq. 2.4.19), and the latter portion of the RHS of (Eq. 2.4.20), and then simplifying, the final solution to the integral in (Eq. 2.4.13) can be found to be

Part 4

Prove Solution provided by Wolfram Alpha

and the first integration by parts given in Step 3, (Eq. 2.4.15),

Continuing with the integration by parts with the latter part of the RHS of (Eq. 2.4.24),

and given the second integration by parts in Step 3, (Eq. 2.4.19)

Finally, the integral in the RHS of (Eq. 2.4.27) can be solved for and simplified using (Eq. 2.4.12) and the integration by substitution given in (Eq. 2.4.23), i.e.,

Combining the former portion of the RHS of (Eq. 2.4.24), the former portion of the RHS of (Eq. 2.4.27), the latter portion of the RHS of (Eq. 2.4.28), and then simplifying, the final solution to the integral in (Eq. 2.4.22) can be found in a similar fashion to (Eq. 2.4.20) of Step 3, i.e.,

Final Step

Given (Eq. 2.4.29) from Step 4, if A = C = 1, then

Thus, required result stated in ' Find' section Eq 2.4.1 is achieved.

Part 5

Part 6

title: User:Eml5526.s11.team6.deshpande/hwk2


text: File:HW 2.1.png

title: File:HW 2.1.png


text:
Talk:Mathematics of theoretical physics

Being that the title of this page is "Mathematics of theoretical physics" perhaps a better place for the "Basic Mathematics" section would be in a page "Mathematics of Classical Physics" or ideally in a page aimed at an introduction to basic math, where a more rigorous and complete explanation of those topics could be contained. Ideally this could be broken down into separate pages, that this one could refer the reader to. I believe it would be in the best interest of keeping this concise to assume the reader has mastered single variable calculus, and has some quantitative understanding of classical mechanics, and build up from there. Beneath multi-variable calculus it is difficult to justify the content of the page as mathematics pertaining to theoretical physics specifically. A good test would be to ask "is there a motivating example for this topic, that is an example of theoretical physics" (not purely mathematical, or an example of classical mechanics). - Saneisjus 19:08, 29 January 2011 (UTC)

title: Talk:Mathematics of theoretical physics


text:
Template:T5Eqn

=EGM 6341 spring 2011=
 * Owner: Team5

 * Usage: Generate a math equation in the form of consistent style.

 * Format:

 * Example:

 * This example will be shown as:
 * $$\displaystyle

f(x_1)=x^2 $$
 * Note: To include = in the equation, use = instead.

$$\displaystyle $$

title: Template:T5Eqn


text:
User:Egm6341.s11.team4.fields/HW2

=Homework 2=

HW2.9

HW2.10

HW2.11

HW2.12

HW2.14

title: User:Egm6341.s11.team4.fields/HW2


text:
User:Egm6341.s11.team4.fields/HW2.9

=Problem 2.9: Roots of P5(x) and P10(x)=

Refer to lecture slides [[media:nm1.s11.mtg10.djvu|10-1]], [[media:nm1.s11.mtg8.djvu|8-1]] and [[media:nm1.s11.mtg8.djvu|7-5]] for the problem statement.

Given

 * {| style="width:70%" border="0" align="center"

(9.1)
 * $$\displaystyle P_n (x) = \sum_{i=0}^{[n/2]} (-1)^i \frac{(2n-2i)! x^{n-2i}}{2^n i! (n-i)! (n-2i)!}$$
 *
 * }
 * }

Objectives
a.) Use 9.1 to generate P5(x) and compute the roots of P5(x) to check values in the table on lecture slide [[media:nm1.s11.mtg8.djvu|7-5]]. Plot the roots on [-1,1].

b.) Repear steps in a. for P10(x). Observe the location of the roots near endpoints -1 and +1.

Solution
a.)Using Wolfram Alpha to compute P5(x) we get:

 * {| style="width:70%" border="0" align="center"

(9.2)
 * $$\displaystyle P_5 (x) = \frac{63 x^5}{8} - \frac{35 x^3}{4} + \frac{15 x}{8}$$
 *
 * }
 * }

Matlab code to produce the roots of P5(x) and the plot of the roots:

>> C = [63/8 0 -35/4 0 15/8 0]; >> x = roots(C)

x =

0 -0.906179845938664  -0.538469310105683   0.906179845938664   0.538469310105683 >> y = [0;0;0;0;0]; >> plot(x,y,'.','markersize',15)

These roots compare well with the values in the table in lecture [[media:nm1.s11.mtg8.djvu|7-5]].

 * {| style="width:70%" border="0" align="center"

(9.3)
 * $$\displaystyle 0 = 0$$
 *
 * }
 * }

 * {| style="width:70%" border="0" align="center"

(9.4)
 * $$\displaystyle \pm0.538469310105683 \approx \pm \frac{1}{3} \sqrt{5 - 2\sqrt{10/7}}$$
 *
 * }
 * }

 * {| style="width:70%" border="0" align="center"

(9.5)
 * $$\displaystyle \pm0.906179845938664 \approx \pm \frac{1}{3} \sqrt{5 - 2\sqrt{10/7}}$$
 *
 * }
 * }

Below is a plot of the roots of P5(x):

b.)Using Wolfram Alpha to compute P10(x) we get:

 * {| style="width:70%" border="0" align="center"

(9.6)
 * $$\displaystyle P_{10} (x) = \frac{46189 x^{10}}{256} - \frac{109395 x^8}{256} + \frac{45045 x^6}{128} - \frac{15015 x^4}{128} + \frac{3465 x^2}{256} - \frac{63}{256}$$
 *
 * }
 * }

Matlab code to produce the roots of P10(x) and the plot of the roots:

>> C = [46189/256 0 -109395/256 0 45045/128 0 -15015/128 0 3465/256 0 -63/256]; >> x = roots(C)

x =

-0.973906528517167 -0.865063366688989  -0.679409568299026   0.973906528517167   0.865063366688989   0.679409568299024  -0.433395394129247   0.433395394129247  -0.148874338981631   0.148874338981631

>> y = [0;0;0;0;0;0;0;0;0;0]; >> plot(x,y,'.','markersize',15)

Below is a plot of the roots of P10(x):

title: User:Egm6341.s11.team4.fields/HW2.9


text:
User:Opriter

/Haiti Reconstruction/

title: User:Opriter


text:
User:Egm6341.s11.team4.yang/hw2

=Homework 2.5= Refer to lecture slide [[media:nm1.s11.mtg7.djvu|mtg-7]] for the problem statement.

Given
Gauss-legendre quadrature:

Objectives
Verify this table against NIST handbook (lecture plan).

Solution
According to the Legendre polynomial in lecture note [[media:nm1.s11.mtg8.djvu|mtg-8]], {  Xi, i=1….n }  is the root of Legendre Polynomial of order n, and the associated weight with Xi is :
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

{W_i} = \frac

$$     (Eq 5.1 ) where the Legendre Polynomial is:
 *
 * }
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

{P_n}(x) = \sum\limits_{i = 0}^{[n/2]} \frac

$$     (Eq 5.2 )
 *
 * }.
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

{P_1}(x) = x

$$     (Eq 5.3 )
 *
 * }
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

{P_2}(x) = \frac{1}{2}(3{x^2} - 1)

$$     (Eq 5.4 )
 *
 * }
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

{P_3}(x) = \frac{1}{2}(5{x^3} - 3x)

$$     (Eq 5.5)
 *
 * }
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

{P_4}(x) = \frac{8}{x^4} - \frac{4}{x^2} + \frac{3}{8}

$$     (Eq 5.6)
 *
 * }
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

{P_5}(x) = \frac{8}{x^5} - \frac{8}{x^3} + \frac{8}x

$$     (Eq 5.7 )
 *
 * }
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

{P_6}(x) = \frac{x^6} - \frac{x^4} + \frac{x^2} - \frac{5}

$$     (Eq 5.8 )
 *
 * }

1). When n=1, the root of P1(x)=0 is:
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{x_{1}} = 0

$$     (Eq 5.9 )
 *
 * }

And the weight is:
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{{W}_{1}}=\frac{-2}{(1+1)[P_{1}^{'}({{x}_{1}}){{P}_{2}}({{x}_{1}})]}=\frac{-2}{(1+1)[1\centerdot (3{{x}_{1}}^{2}-1)/2]}=\frac{-2}{(1+1)[1\centerdot (3\centerdot 0-1)/2]}=1

$$     (Eq 5.10 )
 *
 * }

2). When n=2, the root of P2(x)=0 is:
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{x_{1,2}} = \pm 1/\sqrt 3

$$     (Eq 5.11 )
 *
 * }

And the weight is:
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{{W}_{1}}=\frac{-2}{(2+1)[P_{2}^{'}({{x}_{1}}){{P}_{3}}({{x}_{1}})]}=\frac{-2}{(2+1)[(3{{x}_{1}})\centerdot (5{{x}_{1}}^{3}-3{{x}_{1}})/2]}=1

$$     (Eq 5.12 )
 *
 * }
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{{W}_{2}}=\frac{-2}{(2+1)[P_{2}^{'}({{x}_{2}}){{P}_{3}}({{x}_{2}})]}=\frac{-2}{(2+1)[(3{{x}_{2}})\centerdot (5{{x}_{2}}^{3}-3{{x}_{2}})/2]}=1

$$     (Eq 5.13 )
 *
 * }

3). When n=3, the root of P3(x)=0 is:
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{x_1} = 0,\begin{array}{ccccccccccccccc} {}&{{x_{2,3}} = \pm \sqrt {15} /5} \end{array}

$$     (Eq 5.14 )
 *
 * }

And the weight is:
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{{W}_{1}}=\frac{-2}{(3+1)[P_{3}^{'}({{x}_{1}}){{P}_{4}}({{x}_{1}})]}=\frac{-2}{(3+1)[(15{{x}_{1}}^{2}-3)/2\centerdot (\frac{35}{8}{{x}_{1}}^{4}-\frac{15}{4}{{x}_{1}}^{2}+\frac{3}{8})]}=\frac{8}{9}

$$     (Eq 5.15 )
 *
 * }
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{{W}_{2}}=\frac{-2}{(3+1)[P_{3}^{'}({{x}_{2}}){{P}_{4}}({{x}_{2}})]}=\frac{-2}{(3+1)[(15{{x}_{2}}^{2}-3)/2\centerdot (\frac{35}{8}{{x}_{2}}^{4}-\frac{15}{4}{{x}_{2}}^{2}+\frac{3}{8})]}=\frac{5}{9}

$$     (Eq 5.16)
 *
 * }
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{{W}_{3}}=\frac{-2}{(3+1)[P_{3}^{'}({{x}_{3}}){{P}_{4}}({{x}_{3}})]}=\frac{-2}{(3+1)[(15{{x}_{3}}^{2}-3)/2\centerdot (\frac{35}{8}{{x}_{3}}^{4}-\frac{15}{4}{{x}_{3}}^{2}+\frac{3}{8})]}=\frac{5}{9}

$$     (Eq 5.17)
 *

 * }

4). When n=4, the root of P4(x)=0 is:
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

\frac{8}{x^4} - \frac{4}{x^2} + \frac{3}{8} = 0

$$     (Eq 5.18)
 *

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

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

{x^2} = (3 \pm 2\sqrt {6/5} )/7

$$     (Eq 5.19)
 *

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

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{x_{1,2}} = \pm \sqrt {(3 + 2\sqrt {6/5} )/7}

$$     (Eq 5.20 )
 *

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

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{x_{3,4}} = \pm \sqrt {(3 - 2\sqrt {6/5} )/7}

$$     (Eq 5.21 )
 *

 * }

And the weight is:
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{{W}_{1}}=\frac{-2}{(4+1)[P_{4}^{'}({{x}_{1}}){{P}_{5}}({{x}_{1}})]}=\frac{-2}{(4+1)[(\frac{35}{2}{{x}_{1}}^{3}-\frac{15}{2}{{x}_{1}})\centerdot (\frac{63}{8}{{x}_{1}}^{5}-\frac{70}{8}{{x}_{1}}^{3}+\frac{15}{8}{{x}_{1}})]}=(18-\sqrt{30})/36

$$     (Eq 5.22 )
 *

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

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{{W}_{2}}=\frac{-2}{(4+1)[P_{4}^{'}({{x}_{2}}){{P}_{5}}({{x}_{2}})]}=\frac{-2}{(4+1)[(\frac{35}{2}{{x}_{2}}^{3}-\frac{15}{2}{{x}_{2}})\centerdot (\frac{63}{8}{{x}_{2}}^{5}-\frac{70}{8}{{x}_{2}}^{3}+\frac{15}{8}{{x}_{2}})]}=(18-\sqrt{30})/36

$$     (Eq 5.23 )
 *

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

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{{W}_{3}}=\frac{-2}{(4+1)[P_{4}^{'}({{x}_{3}}){{P}_{5}}({{x}_{3}})]}=\frac{-2}{(4+1)[(\frac{35}{2}{{x}_{3}}^{3}-\frac{15}{2}{{x}_{3}})\centerdot (\frac{63}{8}{{x}_{3}}^{5}-\frac{70}{8}{{x}_{3}}^{3}+\frac{15}{8}{{x}_{3}})]}=(18+\sqrt{30})/36

$$     (Eq 5.24)
 *

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

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{{W}_{4}}=\frac{-2}{(4+1)[P_{4}^{'}({{x}_{4}}){{P}_{5}}({{x}_{4}})]}=\frac{-2}{(4+1)[(\frac{35}{2}{{x}_{4}}^{3}-\frac{15}{2}{{x}_{4}})\centerdot (\frac{63}{8}{{x}_{4}}^{5}-\frac{70}{8}{{x}_{4}}^{3}+\frac{15}{8}{{x}_{4}})]}=(18+\sqrt{30})/36

$$     (Eq 5.25)
 *

 * }

5). When n=5, the root of P5(x)=0 is:
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

{P_5}(x) = \frac{8}{x^5} - \frac{8}{x^3} + \frac{8}x

$$     (Eq 5.26)
 *

 * }

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

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

{x_1} = 0,\begin{array}{ccccccccccccccc} {}&{{{({x_{2,3,4,5}})}^2} = (5 \pm 2\sqrt {10/7} )/9} \end{array}

$$     (Eq 5.27)
 *

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

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{x_{2,3}} = \pm \sqrt {(5 + 2\sqrt {10/7} )} /3

$$     (Eq 5.28)
 *

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

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{x_{4,5}} = \pm \sqrt {(5 - 2\sqrt {10/7} )} /3

$$     (Eq 5.29)
 *

 * }

And the weight is:
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

\begin{align} & {{W}_{1}}=\frac{-2}{(5+1)[P_{5}^{'}({{x}_{1}}){{P}_{6}}({{x}_{1}})]}=\frac{-2}{(5+1)[(\frac{315}{8}{{x}_{1}}^{4}-\frac{210}{8}{{x}_{1}}^{2}+\frac{15}{8})\centerdot (\frac{231}{16}{{x}_{1}}^{6}-\frac{315}{16}{{x}_{1}}^{4}+\frac{105}{16}{{x}_{1}}^{2}-\frac{5}{16})]} \\ & =128/225 \\ \end{align}

$$     (Eq 5.30)
 *

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

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

\begin{align} & {{W}_{2}}=\frac{-2}{(5+1)[P_{5}^{'}({{x}_{2}}){{P}_{6}}({{x}_{2}})]}=\frac{-2}{(5+1)[(\frac{315}{8}{{x}_{2}}^{4}-\frac{210}{8}{{x}_{2}}^{2}+\frac{15}{8})\centerdot (\frac{231}{16}{{x}_{2}}^{6}-\frac{315}{16}{{x}_{2}}^{4}+\frac{105}{16}{{x}_{2}}^{2}-\frac{5}{16})]} \\ & =(322-13\sqrt{70})/900 \\ \end{align}

$$     (Eq 5.31)
 *

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

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

\begin{align} & {{W}_{3}}=\frac{-2}{(5+1)[P_{5}^{'}({{x}_{3}}){{P}_{6}}({{x}_{3}})]}=\frac{-2}{(5+1)[(\frac{315}{8}{{x}_{3}}^{4}-\frac{210}{8}{{x}_{3}}^{2}+\frac{15}{8})\centerdot (\frac{231}{16}{{x}_{3}}^{6}-\frac{315}{16}{{x}_{3}}^{4}+\frac{105}{16}{{x}_{3}}^{2}-\frac{5}{16})]} \\ & =(322-13\sqrt{70})/900 \\ \end{align}

$$     (Eq 5.32)
 *

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

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

\begin{align} & {{W}_{4}}=\frac{-2}{(5+1)[P_{5}^{'}({{x}_{4}}){{P}_{6}}({{x}_{4}})]}=\frac{-2}{(5+1)[(\frac{315}{8}{{x}_{4}}^{4}-\frac{210}{8}{{x}_{4}}^{2}+\frac{15}{8})\centerdot (\frac{231}{16}{{x}_{4}}^{6}-\frac{315}{16}{{x}_{4}}^{4}+\frac{105}{16}{{x}_{4}}^{2}-\frac{5}{16})]} \\ & =(322+13\sqrt{70})/900 \\ \end{align}

$$     (Eq 5.33 )
 *

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

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

\begin{align} & {{W}_{5}}=\frac{-2}{(5+1)[P_{5}^{'}({{x}_{5}}){{P}_{6}}({{x}_{5}})]}=\frac{-2}{(5+1)[(\frac{315}{8}{{x}_{5}}^{4}-\frac{210}{8}{{x}_{5}}^{2}+\frac{15}{8})\centerdot (\frac{231}{16}{{x}_{5}}^{6}-\frac{315}{16}{{x}_{5}}^{4}+\frac{105}{16}{{x}_{5}}^{2}-\frac{5}{16})]} \\ & =(322+13\sqrt{70})/900 \\ \end{align}

$$     (Eq 5.34)
 *

 * }

=Homework 2.6=

Refer to lecture slide [[media:nm1.s11.mtg8.djvu|mtg-8]] for the problem statement.

Given
Legendre polynomial is given by:

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

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

{{P}_{n}}(x)=\sum\limits_{i=0}^{[n/2]}\frac{(2n-2i)!{{x}^{n-2i}}}{{{2}^{n}}i!(n-2i)!(n-i)!}

$$     (Eq 6.1)
 *

 * }

Where [ n/2 ] denotes the integer part of n/2, e.g. n=5, [ n/2 ] =2.
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

{{P}_{0}}(x)=1

$$     (Eq )
 *

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

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

{{P}_{1}}(x)=x

$$     (Eq )
 *

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

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

{{P}_{2}}(x)=\frac{1}{2}(3{{x}^{2}}-1)

$$     (Eq )
 *

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

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

{{P}_{3}}(x)=\frac{1}{2}(5{{x}^{3}}-3x)

$$     (Eq )
 *

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

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

{P_4}(x) = \frac{8}{x^4} - \frac{4}{x^2} + \frac{3}{8}

$$     (Eq )
 *

 * }

Objectives
Verify P0(x) – P4(x) using the Legendre polynomial.

Solutions
1). When n=0, [ n/2 ] =0, the Equation (6-1) becomes:
 * {| style="width:100%" border="0"

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{{P}_{0}}(x)={{(-1)}^{0}}\frac{0!{{x}^{0}}}{{{2}^{0}}\centerdot 0!\centerdot 0!}=1

$$     (Eq 6.2 ) 2). When n=1, [ n/2 ] =0, the Equation (6-1) becomes:
 *

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

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{{P}_{1}}(x)={{(-1)}^{0}}\frac{2!{{x}^{1}}}{{{2}^{1}}\centerdot 0!\centerdot 0!}=x

$$     (Eq 6.3) 3). When n=2, [ n/2 ] =1, the Equation (6-1) becomes:
 *

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

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{{P}_{2}}(x)={{(-1)}^{0}}\frac{4!{{x}^{2}}}{{{2}^{2}}\centerdot 2!\centerdot 2!}+{{(-1)}^{1}}\frac{2!{{x}^{0}}}{{{2}^{2}}\centerdot 1!\centerdot 0!}=\frac{1}{2}(3{{x}^{2}}-1)

$$     (Eq 6.4) 4). When n=3, [ n/2 ] =1, the Equation (6-1) becomes:
 *

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

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{{P}_{3}}(x)={{(-1)}^{0}}\frac{6!{{x}^{3}}}{{{2}^{3}}\centerdot 3!\centerdot 3!}+{{(-1)}^{1}}\frac{4!{{x}^{0}}}{{{2}^{3}}\centerdot 1!\centerdot 1!\centerdot 2!}=\frac{1}{2}(5{{x}^{3}}-3x)

$$     (Eq 6.5) 5). When n=4, [ n/2 ] =2, the Equation (6-1) becomes:
 *

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

$$ \displaystyle
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

{{P}_{4}}(x)={{(-1)}^{0}}\frac{8!{{x}^{4}}}{{{2}^{4}}\centerdot 4!\centerdot 4!}+{{(-1)}^{1}}\frac{6!{{x}^{2}}}{{{2}^{4}}\centerdot 1!\centerdot 2!\centerdot 3!}+{{(-1)}^{2}}\frac{4!{{x}^{0}}}{{{2}^{4}}\centerdot 2!\centerdot 0!\centerdot 2!}=\frac{35}{8}{{x}^{4}}-\frac{15}{4}{{x}^{2}}+\frac{3}{8}

$$     (Eq 6.6)
 *

 * }

title: User:Egm6341.s11.team4.yang/hw2


text:
User:EGM6341.S11.team5.cavalcanti/HW2

= Problem 1 - Taylor Series = From (meeting 6 page 3)

Given
The Taylor series expansion: $$f(x)=f(x_{0})+ \frac{(x+x_{0})^1}{1!}f^{1}(x_{o})+\int_{x_{0}}^{x}(x-t)f^{(2)}(t)dt$$

Find
1. Do integration by parts on the last term to reveal 3 more terms in the Taylor series and the remainder. 2. Use IMVT to express the remainder in terms of $$f^{5}(\xi)$$ for $$ \xi \in[x_{0},x]$$. 3. Assuming equations (3) and (4) on page 3-3 are correct, do integration by parts once more on $$R_{n+1}$$ to verify that (3) and (4)remain correct. 4. Use IMVT on 4 from meeting 3 page 3 to show (5) in page 3-3.

Solution
''' We solved this problem on our own. '''

1. Finding next 3 terms
Starting with the Taylor Series, $$f(x)=f(x_{0})+\frac{(x-x_{0})}{1!}f^{(1)}(x_{0})+\int_{x_{0}}^{x}(x-t)f^{(2)}(t)dt$$ we will evaluate the integral using integration by parts. Let $$u'=(x-t)dt$$ and $$v=f^{(2)}$$. Then, $$u=\frac{-1}{2}(x-t)^{2}$$ and $$v'=f^{(3)}(t)dt$$. Integrating by parts we obtain: $$\left[ uv \right]_{x_{0}}^{x}-\int_{x_{0}}^{x}uv'$$ $$=\frac{-1}{2}\left[ (x-t)^{2}f^{(2)}(t) \right]_{x_{0}}^{x}-\int_{x_{0}}^{x}\frac{-1}{2}(x-t)^{2}f^{(3)}(t)dt$$ Evaluating we then get the third term in the series: $$\frac{(x-x_{0})^{2}}{2!}f^{(2)}(x_{0})+\frac{1}{2}\int_{x_{0}}^{x}(x-t)^{2}f^{(3)}(t)dt$$ Once again, integrating by parts: $$\int_{x_{0}}^{x}(x-t)^{2}f^{(3)}(t)dt$$ Let $$u'=(x-t)^{2}dt$$ and $$v=f^{(3)}(t)$$. Then, $$u=\frac{-1}{3}(x-t)^{3}$$ and $$v'=f^{(4)}(t)dt$$. Integrating by parts: $$\left[ \frac{-1}{3}(x-t)^{3}f^{(3)}(t) \right]_{x_{0}}^{x}-\int_{x_{0}}^{x}\frac{-1}{3}(x-t)^{3}f^{(4)}(t)dt$$ Evaluating: $$\frac{(x-x_{0})^{3}}{3}f^{(3)}(x_{0})+\frac{1}{3}\int_{x_{0}}^{x}(x-t)^{3}f^{(4)}(t)dt$$ Plugging back into the series: $$f(x)=f(x_{0})+\frac{(x-x_{0})}{1!}f^{(1)}(x_{0})+\frac{(x-x_{0})^{2}}{2!}f^{(2)}(x_{0})+ \frac{(x-x_{0})^{3}}{3!}f^{(3)}(x_{0})+\frac{1}{3!}\int_{x_{0}}^{x}(x-t)^{3}f^{(4)}(t)dt$$ Lastly, integration by parts once more on the term: $$\int_{x_{0}}^{x}(x-t)^{3}f^{(4)}(t)dt$$ Let $$u'=(x-t)^3dt$$ and $$v=f^{(4)}(t)$$. Then, $$ u=\frac{-1}{4}(x-t)^{4}$$ and $$v'=f^{(5)}(t)dt$$. Integrating by parts: $$\left[ \frac{-1}{4}(x-t)^{4}f^{(4)}(t) \right]_{x_{0}}^{x}-\int_{x_{0}}^{x}\frac{-1}{4}(x-t)^{4}f^{(5)}(t)dt$$ Evaluating: $$ \frac{1}{4}(x-x_{0})^{4}f^{(4)}(x_{0})+\frac{1}{4}\int_{x_{0}}^{x}(x-t)^{4}f^{(5)}(t)dt$$ Plugging back in:
 * {| style="width:100%" border="0" align="left"

$$f(x)=f(x_{0})+\frac{(x-x_{0})}{1!}f^{(1)}(x_{0})+\frac{(x-x_{0})^{2}}{2!}f^{(2)}(x_{0})+ \frac{(x-x_{0})^{3}}{3!}f^{(3)}(x_{0})+ \frac{(x-x_{0})^{4}}{4!}f^{(4)}(x_{0})+\frac{1}{4!}\int_{x_{0}}^{x}(x-t)^{4}f^{(5)}(t)dt$$
 * style="width:30%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:30%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }

2. Remainder
Starting with the remainder: $$\frac{1}{4!}\int_{x_{0}}^{x}(x-t)^{4}f^{(5)}(t)dt$$ Using IMVT $$\int_{a}^{b}w(x)f(x)dx=f(\xi)\int_{a}^{b}w(x)dx$$, where $$\xi \in [a,b]$$. $$\frac{1}{4!}\int_{x_{0}}^{x}(x-t)^{4}f^{(5)}(t)dt = \frac{1}{4!(5)}f^{(5)}(\xi)\left[ (x-t)^{5} \right]_{x_{0}}^{x}$$
 * {| style="width:100%" border="0" align="left"

$$ \therefore R_{5}=\frac{1}{5!}f^{5}(\xi)(x-x_{0})^{5}$$
 * style="width:30%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:30%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }

3. $$R_{n+2}$$
Equation 4 from pg. 3-3 is as follows: $$ R_{n+1}(x)=\frac{1}{n!}\int_{x_{0}}^{x}(x-t)^{n}f^{n+1}(t)dt$$ Doing integration by parts: Let $$u'=(x-t)^{n}dt$$ and $$v=f^{n+1}(t)$$ Then, $$ u=\frac{-1}{n+1}(x-t)^{n+1}$$ and $$ v'=f^{n}(t)dt$$ $$ \left[ \frac{1}{n+1}(x-t)^{n+1}f^{n+1}(t) \right]_{x_{0}}^{x}-\int_{x_{0}}^{x}\frac{1}{n+1}(x-t)^{n+1}f^{n}(t)dt$$ Evaluating:
 * {| style="width:100%" border="0" align="left"

$$R_{n+2}=\frac{1}{(n+1)!}(x-x_{0})^{n+1}f^{n+1}(x_{0})+\frac{1}{(n+1)!}\int_{x_{0}}^{x}(x-t)^{n+1}f^{n}(t)dt$$
 * style="width:30%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:30%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }

4. IMVT
Starting with equation 3 on page 3-3: $$R_{n+1}(x)=\frac{1}{n!}\int_{x_{0}}^{x}(x-t)^{n}f^{n+1}(t)dt$$ Apply IMVT: $$\frac{f^{n+1}(\xi)}{n!}\int_{x_{0}}^{x}(x-t)^{n}dt$$ Integrate: $$\frac{f^{n+1}(\xi)}{n!}\frac{1}{n+1}\left[ (x-t)^{n+1} \right]_{x_{0}}^{x}$$ Simplifying:
 * {| style="width:100%" border="0" align="left"

$$R_{n+1}=\frac{(x-x_{0})^{n+1}}{(n+1)!}f^{(n+1)}(\xi)$$
 * style="width:30%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:30%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }

Author and proof-reader
 cavalcanti

[Proof-reader]

= Problem 5 - Verify NIST Handbook = From (meeting 7 page 5)

Given
The following table from wikipedia:

Legendre Polynomials Table

Find
Verify the table against the NIST Handbook.

NIST Handbook

Solution
''' We solved this problem on our own. '''

Using octave, the values of the Wikipedia table were calculated to 5 decimal places: Comparing with the NIST table, we have:

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

Only the weights for $$n=5$$ are shown on the NIST website. The Wikipedia values are correct.
 * style="width:30%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:30%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }

Author and proof-reader
 cavalcanti

[Proof-reader]

= Problem 7 - Orthogonality of $$P_{n}$$ = from meeting page 9-1

Given
The Legendre polynomials $$P_{n}$$ (meeting 8).

Find
Verify that $$\left \{ P_{i}(x), i=0,1,2,...\right \}$$ is orthogonal function for $$ n=0,1,...,5$$. 1. Show that $$\Gamma$$ is diagonal. 2. Find the determinant of $$\Gamma$$.

Solution
 We solved this problem on our own, using values from Wolfram Alpha

As per meeting 8, the Legendre polynomials are as follows: $$\mathbf{P}_{0}(x)=1$$ $$\mathbf{P}_{1}(x)=x$$ $$\mathbf{P}_{2}(x)=\frac{1}{2}(3x^2-1)$$ $$\mathbf{P}_{3}(x)=\frac{1}{2}(5x^3-3x)$$ $$\mathbf{P}_{4}(x)=\frac{35}{8}(x^4-\frac{15}{4}x^2+\frac{3}{8})$$ $$\mathbf{P}_{5}(x)=\frac{1}{8}(63x^5-70x^3+15x)$$ To solve this, the Gram matrix should be constructed as follows: $$\mathbf{\Gamma} = \begin{vmatrix}\mathbf{\Gamma}_{ij} \end{vmatrix} = \begin{vmatrix} <\mathbf{P}_{i},\mathbf{P}_{j}> \end{vmatrix} $$, where i = rows and j = columns.

1. Proof that $$\mathbf{\Gamma}$$ is diagonal matrix
Expanding the Gram matrix, we get: $$ \begin{vmatrix} <\mathbf{P}_{0},\mathbf{P}_{0}> & <\mathbf{P}_{0},\mathbf{P}_{1}> & <\mathbf{P}_{0},\mathbf{P}_{2}> & <\mathbf{P}_{0},\mathbf{P}_{3}> & <\mathbf{P}_{0},\mathbf{P}_{4}> & <\mathbf{P}_{0},\mathbf{P}_{5}>\\ <\mathbf{P}_{1},\mathbf{P}_{0}> & <\mathbf{P}_{1},\mathbf{P}_{1}> & <\mathbf{P}_{1},\mathbf{P}_{2}> & <\mathbf{P}_{1},\mathbf{P}_{3}> & <\mathbf{P}_{1},\mathbf{P}_{4}> & <\mathbf{P}_{1},\mathbf{P}_{5}>\\ <\mathbf{P}_{2},\mathbf{P}_{0}> & <\mathbf{P}_{2},\mathbf{P}_{1}> & <\mathbf{P}_{2},\mathbf{P}_{2}> & <\mathbf{P}_{2},\mathbf{P}_{3}> & <\mathbf{P}_{2},\mathbf{P}_{4}> & <\mathbf{P}_{2},\mathbf{P}_{5}>\\ <\mathbf{P}_{3},\mathbf{P}_{0}> & <\mathbf{P}_{3},\mathbf{P}_{1}> & <\mathbf{P}_{3},\mathbf{P}_{2}> & <\mathbf{P}_{3},\mathbf{P}_{3}> & <\mathbf{P}_{3},\mathbf{P}_{4}> & <\mathbf{P}_{3},\mathbf{P}_{5}>\\ <\mathbf{P}_{4},\mathbf{P}_{0}> & <\mathbf{P}_{4},\mathbf{P}_{1}> & <\mathbf{P}_{4},\mathbf{P}_{2}> & <\mathbf{P}_{4},\mathbf{P}_{3}> & <\mathbf{P}_{4},\mathbf{P}_{4}> & <\mathbf{P}_{4},\mathbf{P}_{5}>\\ <\mathbf{P}_{5},\mathbf{P}_{0}> & <\mathbf{P}_{5},\mathbf{P}_{1}> & <\mathbf{P}_{5},\mathbf{P}_{2}> & <\mathbf{P}_{5},\mathbf{P}_{3}> & <\mathbf{P}_{5},\mathbf{P}_{4}> & <\mathbf{P}_{5},\mathbf{P}_{5}> \end{vmatrix} $$ To evaluate the dot product of two functions, we use: $$\int_{-1}^{1}\mathbf{P}_{i}(x)\mathbf{P}_{j}(x)dx=\delta _{i,j}$$. Evaluating the elements: $$ <\mathbf{P}_{0},\mathbf{P}_{0}> = \int_{-1}^{1}1(1)dx=2$$

$$<\mathbf{P}_{0},\mathbf{P}_{1}>= \int_{-1}^{1}1xdx=1-1=0$$

$$<\mathbf{P}_{0}, \mathbf{P}_{2}>=\int_{-1}^{1}\frac{1}{2}(3x^2-1)=(1^{3}-1)-((-1)^{3}-(-1))=0$$

$$ <\mathbf{P}_{0},\mathbf{P}_{3}> = \int_{-1}^{1}\frac{1}{2}(5x^3-3x)dx=\left ( \frac{5}{4}-\frac{3}{2}\right )-\left ( \frac{5}{4}-\frac{3}{2} \right ) =0$$

$$ <\mathbf{P}_{0},\mathbf{P}_{4}> = \int_{-1}^{1}\frac{35}{8}(x^4-\frac{15}{4}x^2+\frac{3}{8})dx= \left( \frac{-1}{5}+\frac{5}{4}-\frac{3}{8} \right) - \left( \frac{-1}{5}+\frac{5}{4}-\frac{3}{8} \right)=0$$

$$ <\mathbf{P}_{0},\mathbf{P}_{5}> = \int_{-1}^{1}\frac{1}{8}(63x^5-70x^3+15x)dx= \left( \frac{63}{6}-\frac{70}{4}+\frac{15}{2} \right) - \left( \frac{63}{6}-\frac{70}{4}+\frac{15}{2} \right)=0$$

$$<\mathbf{P}_{1}, \mathbf{P}_{0}>=\int_{-1}^{1}xdx= 1-1=0$$

$$ <\mathbf{P}_{1},\mathbf{P}_{1}> = \int_{-1}^{1}x(x)dx=\frac{1}{3}\left [ x^3 \right ]_{-1}^{1}=\frac{2}{3}$$

$$<\mathbf{P}_{1}, \mathbf{P}_{2}>=\int_{-1}^{1}\frac{1}{2}3x^{3}-xdx=\frac{1}{2}\left[ \frac{3}{4}x^{4}-\frac{1}{2}x^{2}\right]_{-1}^{1}=0$$

$$<\mathbf{P}_{1}, \mathbf{P}_{3}>=\int_{-1}^{1}\frac{1}{2}\left(5x^{4}-4x^{2}\right)dx=\left[x^{5}-x^{3}\right]_{-1}^{1}=0$$

$$<\mathbf{P}_{1}, \mathbf{P}_{4}>=\int_{-1}^{1}\frac{38}{5}\left(x^{5}-\frac{15}{4}x^{3}+\frac{3}{8}x\right)dx=\left[ \frac{1}{6}x^{6}-\frac{15}{16}x^{4}+\frac{3}{16}x^{2}\right]_{-1}^{1}=0$$

$$<\mathbf{P}_{1}, \mathbf{P}_{5}>=\int_{-1}^{1}\frac{1}{8}(64x^{6}-70x^{4}+15x^{2})dx=\left[ \frac{64}{7}x^{7}-14x^{5}+5x^{3}\right]_{-1}^{1}=0$$

$$<\mathbf{P}_{2}, \mathbf{P}_{0}>=\int_{-1}^{1}\frac{1}{2}(3x^{2}-1)dx=\left[ x^{3}-x\right]_{-1}^{1}=0$$

$$<\mathbf{P}_{2}, \mathbf{P}_{1}>=\int_{-1}^{1}\frac{1}{2}(3x^{3}-x)dx=\left[ \frac{3}{4}x^{4}-\frac{1}{2}x^{2}\right]_{-1}^{1}=0$$

$$<\mathbf{P}_{2},\mathbf{P}_{2}> = \int_{-1}^{1}\left ( \frac{1}{2}\left ( 3x^2-1 \right ) \right )\left ( \frac{1}{2}\left ( 3x^2-1 \right ) \right )dx = \frac{1}{4}\int_{-1}^{1} 9x^4-6x^2+1dx = \frac{1}{4}\left [ \frac{9}{5}x^5-2x^3+x \right ]_{-1}^{1}=\frac{2}{5}$$

$$<\mathbf{P}_{2}, \mathbf{P}_{3}>=\int_{-1}^{1}\frac{1}{4}\left( 15x^{5}-14x^{3}+3x \right)dx=\left[\frac{15}{6}x^{6}-\frac{14}{4}x^{4}+\frac{3}{2}x^{2}\right]_{-1}^{1}=0$$

$$<\mathbf{P}_{2}, \mathbf{P}_{4}>=\int_{-1}^{1}\frac{35}{16}\left( 3x^6-\frac{49}{4}x^4-\frac{21}{8}x^2-\frac{3}{8}\right)dx=\left[ \frac{3}{7}x^7-\frac{49}{20}x^5-\frac{7}{8}x^3-\frac{3}{8}x \right]_{-1}^{1}=0$$

$$<\mathbf{P}_{2}, \mathbf{P}_{5}>=\int_{-1}^{1}\frac{1}{16}\left( 189x^7 - 273x^5 +115x^3 -15x \right)dx= \left[ \frac{189}{8}x^8 - \frac{273}{6}x^6 + \frac{115}{4}x^4 -\frac{15}{2}x^2 \right]_{-1}^{1}=0$$

$$<\mathbf{P}_{3}, \mathbf{P}_{0}>=\int_{-1}^{1}\frac{1}{2}(5x^3 -3x)dx=\left[ \frac{5}{4}x^4 - \frac{3}{2}x^2 \right]_{-1}^{1}=0$$

$$<\mathbf{P}_{3}, \mathbf{P}_{1}>=\int_{-1}^{1}\frac{1}{2}(5x^4 - 3x^2)dx=\left[ x^5 - x^3 \right]_{-1}^{1}=0$$

$$<\mathbf{P}_{3}, \mathbf{P}_{2}>=\int_{-1}^{1}\frac{1}{4}\left( 15x^{5}-14x^{3}+3x \right)dx=\left[\frac{15}{6}x^{6}-\frac{14}{4}x^{4}+\frac{3}{2}x^{2}\right]_{-1}^{1}=0$$

$$<\mathbf{P}_{3},\mathbf{P}_{3}>=\int_{-1}^{1}\left ( \frac{1}{2}\left ( 5x^3-3x \right ) \right )\left ( \frac{1}{2}\left ( 5x^3-3x \right ) \right )dx= \frac{1}{4}\int_{-1}^{1}25x^6-30x^4+9x^2dx = \frac{-3}{2}$$ (| WA)

$$<\mathbf{P}_{3}, \mathbf{P}_{4}>=\int_{-1}^{1}\frac{35}{16}\left( 5x^7 - \frac{87}{4}x^5 + \frac{105}{8}x^3 - \frac{9}{8} \right)= \left[ \frac{5}{8}x^8 - \frac{87}{24}x^6 + \frac{105}{32}x^4 - \frac{9}{16}x^2 \right]_{-1}^{1} = 0$$

$$<\mathbf{P}_{3}, \mathbf{P}_{5}>=\int_{-1}^{1}\frac{1}{16}\left( 315x^8 -539x^6 - 135x^4 -45x \right)= 0$$

$$<\mathbf{P}_{4}, \mathbf{P}_{1}>=\int_{-1}^{1}\int_{-1}^{1}\frac{38}{5}\left(x^{5}-\frac{15}{4}x^{3}+\frac{3}{8}x\right)dx=\left[ \frac{1}{6}x^{6}-\frac{15}{16}x^{4}+\frac{3}{16}x^{2}\right]_{-1}^{1}=0$$

$$<\mathbf{P}_{4}, \mathbf{P}_{2}>=\int_{-1}^{1}\frac{35}{16}\left( 3x^6-\frac{49}{4}x^4-\frac{21}{8}x^2-\frac{3}{8}\right)dx=\left[ \frac{3}{7}x^7-\frac{49}{20}x^5-\frac{7}{8}x^3-\frac{3}{8}x \right]_{-1}^{1}=0$$

$$<\mathbf{P}_{4}, \mathbf{P}_{3}>=\int_{-1}^{1}\frac{35}{16}\left( 5x^7 - \frac{87}{4}x^5 + \frac{105}{8}x^3 - \frac{9}{8} \right)= \left[ \frac{5}{8}x^8 - \frac{87}{24}x^6 + \frac{105}{32}x^4 - \frac{9}{16}x^2 \right]_{-1}^{1} = 0$$

$$<\mathbf{P}_{4},\mathbf{P}_{4}> = \int_{-1}^{1}\left ( \frac{35}{8}\left ( x^4-\frac{15}{4}x^2+\frac{3}{8} \right ) \right )\left ( \frac{35}{8}\left ( x^4-\frac{15}{4}x^2+\frac{3}{8} \right ) \right )dx \approx 46.1407$$ (| WA)

$$<\mathbf{P}_{4},\mathbf{P}_{5}> = \int_{-1}^{1}\frac{35}{64}\left( x^4 - \frac{15}{4}x^2 + \frac{3}{8} \right)\left( 63x^5 - 70x^3 + 15x \right)dx = 0$$

$$<\mathbf{P}_{5},\mathbf{P}_{0}>= \int_{-1}^{1}\frac{1}{8}(63x^5-70x^3+15x)dx= \left( \frac{63}{6}-\frac{70}{4}+\frac{15}{2} \right) - \left( \frac{63}{6}-\frac{70}{4}+\frac{15}{2} \right)=0$$

$$<\mathbf{P}_{5}, \mathbf{P}_{1}>=\int_{-1}^{1}\frac{1}{8}(64x^{6}-70x^{4}+15x^{2})dx=\left[ \frac{64}{7}x^{7}-14x^{5}+5x^{3}\right]_{-1}^{1}=0$$

$$<\mathbf{P}_{5}, \mathbf{P}_{2}>=\int_{-1}^{1}\frac{1}{16}\left( 189x^7 - 273x^5 +115x^3 -15x \right)dx= \left[ \frac{189}{8}x^8 - \frac{273}{6}x^6 + \frac{115}{4}x^4 -\frac{15}{2}x^2 \right]_{-1}^{1}=0$$

$$<\mathbf{P}_{5}, \mathbf{P}_{3}>=\int_{-1}^{1}\frac{1}{16}\left( 315x^8 -539x^6 - 135x^4 -45x \right)= 0$$

$$<\mathbf{P}_{5},\mathbf{P}_{4}> = \int_{-1}^{1}\frac{35}{64}\left( x^4 - \frac{15}{4}x^2 + \frac{3}{8} \right)\left( 63x^5 - 70x^3 + 15x \right)dx = 0$$

$$ <\mathbf{P}_{5},\mathbf{P}_{5}>=\int_{-1}^{1}\left ( \frac{1}{8}\left ( 65x^5-70x^3+15x \right ) \right )\left ( \frac{1}{8}\left ( 65x^5-70x^3+15x \right ) \right ) dx = 0.1818$$ (| WA) Our simplified matrix is:
 * {| style="width:100%" border="0" align="left"

$$ \begin{vmatrix} 2 & 0 & 0 & 0 & 0 & 0\\ 0 & 0.66 & 0 & 0 & 0 & 0\\ 0 & 0 & 0.4 & 0 & 0 & 0\\ 0 & 0 & 0 & -1.5 & 0 & 0\\ 0 & 0 & 0 & 0 & 46.14 & 0\\ 0 & 0 & 0 & 0 & 0 & 0.18 \end{vmatrix} $$
 * style="width:30%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:30%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }

2. Determinant of $$\Gamma$$
The determinant was calculated using the following Octave program: octave-3.2.4.exe.1> g=[2 0 0 0 0 0; 0 0.66 0 0 0 0; 0 0 0.4 0 0 0; 0 0 0 -1.5 0 0; 0 0 0 0 46.14 0; 0 0 0 0 0 0.18]; octave-3.2.4.exe.2> det(g) octave-3.2.4.exe.3> ans = -6.577
 * {| style="width:100%" border="0" align="left"

$$det(\boldsymbol{\Gamma})= -6.5777$$
 * style="width:30%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:30%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }

= Problem 13 - Simple to Composite Rules = from meeting page 10-5

Given
1. The equations for the simple and composite Trapezoidal Rule. 2. The equations for the simple and composite Simpson's Rule.

Find
1. Show that the composite Trapezoidal rule can be obtained from the simple Trapezoidal Rule. 2. Show that the composite Simpson's rule can be obtained from the simple Simpson's Rule.

Solution
''' We solved this problem on our own. '''

1. Trapezoidal Rule.
The equation for the simple Trapezoidal rule, as stated in pg. 7-4, is: $$ I_{1}=\frac{b-a}{2}[f(a)+f(b)]$$, where our interval is $$[a,b]$$ and $$n = 1$$. Instead of having one panel, divide the interval in n panels. The new h is: $$ h=\frac{b-a}{n}$$ The composite rule can be found as follows: $$I_{n}=\sum_{i=1}^{n} \frac{h}{2}[f(x_{i-1} )+f(x_{i} )]$$ Expanding: $$I_{n}=\frac{h}{2}[f(x_{0} )+f(x_{1} )+f(x_{1} )+f(x_{2} )+f(x_{2} )+f(x_{3} )+...+f(x_{n-1} )+f(x_{n-1} )+f(x_{n} )]$$ Simplifying: $$ I_{n}=\frac{h}{2}[f(x_{0} )+2f(x_{1} )+2f(x_{2} )+2f(x_{3} )+...+2f(x_{n-1} )+f(x_{n} )]$$

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

$$I_{n}=h[\frac{f(x_{0} )}{2}+f(x_{1} )+f(x_{2} )+f(x_{3} )+...+f(x_{n-1} )+\frac{f(x_{n} )}{2}] $$
 * style="width:30%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:30%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }

2. Simpson's Rule.
The equation for the simple Simpson's rules, as state in pg. 7-4 is: $$I_{2}=\frac{h}{3}[f_{0}+4f_{1}+f_{2}]$$, where our interval is $$[a,b]$$ and $$n=2$$. The composite rule can be found as follows: $$I_{n}=\frac{h}{3}[f(x_{0})+2\sum_{j=1}^{\frac{n}{2}-1} f(x_{2j}) + 4\sum_{j=1}^{\frac{n}{2}}f(x_{2j-1})+f(x_{n})]$$ Expanding:
 * {| style="width:100%" border="0" align="left"

$$ I_{n}=\frac{h}{3} [f(x_{0})+4f(x_{1})+2f(x_{2})+4f(x_{3}) +2f(x_{4})+...+4f(x_{n-1})+f(x_{n})]$$
 * style="width:30%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:30%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }

title: User:EGM6341.S11.team5.cavalcanti/HW2


text:
User:Egm6341.s11.team2.cleveland

= Useful Links = Egm6341 Course Wiki

Eml5526 Course Wiki

Lecture Plan

Course Wiki

Team2 info

Math_Templates

= Homework =

Homework #1

Homework #2

Homework #3

Homework #4

Homework #5

Homework #6

Homework #7

title: User:Egm6341.s11.team2.cleveland