User:Egm6341.s10.Team4.andy/HW3

= Problem 1: Proof of Tighter Error Bound for Simpson's rule [Simple]=

Given
Refer Lecture slide [[media:Egm6341.s10.mtg17.djvu|17-1]] for problem statement.

From Lecture slide [[media:Egm6341.s10.mtg14.pdf|14-1]], Error for Simple Simpson's rule is given by,


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



\begin{align} E_{2} & = -\frac{(b-a)^5}{2880}f^{(4)}(\xi)\ \, \xi \in [a,b] \\ & = -\frac{h^5}{90}f^{(4)}(\xi)\ \, h := \frac{b-a}{2} \end{align} $$ $$
 * $$\displaystyle
 * $$\displaystyle \longrightarrow (1)


 * }.
 * }.

In order to prove the above Error for Simple Simpson's rule [ [[media:Egm6341.s10.mtg15.pdf|proof]] ], we defined


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




 * $$\displaystyle

G(t) := e(t) - t^5 e(1)

$$ $$
 * $$\displaystyle \longrightarrow (2)


 * }.
 * }.

where,


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




 * $$\displaystyle

e(t) := \int_{-t}^{+t} F(t)dt - \frac{t}{3} \left[F(-t)+4F(0)+F(t)\right] \ \, F(t) := f(x(t))

$$ $$
 * $$\displaystyle \longrightarrow (3)


 * }.
 * }.

Find
 Part I.  Try to replicate the proof, by using the below equations instead of Equation (2) and point out where the proof breaks down.


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




 * $$\displaystyle

G(t) := e(t) - t^4 e(1)

$$ $$
 * $$\displaystyle \longrightarrow (4)


 * }.
 * }.


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




 * $$\displaystyle

G(t) := e(t) - t^6 e(1)

$$ $$
 * $$\displaystyle \longrightarrow (5)


 * }.
 * }.

''' Part II. ''' Using Equation(2) find $$\displaystyle G^{(3)}(0) $$ and follow the same steps in the proof. Observer what happens.

Solution
 Part I. Using Equation (4):


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




 * $$\displaystyle

G(t) := e(t) - t^4 \underbrace{e(1)}_{Constant}

$$


 * }.
 * }.

On differentiating,


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




 * $$\displaystyle

\Rightarrow G^{(1)}(t) = e^{(1)}(t) - 4t^3 e(1)

$$


 * }.
 * }.


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




 * $$\displaystyle

\Rightarrow G^{(2)}(t) = e^{(2)}(t) - 12t^2 e(1)

$$


 * }.
 * }.


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




 * $$\displaystyle

\Rightarrow G^{(3)}(t) = e^{(3)}(t) - 24t e(1)

$$ $$
 * $$\displaystyle \longrightarrow (6)


 * }.
 * }.

From, HW2-Problem-14-Solution and from the lecture slide [[media:Egm6341.s10.mtg15.pdf|15-2]] we know,


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




 * $$\displaystyle

e^{(3)}(t) = -\frac{t}{3} \left[ F^{(3)}(t) - F^{(3)}(-t)\right]

$$ $$
 * $$\displaystyle \longrightarrow (7)


 * }.
 * }.

Applying Rolle's theorem thrice 15-2], we have shown that


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




 * $$\displaystyle

\exists \ \zeta_3 \in \ (0,\zeta_2) \ such\ that\ G^{(3)}(\zeta_3) = 0,

$$ $$
 * $$\displaystyle \longrightarrow (8)


 * }.
 * }.

Substituting Equations (7) and (8) in (6),


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



\begin{align} \Rightarrow G^{(3)}(\zeta_3) &= e^{(3)}(\zeta_3) - 24\zeta_3 e(1) \\ &= -\frac{\zeta_3}{3} \left[ F^{(3)}(\zeta_3) - F^{(3)}(-\zeta_3)\right] - 24\zeta_3 e(1) \\ &= 0 \end{align} $$ $$
 * $$\displaystyle
 * $$\displaystyle \longrightarrow (9)


 * }.
 * }.

Using DMVT [[media:Egm6341.s10.mtg12.pdf|Derivative Mean Value Theorem, 12-1]], we get


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



\begin{align} \Rightarrow \left[ F^{(3)}(\zeta_3) - F^{(3)}(-\zeta_3) \right] &= \left[ \zeta_3 - (-\zeta_3) \right] F^{(4)}(\zeta_4) \\ &= 2\zeta_3 F^{(4)}(\zeta_4) \end{align} $$ $$
 * $$\displaystyle
 * $$\displaystyle \longrightarrow (10)


 * }.
 * }.

Using Equation (10) in (9),


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




 * $$\displaystyle

\Rightarrow 0 = -\frac{2\zeta_{3}^{2}}{3} F^{(4)}(\zeta_4) - 24\zeta_3 e(1)

$$ $$
 * $$\displaystyle \longrightarrow (11)


 * }.
 * }.

Solving for $$\displaystyle e(1) $$,


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




 * $$\displaystyle

\Rightarrow e(1) = -\frac{\zeta_{3}}{36} F^{(4)}(\zeta_4)

$$ $$
 * $$\displaystyle \longrightarrow (12)
 * }.
 * }.

We know from Lecture slide [[media:Egm6341.s10.mtg14.pdf|14-2]],


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




 * $$\displaystyle

E_{2} = I - I_2 = \frac{b-a}{2}e(1) = h e(1)

$$ $$
 * $$\displaystyle \longrightarrow (13)
 * }.
 * }.

On substituting Equation (12) in (13) gives us,


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




 * $$\displaystyle

\Rightarrow E_{2} = - h \frac{\zeta_{3}}{36} F^{(4)}(\zeta_4)

$$ $$
 * $$\displaystyle \longrightarrow (14)
 * }.
 * }.

From the relationship between $\displaystyle \xi$ and $\displaystyle \zeta_4$ we have,


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




 * $$\displaystyle

\Rightarrow \displaystyle F^4(\zeta_4)=\frac{(b-a)}{16} ^4\cdot f^4(\xi)

$$ $$
 * $$\displaystyle \longrightarrow (15)
 * }.
 * }.

Equation (14) then becomes,


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




 * $$\displaystyle

\Rightarrow E_{2} = - \frac{\zeta_{3}(b-a)^5}{1152} f^{(4)}(\xi)

$$ $$
 * $$\displaystyle \longrightarrow (16)
 * }.
 * }.

This error equation has an extra term $$\displaystyle \zeta_{3} $$ on the numerator as opposed to Equation (1). The proof breaks down in Equation (11), where we expect $$\displaystyle \zeta_{3}^2 $$ to cancel out, only if we had $$\displaystyle -24\zeta_{3}^2 e(1) $$ instead of $$\displaystyle -24\zeta_{3} e(1) $$.

 Part I. Using Equation (5):

On differentiating Equation (5),


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




 * $$\displaystyle

\Rightarrow G^{(3)}(t) = e^{(3)}(t) - 120t^3 e(1)

$$ $$
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (17)


 * }.
 * }.

In this case, Equation (11) becomes,


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




 * $$\displaystyle

\Rightarrow 0 = -\frac{2\zeta_{3}^{2}}{3} F^{(4)}(\zeta_4) - 120\zeta_3^3 e(1)

$$ $$
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (18)


 * }.
 * }.

Solving for $$\displaystyle e(1) $$,


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




 * $$\displaystyle

\Rightarrow e(1) = -\frac{1}{180\zeta_{3}} F^{(4)}(\zeta_4)

$$ $$
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (19)
 * }.
 * }.

Substituting in Equation (13),


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




 * $$\displaystyle

\Rightarrow E_{2} = - h \frac{1}{180\zeta_{3}} F^{(4)}(\zeta_4)

$$ $$
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (20)
 * }.
 * }.

Using Equation (15),


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




 * $$\displaystyle

\Rightarrow E_{2} = -  \frac{(b-a)^5}{5760\zeta_{3}} f^{(4)}(\xi)

$$ $$
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (21)
 * }.
 * }.

Here also an extra term $$\displaystyle \zeta_{3} $$ is on the denominator as opposed to Equation (1). The proof breaks down in Equation (18), where we expect $$\displaystyle \zeta_{3}^2 $$ to cancel out, only if we had $$\displaystyle -120\zeta_{3}^2 e(1) $$ instead of $$\displaystyle -120\zeta_{3}^3 e(1) $$.

So in order to have a tighter bound on the Error Equation, we choose $$\displaystyle G(t) $$ to be $$\displaystyle e(t)-t^5 e(1) $$, in which case Equation (11) becomes,


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




 * $$\displaystyle

\Rightarrow 0 = -\frac{2\zeta_{3}^{2}}{3} F^{(4)}(\zeta_4) - 60\zeta_3^2 e(1)

$$ $$
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (22)


 * }.
 * }.

Here $$\displaystyle \zeta_{3} $$ term cancels out to give,


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




 * $$\displaystyle

\Rightarrow e(1) = -\frac{1}{90} F^{(4)}(\zeta_4)

$$ $$
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (23)
 * }.
 * }.

and the Error Equation becomes,


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




 * $$\displaystyle

\Rightarrow E_{2} = -  \frac{(b-a)^5}{2880} f^{(4)}(\xi)

$$ $$
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (24)
 * }.
 * }.

''' Part II. '''

Using Equation (7) in the third derivative of $$\displaystyle G(t) = e(t)-t^5 e(1) $$ we have,


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




 * $$\displaystyle

G^{(3)}(t) = -\frac{t}{3} \left[ F^{(3)}(t) - F^{(3)}(-t)\right] - 60t^2 e(1)

$$ $$
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (25)


 * }.
 * }.

At $$\displaystyle t = 0$$,


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



\begin{align} \Rightarrow G^{(3)}(0) &= -\frac{0}{3} \left[ F^{(3)}(0) - F^{(3)}(-0)\right] - 60(0)^2 e(1) \\ &= 0
 * $$\displaystyle

\end{align} $$ $$
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (26)


 * }.
 * }.

Since $$\displaystyle G^{(3)}(t)$$ is zero at $$\displaystyle t = 0$$ and $$\displaystyle t = \zeta_3$$ [from Equation (8)],


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




 * $$\displaystyle

\exists \ \zeta_4 \in \ (0,\zeta_3) \ such\ that\ G^{(4)}(\zeta_4) = 0,

$$ $$
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (27)


 * }.
 * }.

Please note that, $$\displaystyle (0,\zeta_3) $$ is an open interval and $$\displaystyle \zeta_4 \ne 0 $$ or $$\displaystyle \zeta_4 \ne \zeta_3 $$.

Now on differentiating Equation (25),


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




 * $$\displaystyle

G^{(4)}(t) = -\frac{1}{3} \left[ F^{(3)}(t) - F^{(3)}(-t)\right] -\frac{t}{3} \left[ F^{(4)}(t) + F^{(4)}(-t)\right] - 120t e(1)

$$ $$
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (28)


 * }.
 * }.

At $$\displaystyle \zeta_4 $$,


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



\begin{align} \Rightarrow G^{(4)}(\zeta_4) &= -\frac{1}{3} \underbrace{\left[ F^{(3)}(\zeta_4) - F^{(3)}(-\zeta_4)\right]}_{2 \zeta_4 F^{(4)}(\zeta_5)} -\frac{\zeta_4}{3} \left[ F^{(4)}(\zeta_4) + F^{(4)}(-\zeta_4)\right] - 120\zeta_4 e(1) \\ &= 0 \end{align} $$ $$
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (29)


 * }.
 * }.

where $$\displaystyle \zeta_5 \in [-\zeta_4,\zeta_4]$$.

Solving for $$\displaystyle e(1)$$ we have,


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




 * $$\displaystyle

\Rightarrow e(1) = -\frac{1}{180}  F^{(4)}(\zeta_5) - \frac{1}{360} \left[ F^{(4)}(\zeta_4) + F^{(4)}(-\zeta_4)\right]

$$ $$
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (30)


 * }.
 * }.

Using the relationship between $\displaystyle \xi$ and $\displaystyle \zeta_4$ we have,


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




 * $$\displaystyle

\Rightarrow e(1) = -\frac{(b-a)^4}{2880}  f^{(4)}(\xi_2) - \frac{(b-a)^4}{5760} \left[ f^{(4)}(\xi_1) + f^{(4)}(-\xi_1)\right]

$$ $$
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (31)


 * }.
 * }.

where $$\displaystyle \xi_1 = x_1 + h \zeta_4 $$ and $$\displaystyle \xi_2 = x_1 + h\zeta_5 $$, as we know $$\displaystyle x = x_1 + ht $$ from [[media:Egm6341.s10.mtg14.pdf|14-2]].

So, as long as $$\displaystyle f(x) \in \mathcal{P}_{3}$$ we know $$\displaystyle f^{4}(x) = 0 $$ from [[media:Egm6341.s10.mtg14.pdf|14-1]].

And so, $$\displaystyle e(1) = 0 \Rightarrow E_{2} = 0 $$.

Author
Review and Correction - Egm6341.s10.Team4.andy 16:27, 17 February 2010 (UTC) .

= Problem 2: Error for composite Simpson's rule =

Given
Use composite Simpson's equation (3) on slide [[media:Egm6341.s10.mtg7.pdf|7-2]], which is:


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle I_n=\dfrac{h_1}{3}[f(x_0)+4f(x_1)+2f(x_2)+...+2f(x_{n-2})+4f(x_{n-1})+f(x_n)]


 * }
 * }

Find
To demonstrate error of composite Simpson's rule is equal to the following:


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle 	\left | {E_n}^2\right |\leqslant\dfrac{(b-a)^5}{2880n^4}M_4=\dfrac{(b-a)h^4}{2880}M_4



M_4:=max\left |f^{(4)}(\xi)\right | $$



\xi\in[a,b] $$
 * style= |
 * }.
 * }.

Solution
The error definition can be done as:



{E_n}^2=I-I_n=\int\limits_{a}^{b} f(x)dx-I_n $$

From the composite form of Simpson's rule, we have:



I_n=\dfrac{h_1}{3}[f(x_0)+4f(x_1)+2f(x_2)+...+2f(x_{n-2})+4f(x_{n-1})+f(x_n)] $$



\Rightarrow {E_n}^2=\int\limits_{a}^{b} f(x)dx-\dfrac{h_1}{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\limits_{x_{i-1}}^{x_{i}} f(x)dx-\dfrac{h_1}{3}[f(x_{i-1})+4f(\dfrac{x_{i-1} + x_{i}}{2})+f(x_{i})]] $$

Here, $$\displaystyle h_1 = \frac{x_i - x_{i-1}}{2} $$

According to Lagrange interpolation error for [[media:Egm6341.s10.mtg14.pdf|simple Simpson's rule]] for $$\displaystyle [x_{i-1},x_{i}] $$ ;



\left |{E_n}^2 \right | \le \sum_{i=1}^{n} max \left | \dfrac {(x_{i}-x_{i-1})^5}{2880} f^{(4)}(\xi)\right | =\dfrac{h^5}{2880}\times \sum_{i=1}^{n} max \left | f^{(4)}(\xi)\right | $$



h=x_{i}-x_{i-1} =\dfrac {b-a}{n} $$



M_4:=max\left | f^{(4)}(\xi) \right | $$



\xi\in [x_{i-1},x_{i}] $$



\overline{M_4}:=\sum_{i=1}^{n} max\left |f^{(4)}(\xi) \right | $$



\overline{M_4} = n .M_4 $$



\Rightarrow\left |{E_n}^2\right |\le\dfrac{h^5}{2880}\times n.M_4=\dfrac{h^5}{2880}\times \dfrac{b-a}{h}.M_4 $$


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

$$\displaystyle \Rightarrow\left |{E_n}^2\right | \le \dfrac{(b-a)h^4}{2880} M_4 $$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |


 * style= |

.
 * }
 * }

Author
Review and Correction - Egm6341.s10.Team4.andy 16:27, 17 February 2010 (UTC) .

= Problem 2: Error for composite Simpson's rule [Nima's Solution]=

Given
Use composite Simpson's equation (3) on slide [[media:Egm6341.s10.mtg7.pdf|7-2]], which is:


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle I_n=\dfrac{h}{3}[f(x_0)+4f(x_1)+2f(x_2)+...+2f(x_{n-2})+4f(x_{n-1})+f(x_n)]


 * }
 * }

Find
To demonstrate error of composite Simpson's rule is equal to the following:


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle 	\left | {E_n}^2\right |\leqslant\dfrac{(b-a)^5}{2880n^4}M_4=\dfrac{(b-a)h^4}{2880}M_4



M_4:=max\left |f^{(4)}(\xi)\right | $$



\xi\in[a,b] $$


 * style= |
 * }.
 * }.

Solution
The error definition can be done as:



{E_n}^2=I-I_n=\int\limits_{a}^{b} f(x)dx-I_n $$

From the composite form of Simpson's rule, we have:



I_n=\dfrac{h}{3}[f(x_0)+4f(x_1)+2f(x_2)+...+2f(x_{n-2})+4f(x_{n-1})+f(x_n)] $$



\Rightarrow {E_n}^2=\int\limits_{a}^{b} f(x)dx-\dfrac{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/2} [\int\limits_{x_{2i-2}}^{x_{2i}} f(x)dx-\dfrac{h}{3}[f(x_{2i-2})+4f(x_{2i-1})+f(x_{2i})]] $$

According to Lagrange interpolation error for simple Simpson's rule (refer to 14-1) for $$\displaystyle [x_{i-1},x_{i+1}] $$ ;



E_2=-\dfrac {x_{i+1}}{x_{i-1}} f^{(4)}(\xi) $$



\xi\in [x_{i-1},x_{i+1}] $$



\Rightarrow \left |{E_n}^2 \right | \le \sum_{i=1}^{n/2} max \left | \dfrac {(x_{i+1}-x_{i-1})^5}{90\times 2^5} f^{(4)}(\xi)\right | =\dfrac{h^5}{90}\times \sum_{i=1}^{n/2} max \left | f^{(4)}(\xi)\right | $$



h=\dfrac {x_{i+1}-x_{i-1}}{2}=\dfrac {b-a}{n} $$



M_4:=max\left | f^{(4)}(\xi) \right | $$



\xi\in [x_{i-1},x_{i+1}] $$



\overline{M_4}:=\sum_{i=1}^{n/2} max\left |f^{(4)}(\xi) \right | $$



\overline{M_4}\le max\left | \dfrac {n}{2} .M_4 \right | $$



\Rightarrow\left |{E_n}^2\right |\le\dfrac{h^5}{90}\times \dfrac {n}{2}.M_4=\dfrac{h^5}{90}\times \dfrac {\dfrac{b-a}{h}}{2}.M_4 $$


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

$$\displaystyle \Rightarrow\left |{E_n}^2\right | \le \dfrac{(b-a)h^4}{180} M_4 $$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |


 * style= |

.
 * }
 * }

Author
Solved and typed by - Egm6341.s10.Team4.nimaa&amp;m 15:31, 17 February 2010 (UTC) .