User:EGM6341.s11.TEAM1.HW2

Find
1) Do integration by parts on last term of (2.1) to reveal three more terms in Taylor series, i.e.

2) Use Intergral Mean Value Theorem to express remainder in terms of $$ f^{(5)}( \xi\ ) $$ for $$ \xi\ \in [x_0,x]  $$

3) Assume (1.2) and (1.3) are correct. Perform integration by parts once more to verify (1.2) and (1.3) for $$ (n+1) \ $$ expansion with $$ R_{(n+2)}(x) \ $$

4) Use Intergral Mean Value Theorem on (1.3) to show (1.4)

Solution
Required

Integrating by parts


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

\begin{align} \int U'V = UV - \int UV'\\ \int UV' = UV - \int U'V\\ \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 *  (1.1)
 * }
 * }

Part 1) 1st term Derive the first term down below from

Taking integration by parts from the integrating part of the LHS,

Back to the main equation including the factorial term,

2nd term Derive the first term down below from

Note: Integrating by parts

Taking integration by parts from the integrating part of the LHS,

Back to the main equation including the factorial term,

3rd term Derive the first term down below from

Taking integration by parts from the integrating part of the LHS,

Back to the main equation including the factorial term,

In conclusion,

Part.2)

Consider the remainder as a function that we derived in HW1, prob3

Applying the remainder function to below equation,

Integrating the integration part of the RHS of the equation yields,


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

$$\displaystyle \begin{align} \therefore \frac{1}{4!} \int_{x_0}^{x} (x-t)^4 \cdot f^{(5)}(t) dx = \frac{(x-x_0)^5}{5!} f^{(5)}(\xi) \quad _{for} \quad w(x) \geqq 0 \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = | (1.17)
 * }
 * }

Part.3) Derive the first term down below from

With same method as used in part a), use integrating by parts again,

Back to the main equation including the factorial term,

Part.4) Consider the remainder as a function that we derived in HW1, prob3

Applying below IMVT to equation (1.22)

Integrating the integration part of the RHS of the equation yields,


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

$$\displaystyle \begin{align} \therefore \frac{1}{(n+1)!}\int_{x_0}^{x} (x-t)^{n+1} \cdot f^{(n+2)}(t) dx = \frac{(x-x_0)^{n+2}}{(n+2)!}f^{(n+2)}(\xi) \quad _{for} \quad w(x) \geqq 0 \end{align} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = | (1.25)
 * }
 * }

Author EGM6341.s11.TEAM1.Yoon 11:13, 26 January 2011 (UTC) - Primary Author

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 $$

Solution
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"


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

$$\begin{align}       =0.9239 + (x-\frac{3\pi}{8})(\cos(\frac{3\pi}{8})) \end{align}$$
 * }


 * {| 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 P_2(x) = P_1(x) + \frac{(x-x_0)^{(2)}}{2!} f^{(2)}(x_0) $$

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


 * {| 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 P_3(x) = P_2(x) + \frac{(x-x_0)^{3}}{3!} f^{(3)}(x_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}))  $$
 * }


 * {| 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 P_4(x) = P_3(x) + \frac{(x-x_0)^{4}}{4!} f^{(4)}(x_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})) $$
 * }


 * {| 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 P_5(x) = P_4(x) + \frac{(x-x_0)^{5}}{5!} f^{(5)}(x_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})) $$
 * }


 * {| 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 P_6(x) = P_5(x) + \frac{(x-x_0)^{6}}{6!} f^{(6)}(x_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})) $$
 * }


 * {| 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 P_7(x) = P_6(x) + \frac{(x-x_0)^{7}}{7!} f^{(7)}(x_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})) $$
 * }


 * {| 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 P_8(x) = P_7(x) + \frac{(x-x_0)^{8}}{8!} f^{(8)}(x_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})) $$
 * }


 * {| 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 P_9(x) = P_8(x) + \frac{(x-x_0)^{9}}{9!} f^{(9)}(x_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})) $$
 * }


 * {| 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 P_{10}(x) = P_9(x) + \frac{(x-x_0)^{10}}{10!} f^{(10)}(x_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})) $$
 * }


 * {| 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: 
 * }









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.3) 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 --EGM6341.s11.TEAM1.Sujin 00:03, 30 January 2011 (UTC)

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:

Solution
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%" |

(3.4)
 * 
 * }
 * ,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}$$
 * style="width:95%" |
 * style="width:95%" |

(3.5)
 * 
 * }


 * {| 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}$$ ;
 * style="width:95%" |
 * style="width:95%" |

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)
 * 
 * }


 * 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}$$
 * style="width:95%" |
 * style="width:95%" |

(3.7)
 * 
 * }
 * Plugging eqn.(3.6) and eqn.(3.7) 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}$$
 * style="width:95%" |
 * style="width:95%" |

$$\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}$$
 * }


 * 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} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |

(3.9)
 * 
 * }


 * 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}$$ Also, we obtained $$\begin{align} R_{n+1}[f(x)=\frac{e^x-1}{x};x] \end{align}$$ in 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%" |
 * }

Author --EGM6341.s11.TEAM1.Sujin 00:03, 30 January 2011 (UTC)

Find
1) Plot f(x)

2) Integrate f (find $$ I_n \ $$) for n=2,4,8...until error of order $$ 10^6 \ $$,using the following methods:

2a) Taylor Series Expansion $$ f_n \ $$

2b) Computational Trapezoidal Rule

2c) Composite Simpson Rule

2d) Gauss Legendre Quadrature

Solution
Part 1



 Matlab code: 

Part 2A (Taylor series)

From Homework 1.2 ,

To integrate,

Using the error definition given in Meeting 7-1 :

From Homework 1.2 ,

By the Integral Mean Value Theorem,

Finding the maximum and minimum of $$f(x)$$ on the interval and applying the Intermediate Value Theorem,

So the error will be bounded depending on $$n$$ in the following table

Using equation 4.5, the value for the integral for each respective $$n$$ are:

 Matlab code: 

Part 2B (Trapezoidal Rule)

For the following parts, Wolfram Alpha was used to determine the "actual" value of $$I(x)$$ to be

The trapezoidal rule states:

Exercising this for a variety of $$n$$ and replacing the value of $$f(0)$$ whenever encountered with $$f(0)=1$$ (from HW1.1 ), the following table is generated:

 Matlab code: 

Part 2C (Simpson's Rule)

Simpson's rule states:

Exercising this for a variety of $$n$$ and replacing the value of $$f(0)$$ whenever encountered with $$f(0)=1$$ (from HW1.1 ), the following table is generated:

 Matlab code: 

Part 2D (Gauss-Legendre Quadrature)

The Gauss-Legendre Quadrature states:

where the values for $$x_i$$ and $$w_i$$ are the roots of the Legendre polynomial of order $$n$$ and their associated weights, respectively.

Exercising this for a variety of $$n$$ and replacing the value of $$f(0)$$ whenever encountered with $$f(0)=1$$ (from HW1.1 ), the following table is generated:

 Matlab code: 

Author Egm6341.s11.team1.arm 02:43, 31 January 2011 (UTC)

Find
Verify given table against NIST Handbook.

Solution
The table checks with the values presented in the | NIST Handbook of Mathmatical Functions (NIST values are in decimal format).

Author Egm6341.s11.team1.arm 19:59, 2 February 2011 (UTC)

Given
Where $$ \in \Rho\ _n= $$ set of polynomials of degrees less than or equal to n

Find
Verify Eq6.3 thru Eq6.7 using Eq6.1 and Eq6.2

Solution
When n = 0:

Matlab generated Polynomials n=0 through 4

When n = 1:

Matlab generated Polynomials n=0 through 4

When n = 2:

Matlab generated Polynomials n=0 through 4

When n = 3:

Matlab generated Polynomials n=0 through 4

When n = 4:

Matlab generated Polynomials n=0 through 4

Author EGM6341.s11.TEAM1.Yoon 11:13, 26 January 2011 (UTC) - Primary Author

Find
1) Verify the family of Legendre Polynomials as shown in $$Eq. 7.1$$ is orthogonal for $$ n=0,1,...,5 \ $$

2) Construct Gram Matrix: $$ \underline{ \Gamma\ } $$ as shown in $$Eq. 7.2$$

3) Show Gram Matrix:$$ \underline{ \Gamma\ } $$ is diagonal and compute the determinate.

for $$ P_0, P_1,P_3 \ $$, do by hand.

for $$ P_4, P_5,P_6 \ $$, use WolframAlpha (http://www.wolframalpha.com/) and link in the solution.

HINT: If family of Legendre Polynomials is orthogonal, the Gram Matrix:$$ \underline{ \Gamma\ } $$ should be diagonal.

Solution
1) Here we verified for the general case of the family of Legendre Polynomials as shown in $$Eq. [7.1]$$ is orthogonal and in Part 2 and 3 we varified for the Particular cases of $$ n=0,1,...,5 \ $$

We start off by writing out the Legendre polynomials as follows

Next we want to multiply the above $$Eq. [7.2]$$ by $$P_m(x)$$ and integrating over the closed interval $$[-1,1].$$

We are going to want to use integration by parts where

We want to show that for each time we use integration by parts that the boundary term of each integration will be zero over the interval $$[-1,1].$$

Now let's interchange $$n$$ and $$m$$.

If we take $$Eq. 7.7$$ and subtract it from $$Eq. 7.6$$ we will obtain an expression which tells us something about the orthogonality of the Legendre Polynomials.

Therefore,for the general result of $$m\ne n$$

For $$ m = n \,\!$$

where $$N_n(x)$$ is a normalization constant. We can obtain an expression for the normalization constant by considering the Rodriguez formula for the Legendre Polynomial.

Again, as we did before in $$Eq. [7.4],$$ we are going to integrate by parts, but this time we are going to repeat the integration $$ n $$ times.

To take the nth derivative of the product in the integrand above in $$ Eq. [7.14]$$ we use the general Leibnitz Rule for the nth derivative of a product.

After applying the above Leibnitz Rule to $$ Eq. [7.14]$$ we come to the following evaluation of the 2n-fold derivative of the product $$(x^2-1)^n.$$

allowing us to express the normalization constant $$N_n(x)$$ as the following:

Now we can rewrite the integrand in $$ Eq. [7.15].$$

Plugging $$ Eq. [7.16]$$ into $$Eq. [7.15]$$ gives us:

Note that:

Recalling $$ Eq. [7.15],$$ we can now express the $$2^{nd}$$ term of $$Eq. [7.20]$$ as:

Using $$ Eq. [7.21]$$ we can rewrite $$ Eq. [7.20]$$ as:

Rearranging shows:

$$Eq. [7.23]$$ shows that the value of $$(2n+1)N_n(x)$$ is a constant and independent of $$n.$$ This is due to the fact that both the R.H.S. and L.H.S. of $$Eq. [7.23]$$ have the same dependence on $$n$$, therefore showing that overall, the R.H.S. with respect to the L.H.S. of $$Eq. [7.23]$$ is independent of $$n$$.This allows us to evaluate $$(2n+1)N_n(x)$$ at $$n=0$$:

Dividing $$Eq. [7.24]$$ through by $$2n+1$$ gives us the sought after result:

2) Construct Gram Matrix: $$ \underline{ \Gamma\ } $$ as shown in $$Eq. [7.2]$$

Let's calculate the inner products for the particular cases $$n=0,1,...,5.$$

We will integrate the rest of the inner products via Wolframalpha to not only obtain the remaining terms of the Gram Matrix, but as well test our predictions in Part 1 for the general solution of the inner products of orthogonal functions.

Note that the prediction for the normalization constant of orthogonal functions in Part 1 of this problem in $$Eq. [7.25]$$ was proven correct with $$Eq.[7.33], Eq.[7.39], Eq.[7.40], Eq.[7.44-45].$$ Now that we have obtained all the components of the Gram Matrix, we can plug in the values and is that it is indeed a diagonal matrix.

3) Show Gram Matrix:$$ \underline{ \Gamma\ } $$ is diagonal and compute the determinate.

We can already see from above in Part 2 that the Gram Matrix is a diagonal matrix. The determinant is easy computed for diagonal matrices because it's nothing more than the product of the pivot terms (i.e. diagonal terms).

Author Egm6341.s11.team-1.langpm 21:46, 31 January 2011 (UTC)

Find
Derive Eq8.2 from Eq8.1

Solution
Use Newton-Cotes Method. Integration of

and

Set $$x0 = a$$, $$x1 = b$$, $$x$$ in $$[a,b]$$, we get

Where

So,

which equals 1 for $$x=x_0$$ and 0 for $$x=x_1$$, and

which equals 0 for $$x=x_0$$ and 1 for $$x=x_1$$.

Author EGM6341.s11.team1.Chiu 13:50, 2 February 2011 (UTC)

Find
Use $$Eq. [9.1]$$ to generate Legendre Polynomial $$ P_5(x) \ $$.

Use MATLAB command 'roots" to compare the roots of $$ P_5(x) \ $$ to check values in table below.

Plot the roots on $$\left[ -1,1\right]$$ using MATLAB "plot" command. Plot dots "." with coordinates $$ \left ( x_i,y_i \right ), i=1,...,5 $$

Use roots of $$ P_5(x) = x_i \ $$ and $$ y_i=0 \ $$, markersize=14.

Repeat above steps for $$ P_{10}(x) \ $$. Observe the location of the roots near end points $$\left[-1\right]$$ and $$\left[1\right].$$

Solution
Simplifying the coefficients we come to the finally expression for the $$5th$$ order Legendre Polynomial:

Author Egm6341.s11.team-1.langpm 20:37, 31 January 2011 (UTC)

Find
Use Eq10-1 and Eq10-2 to find an expression for $$ \left \{ c_i \right \} $$ in terms of $$ \left ( x_i,f(x_i), i=0,1,2 \right )$$

Solution
Substitute for $$ i=0,1,2 \ $$, into Eqs 10.1 and 10.2 to obtain the following three equations with three unknowns:

Solve for $$ c_0, c_1, \ $$ and $$ c_2 \ $$ to obtain expressions of $$ \left \{ c_i \right \} $$ in terms of $$ \left ( x_i,f(x_i), i=0,1,2 \right )$$

Author

Find
Use Eq11-1 to derive Simple Simpson's Rule

Solution
$$p_2 \ $$ must be integrated from $$x_0 \ $$ to $$x_2 \ $$. To simplify, $$x_0 \ $$ and $$x_2 \ $$ can be set to -1 and 1, respectively, without loss of generality.

Author Egm6341.s11.team1.arm 03:21, 1 February 2011 (UTC)

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 $$

I = 2.1145wolframAlpha
 * {|class = "wikitable collapsible"

!colspan="3"| 3) Plot $$ l_0,l_1,l_2 \ $$ for $$ n=5 \ $$
 * n
 * In
 * En
 * 1
 * 2.35040238
 * -0.23590238
 * 2
 * 2.11680663
 * -0.00230663
 * 4
 * 2.11451758
 * -0.00001758
 * 8
 * 2.11450788
 * -0.00000788
 * }
 * 8
 * 2.11450788
 * -0.00000788
 * }
 * }

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

Co-Author --EGM6341.s11.TEAM1.Sujin 20:03, 2 February 2011 (UTC)

Find
Show that Eq13.2 can be derived from Eq13.1.

Show that Eq13.4 can be derived from Eq13.3.

Solution
Trapezoidal Rule

The trapezoidal rule states:

When $$b-a \ $$ is not sufficiently small, the trapezoidal rule is not useful. Then, we break it into a sum of integrals over small subintervals.

Set $$n \geq 1$$, $$h=\frac{b-a}{n}$$, and $$x_j=a+jh \ $$ for $$j=0,1, \ldots ,n$$ with $$x_j-1 \leq \eta_j \leq x_j$$

We get:

The first terms in the sum can be combined to give the composite trapezoidal rule:

Simpson's Rule

Simpson's rule states:

Set $$n \geq 2$$ and even, define $$h=\frac{b-a}{n}$$, $$x_j = a+jh \ $$ for $$j=0,1,\ldots,n$$ with $$x_{2j-2} \leq \eta_j \leq x_{2j}$$,

Hence, we get the composite Simpson's rule by using the same method as the above,

Author EGM6341.s11.team1.Chiu 14:51, 2 February 2011 (UTC)

Find
Give details to obtain Eq14.1

Solution
Knowing that:

From Lecture 2-2, Eq1:

From Atkinson, pg270, Eq (5.3.1)

Also from Atkinson, pg270, Eq (5.3.2)

By combining terms in Eq14.3, Eq14.4 and Eq14.5 and given the definition of Eq14.2, it can be shown that:

AuthorEGM6341.s11.TEAM1.WILKS 06:39, 30 January 2011 (UTC)EGM6341.s11.TEAM1.WILKS

Signatures
Solved problem 1 -- EGM6341.s11.TEAM1.Yoon 11:13, 26 January 2011 (UTC) - Primary Author

Solved problem 2 -- EGM6341.s11.TEAM1.Sujin 00:05, 30 January 2011 (UTC)

Solved problem 3 -- EGM6341.s11.TEAM1.Sujin 00:05, 30 January 2011 (UTC)

Solved problem 4 -- Egm6341.s11.team1.arm 02:43, 31 January 2011 (UTC)

Solved problem 5 -- Egm6341.s11.team1.arm 19:59, 2 February 2011 (UTC)

Solved problem 6 -- EGM6341.s11.TEAM1.Yoon 11:13, 26 January 2011 (UTC) - Primary Author

Solved problem 7 -- Egm6341.s11.team-1.langpm 21:46, 31 January 2011 (UTC)

Solved problem 8 -- EGM6341.s11.team1.Chiu 13:50, 2 February 2011 (UTC)

Solved problem 9 -- Egm6341.s11.team-1.langpm 21:46, 31 January 2011 (UTC)

Solved problem 10 -- EGM6341.s11.TEAM1.WILKS 18:46, 29 January 2011 (UTC)EGM6341.s11.TEAM1.WILKS

Solved problem 11 -- Egm6341.s11.team1.arm 03:21, 1 February 2011 (UTC)

Solved problem 12 -- EGM6341.s11.TEAM1.Yoon 11:13, 31 January 2011 (UTC) - Co-Author, EGM6341.s11.TEAM1.Sujin 00:05, 30 January 2011 (UTC) - Co-Author

Solved problem 13 -- EGM6341.s11.team1.Chiu 14:51, 2 February 2011 (UTC)

Solved problem 14 -- EGM6341.s11.TEAM1.WILKS 06:40, 30 January 2011 (UTC)EGM6341.s11.TEAM1.WILKS