User:Egm6341.s11.team4.hylon/hw6

=Problem 6.2 Derive Expression for Higher Order Trapezoidal Rule Error=

Problem Statement
Refer to lecture notes [[media:nm1.s11.mtg31.djvu|31-3]] for more detailed description.

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

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

\begin{align} & E_{n}^{T}=I-{{T}_{0}}(n) \\ & =\sum\limits_{r=1}^{l}{{{h}^{2r}}{{{\bar{d}}}_{2r}}[{{f}^{2r-1}}(b)-{{f}^{2r-1}}(a)]-{{(\frac{h}{2})}^{2r}}\sum\limits_{k=0}^{n-1}{\int\limits_^{{{P}_{2l}}({{t}_{k}}(x)){{f}^{(2l)}}(x)dx}}} \\ \end{align}

$$ And :{| style="width:100%" border="0" $$\displaystyle
 * }
 * style="width:95%" |
 * style="width:95%" |

{{\bar{d}}_{2r}}=\frac{{{P}_{2r}}(1)}

$$
 * }.

Solution
In steps 2ab, we already got
 * {| style="width:100%" border="0"

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

\begin{align} & E=[{{P}_{2}}(t){{g}^{(1)}}(t)]_{-1}^{+1}-\int\limits_{-1}^{+1}{{{P}_{2}}(t){{g}^{(2)}}(t)dt} \\ & {{P}_{2}}(t)=-\frac{2!}+\frac{1}{6} \\ & {{P}_{3}}(t)=-\frac{3!}+\frac{1}{6}t \\ \end{align}

$$ Substitute $$ g(t)=f(x(t))$$, $${{g}^{(i)}}(t)={{(\frac{h}{2})}^{i}}{{f}^{(i)}}(x(t))$$, $$x=\frac{h}{2}t+\frac{{{x}_{k}}+{{x}_{k+1}}}{2} $$ and $$dx=\frac{h}{2}dt $$ into above equation, we have
 * }
 * {| style="width:100%" border="0"

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

\begin{align} & E=[{{P}_{2}}(t){{g}^{(1)}}(t)]_{-1}^{+1}-\underset{-1}{\overset{+1}{\mathop \int }}\,{{P}_{2}}(t){{g}^{(2)}}(t)dt \\ & =[{{P}_{2}}(+1){{(\frac{h}{2})}^{1}}{{f}^{(1)}}({{x}_{k+1}})-{{P}_{2}}(-1){{(\frac{h}{2})}^{1}}{{f}^{(1)}}({{x}_{k}})]-\underset{\overset{\mathop \int }}\,{{P}_{2}}(\frac{x-{{x}_{k+1}}+x-{{x}_{k}}}{h}){{(\frac{h}{2})}^{2}}{{f}^{(2)}}(x)\frac{2}{h}dx \\ & ={{(\frac{h}{2})}^{1}}{{P}_{2}}(1)[{{f}^{(1)}}({{x}_{k+1}})-{{f}^{(1)}}({{x}_{k}})]-{{(\frac{h}{2})}^{1}}\underset{\overset{\mathop \int }}\,{{P}_{2}}(\frac{x-{{x}_{k+1}}+x-{{x}_{k}}}{h}){{f}^{(2)}}(x)dx \\ \end{align}

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

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

\begin{align} & E_{1}^{T}=\frac{h}{2}\sum\limits_{k=0}^{0}{E} \\ & ={{(\frac{h}{2})}^{2}}{{P}_{2}}(1)\sum\limits_{k=0}^{0}{[{{f}^{(1)}}({{x}_{k+1}})-{{f}^{(1)}}({{x}_{k}})]}-{{(\frac{h}{2})}^{2}}\sum\limits_{k=0}^{0}{\underset{\overset{\mathop \int }}\,{{P}_{2}}(\frac{x-{{x}_{k+1}}+x-{{x}_{k}}}{h}){{f}^{(2)}}(x)dx} \\ & ={{(\frac{h}{2})}^{2}}{{P}_{2}}(1)[{{f}^{(1)}}(b)-{{f}^{(1)}}(a)]-{{(\frac{h}{2})}^{2}}\sum\limits_{k=0}^{0}{\underset{\overset{\mathop \int }}\,{{P}_{2}}(\frac{x-{{x}_{k+1}}+x-{{x}_{k}}}{h}){{f}^{(2)}}(x)dx} \\ \end{align}

$$ And in step 3ab, we also obtained
 * }
 * {| style="width:100%" border="0"

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

\begin{align} & E=[{{P}_{2}}(t){{g}^{(1)}}(t)+{{P}_{4}}(t){{g}^{(3)}}(t)]_{-1}^{+1}-\int\limits_{-1}^{+1}{{{P}_{4}}(t){{g}^{(4)}}(t)dt} \\ & {{P}_{4}}(t)=-\frac{4!}+\frac{1}{6}\frac{2!}-\frac{7}{360} \\ & {{P}_{5}}(t)=-\frac{5!}+\frac{1}{6}\frac{3!}-\frac{7}{360}t \\ \end{align}

$$ Using the same technique for step2ab, we have
 * }
 * {| style="width:100%" border="0"

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

\begin{align} & E=[{{P}_{2}}(t){{g}^{(1)}}(t)+{{P}_{4}}(t){{g}^{(3)}}(t)]_{-1}^{+1}-\underset{-1}{\overset{+1}{\mathop \int }}\,{{P}_{4}}(t){{g}^{(4)}}(t)dt \\ & ={{(\frac{h}{2})}^{1}}{{P}_{2}}(1)[{{f}^{(1)}}({{x}_{k+1}})-{{f}^{(1)}}({{x}_{k}})]+{{(\frac{h}{2})}^{3}}{{P}_{4}}(1)[{{f}^{(3)}}({{x}_{k+1}})-{{f}^{(3)}}({{x}_{k}})]-\underset{\overset{\mathop \int }}\,{{P}_{4}}(\frac{x-{{x}_{k+1}}+x-{{x}_{k}}}{h}){{(\frac{h}{2})}^{4}}{{f}^{(4)}}(x)\frac{2}{h}dx \\ & ={{(\frac{h}{2})}^{1}}{{P}_{2}}(1)[{{f}^{(1)}}({{x}_{k+1}})-{{f}^{(1)}}({{x}_{k}})]+{{(\frac{h}{2})}^{3}}{{P}_{4}}(1)[{{f}^{(3)}}({{x}_{k+1}})-{{f}^{(3)}}({{x}_{k}})]-{{(\frac{h}{2})}^{3}}\underset{\overset{\mathop \int }}\,{{P}_{4}}(\frac{x-{{x}_{k+1}}+x-{{x}_{k}}}{h}){{f}^{(4)}}(x)dx \\ \end{align}

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

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

\begin{align} & E_{2}^{T}=\frac{h}{2}\sum\limits_{k=0}^{1}{E} \\ & ={{(\frac{h}{2})}^{2}}{{P}_{2}}(1)\sum\limits_{k=0}^{1}{[{{f}^{(1)}}({{x}_{k+1}})-{{f}^{(1)}}({{x}_{k}})]}+{{(\frac{h}{2})}^{4}}{{P}_{4}}(1)\sum\limits_{k=0}^{1}{[{{f}^{(3)}}({{x}_{k+1}})-{{f}^{(3)}}({{x}_{k}})]}-{{(\frac{h}{2})}^{4}}\sum\limits_{k=0}^{1}{\underset{\overset{\mathop \int }}\,{{P}_{4}}(\frac{x-{{x}_{k+1}}+x-{{x}_{k}}}{h}){{f}^{(4)}}(x)dx} \\ & ={{(\frac{h}{2})}^{2}}{{P}_{2}}(1)[{{f}^{(1)}}(b)-{{f}^{(1)}}(a)]+{{(\frac{h}{2})}^{4}}{{P}_{4}}(1)[{{f}^{(3)}}(b)-{{f}^{(3)}}(a)]-{{(\frac{h}{2})}^{4}}\sum\limits_{k=0}^{1}{\underset{\overset{\mathop \int }}\,{{P}_{4}}(\frac{x-{{x}_{k+1}}+x-{{x}_{k}}}{h}){{f}^{(4)}}(x)dx} \\ & =\sum\limits_{r=1}^{2}{{{(\frac{h}{2})}^{2r}}{{P}_{2r}}(1)[{{f}^{(2r-1)}}(b)-{{f}^{(2r-1)}}(a)]-{{(\frac{h}{2})}^{4}}\sum\limits_{k=0}^{1}{\underset{\overset{\mathop \int }}\,{{P}_{4}}(\frac{x-{{x}_{k+1}}+x-{{x}_{k}}}{h}){{f}^{(4)}}(x)dx}} \\ \end{align}

$$ Using the same technique for step $$n$$ab, we can obtain
 * }
 * {| style="width:100%" border="0"

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

\begin{align} & E_{n}^{T}=\frac{h}{2}\sum\limits_{k=0}^{n-1}{E} \\ & =\sum\limits_{r=1}^{l}{{{(\frac{h}{2})}^{2r}}{{P}_{2r}}(1)[{{f}^{(2r-1)}}(b)-{{f}^{(2r-1)}}(a)]-{{(\frac{h}{2})}^{2l}}\sum\limits_{k=0}^{1}{\underset{\overset{\mathop \int }}\,{{P}_{2l}}(\frac{x-{{x}_{k+1}}+x-{{x}_{k}}}{h}){{f}^{(2l)}}(x)dx}} \\ \end{align}

$$ This is also the higher order trapezoidal rule error theorem.
 * }

=Problem 6.3 Verify Bernoulli Number and Comparison with HOTRE=

Problem Statement
Refer to lecture notes [[media:nm1.s11.mtg31.djvu|31-3]] for more detailed description.

Given
Bernoulli numbers:


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

$$\displaystyle \frac{x}{{{e}^{x}}-1}=\sum\limits_{r=0}^{\infty }{\underbrace{\frac{(2r)!}}_{-{{{\bar{d}}}_{2r}}}{{x}^{2r}}} $$
 * style="width:95%" |
 * style="width:95%" |
 * }

1).
Verify $${{\bar{d}}_{2}},{{\bar{d}}_{4}},{{\bar{d}}_{6}}$$

2).
Find $${{\bar{d}}_{8}},{{\bar{d}}_{10}}$$ using above given expression, compare with $${{\bar{d}}_{2r}}=\frac{{{P}_{2r}}(1)}$$, where $${{P}_{2r}}(1)$$ is the polynomial of HOTRE evaluated at $$x=1$$.

Solution
Using Taylor Series to expand $$\frac{1}{{{e}^{x}}-1}$$ at $${{x}_{0}}=0$$ we have
 * {| style="width:100%" border="0"

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

\frac{1}{{{e}^{x}}-1}=\frac{1}{x}-\frac{1}{2}+\frac{x}{12}-\frac{720}+\frac{30240}-\frac{1209600}+\frac{4700160}-\frac{691{{x}^{11}}}{130767436800}+\cdots

$$
 * }

WolframAlpha

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

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

\begin{align} & \frac{x}{{{e}^{x}}-1}=1-\frac{x}{2}+\frac{12}-\frac{720}+\frac{30240}-\frac{1209600}+\frac{4700160}-\frac{691{{x}^{12}}}{130767436800}+\cdots \\ & ={{B}_{0}}+{{B}_{1}}x+\frac{2!}{{x}^{2}}+\frac{4!}{{x}^{4}}+\frac{6!}{{x}^{6}}+\frac{8!}{{x}^{8}}+\frac{10!}{{x}^{10}}+\frac{12!}{{x}^{12}}+\cdots \\ \end{align}

$$ Comparing above equation, we obtain Bernoulli numbers:
 * }
 * {| style="width:100%" border="0"

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

\begin{align} & {{B}_{2}}=\frac{1}{6} \\ & {{B}_{4}}=-\frac{1}{30} \\ & {{B}_{6}}=\frac{1}{42} \\ & {{B}_{8}}=-\frac{1}{30} \\ & {{B}_{10}}=\frac{5}{66} \\ & \vdots \\ \end{align}

$$ Hence we have :{| style="width:100%" border="0" $$\displaystyle
 * }
 * style="width:95%" |
 * style="width:95%" |

\begin{align} & {{{\bar{d}}}_{2}}=-\frac{1}{12} \\ & {{{\bar{d}}}_{4}}=\frac{1}{720} \\ & {{{\bar{d}}}_{6}}=-\frac{1}{30240} \\ & {{{\bar{d}}}_{8}}=\frac{1}{1209600} \\ & {{{\bar{d}}}_{10}}=-\frac{1}{\text{47900160}} \\ \end{align}

$$ From higher order trapezoidal rule error theorem, we already know that
 * }
 * {| style="width:100%" border="0"

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

\begin{align} & {{P}_{2}}=-\frac{2!}+\frac{1}{6} \\ & {{P}_{4}}=-\frac{4!}+\frac{1}{6}\frac{2!}-\frac{7}{360} \\ & {{P}_{6}}=-\frac{6!}+\frac{1}{6}\frac{4!}-\frac{7}{360}\frac{2!}+\frac{31}{15120} \\ & {{P}_{8}}=-\frac{8!}+\frac{1}{6}\frac{6!}-\frac{7}{360}\frac{4!}+\frac{31}{15120}\frac{2!}-\frac{5}{23811} \\ & {{P}_{10}}=-\frac{10!}+\frac{1}{6}\frac{8!}-\frac{7}{360}\frac{6!}+\frac{31}{15120}\frac{4!}-\frac{5}{23811}\frac{2!}+\frac{11}{171629} \\ \end{align}

$$ So, we can get
 * }
 * {| style="width:100%" border="0"

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

\begin{align} & {{{\bar{d}}}_{2}}=\frac{{{P}_{2}}(1)}=\frac{-\frac{1}{2!}+\frac{1}{6}}{4}=-\frac{1}{12} \\ & {{{\bar{d}}}_{4}}=\frac{{{P}_{4}}(1)}=\frac{-\frac{1}{4!}+\frac{1}{6}\frac{1}{2!}-\frac{7}{360}}{16}=\frac{1}{720} \\ & {{{\bar{d}}}_{6}}=\frac{{{P}_{6}}(1)}=\frac{-\frac{1}{6!}+\frac{1}{6}\frac{1}{4!}-\frac{7}{360}\frac{1}{2!}+\frac{31}{15120}}{64}=-\frac{1}{30240} \\ & {{{\bar{d}}}_{8}}=\frac{{{P}_{8}}(1)}=\frac{-\frac{1}{8!}+\frac{1}{6}\frac{1}{6!}-\frac{7}{360}\frac{1}{4!}+\frac{31}{15120}\frac{1}{2!}-\frac{5}{23811}}{256}=\frac{1}{1209600} \\ & {{{\bar{d}}}_{10}}=\frac{{{P}_{10}}(1)}=\frac{-\frac{1}{10!}+\frac{1}{6}\frac{1}{8!}-\frac{7}{360}\frac{1}{6!}+\frac{31}{15120}\frac{1}{4!}-\frac{5}{23811}\frac{1}{2!}+\frac{11}{171629}}{1024}=-\frac{1}{\text{47900160}} \\ \end{align}

$$
 * }