User:Egm6341.s10.Team4.andy/HW5

= Problem 1: Trapezoidal Rule Error Proof: Step 3b=

Given
Refer Lecture slide 26-3 for problem statement.


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

$$\displaystyle p_5(t)=\int p_4(t)dt = -\frac{t^5}{120} + \frac{t^3}{36} + c_5t + c_6 $$ $$
 * $$\displaystyle \longrightarrow (1)
 * }.
 * }.

Find
Selecting $$\displaystyle p_5(\pm 1)= 0 $$ and $$\displaystyle p_5(0)= 0 $$, find $$\displaystyle c_5 $$ and $$\displaystyle c_6 $$.

Solution
When $$\displaystyle p_5(0)= 0 $$ Equation (1),


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

$$\displaystyle p_5(0)= -\frac{0^5}{120} + \frac{0^3}{36} + c_5(0) + c_6 = 0 $$
 * }.
 * }.


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

$$\displaystyle \Rightarrow c_6 = 0 $$
 * }.
 * }.

When $$\displaystyle p_5(1)= 0 $$ Equation (1),


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

$$\displaystyle p_5(1)= -\frac{1^5}{120} + \frac{1^3}{36} + c_5(1) = 0 $$
 * }.
 * }.


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

$$\displaystyle \Rightarrow c_5 = \frac{1}{120} - \frac{1}{36} = -\frac{7}{360} $$
 * }.
 * }.

= Problem 6: Trapezoidal Rule Error by Canceling Odd Derivative Orders of $$ g(t)$$=

Given
Refer Lecture slide 28-2 for problem statement.

Higher Order Error for Trap. rule is given by [ Refer 21-1 ]:


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

E_n^1=\frac{h}{2} \sum_{k=0}^{n-1} \left[ \underbrace{\int_{-1}^{1}g_k(t)dt-(g_k(-1)+g_k(+1))}_{E}\right] $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle \longrightarrow (1)
 * }.
 * }.

where $$\displaystyle E $$ can be written as,


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

E =\int_{-1}^{1}(-t)g_k^{(1)}(t)dt $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle \longrightarrow (2)
 * }.
 * }.


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

$$\displaystyle \begin{align} \Rightarrow E &=\int_{-1}^{1}\underbrace{(-t)}_{p_{1}(t)}g_k^{(1)}(t)dt \\ &= \left[p_2(t)g_k^{(1)}(t) \right]_{-1}^{+1} - \int_{-1}^{+1}p_2(t)g_k^{(2)}(t)dt \end{align} $$

where $$\displaystyle p_2(t) = \int p_1(t)dt$$.
 * }.
 * }.

After successive integration by parts,


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

$$\displaystyle

E = \left[p_2(t)g_k^{(1)}(t)-p_3(t)g_k^{(2)}(t)+p_4(t)g_k^{(3)}(t)-p_5(t)g_k^{(4)}(t)+p_6(t)g_k^{(5)}(t)+ \cdots +p_{\ell}(t)g_k^{(\ell-1)}(t)\right]_{-1}^{+1} - \int_{-1}^{1}p_{\ell}(t)g_k^{(\ell)}(t) dt

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


 * }.
 * }.

Find
Try to derive the Higher Order Trapezoidal Rule Error equation by canceling odd order derivative terms of $$\displaystyle g(t) $$, i.e., make terms $$\displaystyle p_{2}(t), p_{4}(t), p_{6}(t), \cdots, $$ to zero at $$\displaystyle t =  \pm 1$$.

Solution
We know,


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

$$\displaystyle p_{2}(t) = -\frac{t^2}{2} + c_3 $$
 * }.
 * }.

At $$\displaystyle t = \pm 1$$,


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

$$\displaystyle p_{2}(1) = -\frac{1^2}{2} + c_3 = 0; p_{2}(-1) = -\frac{(-1)^2}{2} + c_3 = 0; $$
 * }.
 * }.


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

$$\displaystyle \Rightarrow c_3 = \frac{1}{2} $$
 * }.
 * }.

We also know,


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

$$\displaystyle p_{3}(t) = -\frac{t^3}{3!} + \frac{t}{2} + c_4 $$ And,
 * }.
 * }.
 * {| style="width:100%" border="0" align="left"

$$\displaystyle p_{4}(t) = -\frac{t^4}{4!} + \frac{t^2}{4} + c_4t + c_5 $$
 * }.
 * }.

At $$\displaystyle t = \pm 1$$,


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

$$\displaystyle p_{4}(1) = -\frac{(1)^4}{4!} + \frac{(1)^2}{4} + c_4(1) + c_5; p_{4}(-1) = -\frac{(-1)^4}{4!} + \frac{(-1)^2}{4} + c_4(-1) + c_5; $$


 * }.


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

$$\displaystyle \Rightarrow c_4 = 0; c_5 = \frac{-5}{24} $$
 * }.
 * }.

Functions $$\displaystyle p_{3}(t), p_{5}(t), p_{7}(t), \cdots, $$ are odd functions.

Since functions $$\displaystyle p_{2}(t), p_{4}(t), p_{6}(t), \cdots, $$ are made zero at $$\displaystyle t = \pm 1$$, Equation (3) becomes,


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

$$\displaystyle \begin{align} E & = \left[-p_3(t)g_k^{(2)}(t)-p_5(t)g_k^{(4)}(t)-p_7(t)g_k^{(6)}(t)\cdots\cdots-p_{(2\ell-1)}(t)g_k^{(2\ell-2)}(t)\right]_{-1}^{+1} + \int_{-1}^{1}p_{(2\ell-1)}(t)g_k^{(2\ell-1)}(t) dt \\ & = \sum_{r=2}^{\ell} \left[ -p_{(2r-1)}g_k^{(2r-2)}\right]_{-1}^{+1} + \int_{-1}^{1}p_{(2\ell-1)}(t)g_k^{(2\ell-1)}(t) dt \\ & = \sum_{r=2}^{\ell} \left[ -p_{(2r-1)}(1)g_k^{(2r-2)}(1) + p_{(2r-1)}(-1)g_k^{(2r-2)}(-1)\right] + \int_{-1}^{1}p_{(2\ell-1)}(t)g_k^{(2\ell-1)}(t) dt \\ \end{align} $$


 * }.
 * }.

Since $$\displaystyle p_{(2r-1)}(t) $$ are odd functions, we know $$\displaystyle p_{(2r-1)}(1) + p_{(2r-1)}(-1) = 0 $$.

And so $$\displaystyle E $$ becomes,


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

$$\displaystyle

E = \sum_{r=2}^{\ell} p_{(2r-1)}(-1) \left[ g_k^{(2r-2)}(1) + g_k^{(2r-2)}(-1)\right] + \int_{-1}^{1}p_{(2\ell-1)}(t)g_k^{(2\ell-1)}(t) dt

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


 * }.
 * }.

Using the below relationship


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

g_k^{(i)}(t)=\left(\frac{h}{2}\right)^if^{(i)}(x(t)); \ \ \ \ \ x \in [x_k,x_{k+1}] $$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

In Equation (4) $$\displaystyle g_k(t)$$can be transferred to $$\displaystyle f(x_k)$$ as shown below:


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

\begin{align} &g_k^{(2r-2)}(+1)=\left(\frac{h}{2}\right)^{(2r-2)}f^{(2r-2)}(x_{k+1}),\\ &g_k^{(2r-2)}(-1)=\left(\frac{h}{2}\right)^{(2r-2)}f^{(2r-2)}(x_{k}),\\ &g_k^{(2\ell-1)}(t)=\left(\frac{h}{2}\right)^{(2\ell-1)}f^{(2\ell-1)}(x) \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

And so, Equation (4) becomes,


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

$$\displaystyle

E =  \sum_{r=2}^{\ell}\left[ \left(\frac{h}{2}\right)^{(2r-2)} p_{(2r-1)}(-1) \Big[ f^{(2r-2)}(x_{k+1}) + f^{(2r-2)}(x_{k})\Big] \right] + \left(\frac{h}{2}\right)^{(2\ell-1)} \int_{x_k}^{x_{k+1}}p_{(2\ell-1)}(t_k(x))f^{(2\ell-1)}(x) dx

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


 * }.
 * }.

Substituting Equation (5) in Equation (1),


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

$$\displaystyle \begin{align} E_n^1 &= \sum_{r=2}^{\ell}\left[ \left(\frac{h}{2}\right)^{(2r-1)} p_{(2r-1)}(-1) \sum_{k=0}^{n}\Big[ f^{(2r-2)}(x_{k+1}) + f^{(2r-2)}(x_{k})\Big] \right] + \left(\frac{h}{2}\right)^{(2\ell)} \sum_{k=0}^{n} \left [\int_{-1}^{1}p_{(2\ell-1)}(t_k(x))f^{(2\ell-1)}(x) dx \right ] \\ & = \sum_{r=2}^{\ell}\left[ \left(\frac{h}{2}\right)^{(2r-1)} p_{(2r-1)}(-1) \Big[ \underbrace{f^{(2r-2)}(x_n) + f^{(2r-2)}(x_{n-1}) + \cdots \cdots + f^{(2r-2)}(x_{0})}_{\beta}\Big] \right] + \left(\frac{h}{2}\right)^{(2\ell)} \sum_{k=0}^{n} \left [\int_{-1}^{1}p_{(2\ell-1)}(t_k(x))f^{(2\ell-1)}(x) dx \right ] \end{align}

$$
 * }.
 * }.

In the above error equation $$\displaystyle \beta \neq f^{(2r-2)}(x_n) - f^{(2r-2)}(x_0)$$, but it contains terms that involve all the points from $$\displaystyle x_0 \ to\ x_n $$.

But instead of canceling out terms that involve odd order derivatives of $$\displaystyle g(t)$$, if we had canceled only terms that involve even order derivatives of $$\displaystyle g(t)$$ then the term $$\displaystyle \beta $$ would involve only first and last points, i.e., $$\displaystyle x_0 = a $$ and $$\displaystyle x_n = b $$, as we have got in Problem 5 above.