User:Egm6341.s10.team3.heejun/HW3

= (2) Error bound for Composite Simpson's Rule=

Problem Statement
$$ \displaystyle Show\, the\, error\, for\, Composite\, Simpson's\, Rule,\, $$ $$ \displaystyle \left| {E}_{n}^{2} \right| \leq \frac{(b-a)^{5}}{2880 n^{4}} M_{4} = \frac{(b-a)h^{4}}{2880} M_{4} $$ $$ \displaystyle Where\,\, M_{4} := max \left| f^{4}(\xi) \right| \,\, and \,\, \xi \in [a,b]$$

Ref: Lecture Notes [[media:Egm6341.s10.mtg17.djvu|p.17-2]]

Solution
Ref: Lecture Notes [[media:Egm6341.s10.mtg16.pdf|p.16-2&3]]

$$ \begin{align} \displaystyle E_{n}^{2} &:= I - I_{n} \\ &=\int_{a}^{b}f(x)dx - \frac{h}{3}[f(x_{0})+4f(x_{1})+2f(x_{2})+...+2f(x_{n-2})+4f(x_{n-1})+f(x_{n})] \\ &=\sum_{i=1}^{n} [ \int_{x_{i-1}}^{x_{i}}f(x)dx - \frac{h}{3}[f(x_{i-1}) + 4f(\frac{(x_{i-1}+x_{i})}{2}) + f(x_{i})] \\\end{align}\ $$

$$ \left| E_{n}^{2} \right| \leq \left| \frac{h^{5}}{90} \underbrace {\sum_{n}^{i=1}max\left(F^{(4)}(\xi )\right)}_{Call \bar{M}_{4}} \right| $$ $$ \displaystyle \xi \in [x_{i-1},x_{i}] $$

Ref: Lecture Notes [[media:Egm6341.s10.mtg14.pdf|p.14-1]]

$$ \Rightarrow M_{4} := max \left| f^{(4)}(\xi)\right| $$ $$ \displaystyle \xi \in [a,b] $$

$$ \bar{M}_{4} \leq n \times M_{4} $$

$$ \Rightarrow \left| E_{n}^{2} \right| \leq \left| \frac{(b-a)^{5}}{2880n^{5}}nM_{4} \right| = \left| \frac{(b-a)(b-a)^{4}}{2880n^{4}} \right| = \frac{(b-a)h^{4}}{2880}M_{4} $$ where $$ \displaystyle h= \frac{(b-a)}{n} $$

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

$$\displaystyle \displaystyle \left| {E}_{n}^{2} \right| \leq \frac{(b-a)^{5}}{2880 n^{4}} M_{4} = \frac{(b-a)h^{4}}{2880} M_{4} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = |
 * }
 * }

--Heejun Chung 18:14, 17 February 2010 (UTC)

Problem Statement
$$ \displaystyle I=\int_{0}^{\pi}e^{x}cos(x)dx,\,\, $$ $$\displaystyle Evaluate\, I_{n}, E_{n}, Ratio \,\, and \,\, \bar{E}_{n}\, by\, Trapezoidal\, rule.\,\,\, where\,\,\, n=1,2...,9 \,$$

Ref: Lecture Notes [[media:Egm6341.s10.mtg17.djvu|p.17-3]]

Solution
=Matlab Code for Trapezoidal Rule= MATLAB Code

Results: Trapezoidal Rule

Formula a) Comp. Trap. rule $$ \int_{a}^{b}f(x)dx=\frac{b-a}{2n}*[f(x_{0})+2f(x_{1})+2f(x_{2})+.........+2f(x_{n-1})+f(x_{n})] $$

b) Corrected Trap. rule $$ \int_{a}^{b}f(x)dx=\frac{b-a}{2n}*[f(x_{0})+2f(x_{1})+2f(x_{2})+.........+2f(x_{n-1})+f(x_{n})]-\frac{h^2}{12}*[f^{'}(b)-f^{'}(a)] $$

c) Asymptotic error $$ \bar{E}_{n} \equiv -\frac{h^{2}}{12}[f^{'}(b)-f^{'}(a)] $$

--Heejun Chung 01:31, 17 February 2010 (UTC)