User:Egm6341.s10.team3.sa/Mtg13

Mtg 13: Tue, 26 Jan 10 [[media: Egm6341.s10.mtg13.djvu | Page 13-1]] 

ERROR IN NEWTON-COTES FORMULA: In the previous lecture, we looked at the proof for error in Lagrange interpolation method. We now apply those concepts and formulas to study the error in Newton-Cotes formula.

Theorem: $$\displaystyle E_n := I - I_n$$ $$\displaystyle = \int_a^b \underbrace{\bigg[f(x) - f_n(x) \bigg]}_{e_n(x)} \,dx $$

Recall here that the suffix n denotes the order of the polynomial Also note that, $$\displaystyle e_n(x) $$ is the same as E(x) on [[media: Egm6341.s10.mtg10.djvu | Page 10-2]].

Since we need to have a limit on the error, we now study about the maximum error that can occur in Newton-Cotes method So we turn our attention to the absolute value of $$\displaystyle E_n(x). $$

$$\displaystyle |E_n(x)| \leq \int_a^b |e_n(x)| \,dx$$

Recall from [[media: Egm6341.s10.mtg10.djvu | Page 10-1]] that, $$\displaystyle e_n(x) = \frac{q_{n+1}(x)} {(n+1)!} f^{(n+1)}(\xi), \;\;\; \xi \in [a,b] $$

Let us define, $$\displaystyle M_{n+1} := max f^{(n+1)} (\xi), \;\;\; \xi \in [a,b] $$ So we have,

$$\displaystyle |E_n(x)| \leq \frac{M_{n+1}}{(n+1)!} \int_a^b |q_{n+1}(x)| \,dx$$

APPLICATION: Simple Trapezoidal Rule Let us now apply the above formula (Max error) to the simple trapezoidal rule. Recall that for the simple trapezoidal rule, n=1 and we need two points - i.e,the end points a and b. Hence,

$$\displaystyle q_{n+1}(x) = q_2(x) = (x-a)(x-b)$$

[[media: Egm6341.s10.mtg13.djvu | Page 13-2]] 

Proceeding similarly, $$\displaystyle |E_1| \leq \frac{M_2}{2!} \int_a^b \underbrace{|q_2(x)|}_{\geq 0} \,dx $$

$$\displaystyle = \frac{M_2}{2!} \int_a^b \underbrace{(x-a)}_{\geq 0} \underbrace{(b-x)}_{\geq 0}\,dx$$

$$\displaystyle = \frac{(b-a)^3}{12}M_2 \;\; = \frac{h^3}{12} M_2$$ where, h:= b-a

Note: x-a > 0 for all x and b-x > 0 for all x.


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

HW:
 * style="width:100%; padding:10px; border:2px solid #8888aa" |
 * style="width:100%; padding:10px; border:2px solid #8888aa" |

Show that $$ \displaystyle \color{blue} \left| {E}_{1}\right| \leq \frac{M_{2}}{2!}\int_{a}^{b}\left | q_{2}(x) \right | dx = \frac{{M}_{2}}{2!}\int_{a}^{b}(x-a)(b-x) dx = \frac{{(b-a)}^{3}}{12}{M}_{2} = \frac{h^{3}}{12}M_{2} $$

where $$ \displaystyle \displaystyle \color{blue} h:= b-a $$


 * style = |
 * }
 * }

APPLICATION: Simple Simpson's Rule Let us now apply the above formula (Max error) to the simple Simpson's rule. Recall that for the simple Simpson's rule, n=2 and we need three points. Hence,

$$\displaystyle q_{n+1}(x) = q_3(x) = (x-x_0)(x-x_1)(x-x_2)$$ where, $$\displaystyle x_0 = a \;\;\; x_2 = b \;\;\; and\; x_1 = \frac{a+b}{2} $$

Proceeding similarly, $$\displaystyle |E_2| \leq \frac{M_3}{3!} \int_a^b |(x-a)(x-(a+b)/2)(x-b)| \,dx $$

$$\displaystyle = \frac{(b-a)^4}{196}M_3 \;\; = \frac{2^4 h^4}{196} M_3$$ where, h:= (b-a)/2


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

HW:
 * style="width:100%; padding:10px; border:2px solid #8888aa" |
 * style="width:100%; padding:10px; border:2px solid #8888aa" |

Show that $$ \displaystyle \color{blue} \left| {E}_{n}\right| \leq \frac{{M}_{3}}{3!}\int_{a}^{b}\left|(x-a)(x-\frac{a+b}{2})(x-b) \right| dx = \frac{{(b-a)}^{4}}{196}{M}_{3} = \frac{{2}^{4}{h}^{4}}{196}{M}_{3} $$

where $$ \displaystyle \color{blue} h:=\frac{b-a}{2} \Rightarrow b-a = 2h $$


 * style = |
 * }
 * }

[[media: Egm6341.s10.mtg13.djvu | Page 13-3]] 

 Simpson's rule can integrate exactly a polynomial of order less than or equal to 3

Consider a third order polynomial (as shown in figure) We know that, $$\displaystyle E_2 = \int_a^b (f-f_2) \,dx$$ From the figure, $$\displaystyle E_2 = \underbrace{\alpha_1}_{>0} + \underbrace{\alpha_2}_{<0}$$

It will be seen that $$\displaystyle \alpha_1 \; and \;\alpha_2 $$ will exactly cancel each other and result in zero error.


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

HW:
 * style="width:100%; padding:10px; border:2px solid #8888aa" |
 * style="width:100%; padding:10px; border:2px solid #8888aa" |


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


 * $$\displaystyle \color{blue} c_0=3,$$ $$\displaystyle \color{blue}  c_1=8,$$  $$\displaystyle \color{blue} c_2=-2, \, c_3 =6.$$
 * }
 * }
 * }


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

$$ \displaystyle \color{blue} Compare\, the\, results.$$
 * $$\displaystyle \color{blue} Find\, I\, and\, I_2 \,using\, Simpson's\, rule.$$
 * $$\displaystyle \color{blue} Find\, I\, and\, I_2 \,using\, Simpson's\, rule.$$
 * }
 * }


 * style = |
 * }
 * }