User:Egm6341.s10.team3.Min/HW5

3 Find $$ {t}_{k}(x) $$
Ref: Lecture Notes [[media:Egm6341.s10.mtg27.djvu|p.27-1]]

Problem Statement
Find $$ {t}_{k}(x) $$ by the reversion of $$ x ({t}_{k}) $$

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

$$ $$
 * $$\displaystyle x(t_k)=\frac{1}{2}(x_k+x_{k+1})+t_k \frac{h}{2}
 * $$\displaystyle x(t_k)=\frac{1}{2}(x_k+x_{k+1})+t_k \frac{h}{2}
 * $$\displaystyle (Eq. 1)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle h=x_{k+1}-x_k
 * $$\displaystyle h=x_{k+1}-x_k
 * }
 * }

Solution
Revise Eq.1 and express $$t(x_k)$$by x:


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


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

$$\displaystyle \Rightarrow t_k(x)=\frac{2}{h}(x- \frac{x_k+x_{k+1}}{2}) $$
 * $$\displaystyle (Eq. 2)$$
 * style = |
 * }

When $$ x = x_k $$
 * {| style="width:100%" border="0" align="left"

$$ When $$ x = x_{k+1} $$
 * $$\displaystyle t_k(x_k)=\frac{2}{h}(x_k- \frac{x_k+x_{k+1}}{2})=\frac{2}{x_{k+1}-x_k}\frac{x_k-x_{k+1}}{2}=-1
 * $$\displaystyle t_k(x_k)=\frac{2}{h}(x_k- \frac{x_k+x_{k+1}}{2})=\frac{2}{x_{k+1}-x_k}\frac{x_k-x_{k+1}}{2}=-1
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle t_k(x_{k+1})=\frac{2}{h}(x_{k+1}- \frac{x_k+x_{k+1}}{2})=\frac{2}{x_{k+1}-x_k}\frac{x_{k+1}-x_k}{2}=1
 * $$\displaystyle t_k(x_{k+1})=\frac{2}{h}(x_{k+1}- \frac{x_k+x_{k+1}}{2})=\frac{2}{x_{k+1}-x_k}\frac{x_{k+1}-x_k}{2}=1

-- By Min Zhong 12:00, 23 March 2010 (UTC)

7 Cancel odd order of derivative of g in the proof of Trap error
Ref: Lecture Notes [[media:Egm6341.s10.mtg28.djvu|p.28-2]]

Problem Statement
Redo steps in proof of Trap. error by trying to cancel terms with odd order of derivative of g. From Lecture Notes [[media:Egm6341.s10.mtg21.djvu|p.21-3]]
 * {| style="width:100%" border="0" align="left"

$$ $$ Where
 * $$\displaystyle E= \left[ P_2(t)g^{(1)}(t)\right]_{-1}^{+1}-\left[ P_3(t)g^{(2)}(t)\right]_{-1}^{+1}+ \int_{-1}^{+1} P_3(t)g^{(3)}(t)dt
 * $$\displaystyle E= \left[ P_2(t)g^{(1)}(t)\right]_{-1}^{+1}-\left[ P_3(t)g^{(2)}(t)\right]_{-1}^{+1}+ \int_{-1}^{+1} P_3(t)g^{(3)}(t)dt
 * $$\displaystyle (Eq. 1)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$ $$
 * $$\displaystyle P_2(t)=-\frac{t^2}{2}+ \alpha
 * $$\displaystyle P_2(t)=-\frac{t^2}{2}+ \alpha
 * $$\displaystyle (Eq. 2)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"


 * $$\displaystyle P_3(t)=-\frac{t^3}{6}+ \alpha t+ \beta
 * $$\displaystyle P_3(t)=-\frac{t^3}{6}+ \alpha t+ \beta

$$
 * }
 * }

$$ \alpha $$ and $$\beta$$ are the integration constants

Solution
We start the proof from Equation 1. i) Step 1 we try to cancel the term contains first order of derivative of g in Eq. 1 by having


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

$$ Then
 * $$\displaystyle \left[ P_2(t)g^{(1)}(t)\right]_{-1}^{+1}=0
 * $$\displaystyle \left[ P_2(t)g^{(1)}(t)\right]_{-1}^{+1}=0
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$ From Equation 2.
 * $$\displaystyle P_2(+1)= P_2(-1)=0
 * $$\displaystyle P_2(+1)= P_2(-1)=0
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$ Summary:
 * $$\displaystyle P_2(+1)=-\frac{1^2}{2}+ \alpha \Rightarrow \alpha=\frac{1}{2}
 * $$\displaystyle P_2(+1)=-\frac{1^2}{2}+ \alpha \Rightarrow \alpha=\frac{1}{2}
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle P_2(t)=-\frac{t^2}{2}+ \frac{1}{2}
 * $$\displaystyle P_2(t)=-\frac{t^2}{2}+ \frac{1}{2}
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle E= -\left[ P_3(t)g^{(2)}(t)\right]_{-1}^{+1}+ \underbrace {\int_{-1}^{+1} P_3(t)g^{(3)}(t)dt}_{A}
 * $$\displaystyle E= -\left[ P_3(t)g^{(2)}(t)\right]_{-1}^{+1}+ \underbrace {\int_{-1}^{+1} P_3(t)g^{(3)}(t)dt}_{A}
 * }
 * }

From Lecture Notes [[media:Egm6341.s10.mtg26.djvu|p.26-2]], The result of integration by part of A is


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

$$
 * $$\displaystyle A= \left[ P_4(t)g^{(3)}(t)\right]_{-1}^{+1}-\int_{-1}^{+1} P_4(t)g^{(4)}(t)dt
 * $$\displaystyle A= \left[ P_4(t)g^{(3)}(t)\right]_{-1}^{+1}-\int_{-1}^{+1} P_4(t)g^{(4)}(t)dt


 * }
 * }

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

$$ $$ Where
 * $$\displaystyle E= \left[ P_3(t)g^{(2)}(t)\right]_{-1}^{+1}+ \left[ P_4(t)g^{(3)}(t)\right]_{-1}^{+1}-\int_{-1}^{+1} P_4(t)g^{(4)}(t)dt
 * $$\displaystyle E= \left[ P_3(t)g^{(2)}(t)\right]_{-1}^{+1}+ \left[ P_4(t)g^{(3)}(t)\right]_{-1}^{+1}-\int_{-1}^{+1} P_4(t)g^{(4)}(t)dt
 * $$\displaystyle (Eq. 3)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle P_3(t)=-\frac{t^3}{6}+ \alpha t+ \beta = -\frac{t^3}{6}+ \frac{1}{2}t+ \beta
 * $$\displaystyle P_3(t)=-\frac{t^3}{6}+ \alpha t+ \beta = -\frac{t^3}{6}+ \frac{1}{2}t+ \beta
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

$$ $$ where $$\omega$$ is the integration constant
 * $$\displaystyle P_4(t)= \int P_3= -\frac{t^4}{24}+ \frac{1}{4}t^2+ \beta t + \omega
 * $$\displaystyle P_4(t)= \int P_3= -\frac{t^4}{24}+ \frac{1}{4}t^2+ \beta t + \omega
 * $$\displaystyle (Eq. 4)
 * }
 * }

ii) Step 2

we try to cancel the term contains third order of derivative of g in Eq. 3

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

$$
 * $$\displaystyle \left[ P_4(t)g^{(3)}(t)\right]_{-1}^{+1}=0
 * $$\displaystyle \left[ P_4(t)g^{(3)}(t)\right]_{-1}^{+1}=0
 * }
 * }

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

$$ From Equation 4, then
 * $$\displaystyle P_4(+1)= P_4(-1)=0
 * $$\displaystyle P_4(+1)= P_4(-1)=0
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle P_4(+1)= -\frac{1}{24}+ \frac{1}{4}+ \beta  + \omega =0
 * $$\displaystyle P_4(+1)= -\frac{1}{24}+ \frac{1}{4}+ \beta  + \omega =0
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

$$ Solve the above two equations, we can find
 * $$\displaystyle P_4(-1)= -\frac{1}{24}+ \frac{1}{4}- \beta  + \omega =0
 * $$\displaystyle P_4(-1)= -\frac{1}{24}+ \frac{1}{4}- \beta  + \omega =0
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle  \beta =0
 * $$\displaystyle  \beta =0
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle  \omega = -\frac{5}{24}
 * $$\displaystyle  \omega = -\frac{5}{24}
 * }
 * }

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

$$
 * $$\displaystyle P_3(t)= -\frac{t^3}{6}+ \frac{1}{2}t
 * $$\displaystyle P_3(t)= -\frac{t^3}{6}+ \frac{1}{2}t
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle P_4(t)=-\frac{t^4}{24}+ \frac{1}{4}t^2 -\frac{5}{24}
 * $$\displaystyle P_4(t)=-\frac{t^4}{24}+ \frac{1}{4}t^2 -\frac{5}{24}
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

$$ $$ From Lecture Notes [[media:Egm6341.s10.mtg26.djvu|p.26-2]], The result of integration by part of B is
 * $$\displaystyle E= -\left[ P_3(t)g^{(2)}(t)\right]_{-1}^{+1}- \underbrace{\int_{-1}^{+1} P_4(t)g^{(4)}(t)dt}_{B}
 * $$\displaystyle E= -\left[ P_3(t)g^{(2)}(t)\right]_{-1}^{+1}- \underbrace{\int_{-1}^{+1} P_4(t)g^{(4)}(t)dt}_{B}
 * $$\displaystyle (Eq. 5)
 * }
 * }
 * {| style="width:100%" border="0" align="left"


 * $$\displaystyle B= \left[ P_5(t)g^{(4)}(t)\right]_{-1}^{+1}-\int_{-1}^{+1} P_5(t)g^{(5)}(t)dt
 * $$\displaystyle B= \left[ P_5(t)g^{(4)}(t)\right]_{-1}^{+1}-\int_{-1}^{+1} P_5(t)g^{(5)}(t)dt

$$
 * }
 * }

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


 * $$\displaystyle E= -\left[ P_3(t)g^{(2)}(t)\right]_{-1}^{+1}-\left[ P_5(t)g^{(4)}(t)\right]_{-1}^{+1}+\int_{-1}^{+1} P_5(t)g^{(5)}(t)dt
 * $$\displaystyle E= -\left[ P_3(t)g^{(2)}(t)\right]_{-1}^{+1}-\left[ P_5(t)g^{(4)}(t)\right]_{-1}^{+1}+\int_{-1}^{+1} P_5(t)g^{(5)}(t)dt

$$
 * }
 * }

iii) Step 3

We can continually cancel the items with odd order derivative of g and find the general expression of E as


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

$$ $$
 * $$\displaystyle E= -\left[ \underbrace{P_3(t)g^{(2)}(t)}_{C}+P_5(t)g^{(4)}(t)+ P_7(t)g^{(6)}(t)+...+P_{2l+1}(t)g^{(2l)}(t)\right]_{-1}^{+1} - \int_{-1}^{+1} P_{2l}(t)g^{(2l+1)}(t)dt
 * $$\displaystyle E= -\left[ \underbrace{P_3(t)g^{(2)}(t)}_{C}+P_5(t)g^{(4)}(t)+ P_7(t)g^{(6)}(t)+...+P_{2l+1}(t)g^{(2l)}(t)\right]_{-1}^{+1} - \int_{-1}^{+1} P_{2l}(t)g^{(2l+1)}(t)dt
 * $$\displaystyle (Eq. 6)
 * }
 * }

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

$$ Since $$P_3(t) and P_{3i}(t) $$ are odd function, Then
 * $$\displaystyle C = \left[ P_3(t)g^{(2)}(t)\right]_{-1}^{+1}=P_3(+1)g^{(2)}(+1)-P_3(-1)g^{(2)}(-1)
 * $$\displaystyle C = \left[ P_3(t)g^{(2)}(t)\right]_{-1}^{+1}=P_3(+1)g^{(2)}(+1)-P_3(-1)g^{(2)}(-1)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle P_3(+1)=-P_3(-1)
 * $$\displaystyle P_3(+1)=-P_3(-1)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle C = - P_3(-1)\left[(g^{(2)}(+1)+g^{(2)}(-1))\right]
 * $$\displaystyle C = - P_3(-1)\left[(g^{(2)}(+1)+g^{(2)}(-1))\right]
 * }
 * }

Thus Equation 6 can be simplified as follows:


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

$$\displaystyle \Rightarrow  E= \sum_{r=1}^{l}P_{2r+1}(-1) \left[g^{2r}(+1)+g^{2r}(-1) \right] - \int_{-1}^{+1} P_{2l+1}(t)g^{(2l+1)}(t)dt $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * $$\displaystyle (Eq. 7)$$
 * style = |
 * }
 * }

iv) Step 4 We use the same techniqure as HW 5 problem 5 to find the composite trap error $$E_n^1$$ through Equation 7


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

$$\displaystyle E_n^1 = \sum_{r=1}^{l} \sum_{k}^{n-1}P_{2r+1}(-1) \left[g_k^{2r}(+1)+g_k^{2r}(-1) \right]- \sum_{k=0}^{n-1} \int_{-1}^{1}P_{2l+1}(t)g_k^{2l+1}(t)dt $$ From the lecture note [[media:Egm6341.s10.mtg21.djvu|p.21-2]], $$\displaystyle g_k(t)$$can be changed to $$\displaystyle f_(x_k)$$ and below was obtained.
 * $$\displaystyle (Eq. 8) $$
 * }
 * }
 * {| style="width:100%" border="0" align="left"

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

Plug the above equations into Equation 8. We have
 * {| style="width:100%" border="0" align="left"

$$\displaystyle E_n^1 = \sum_{r=1}^{l} \sum_{k}^{n-1}\left(\frac{h}{2}\right)^{2r+1}P_{2r+1}(-1) \left[f^{2r}(x_{k+1})+f^{2r}(x_{k})\right] - \left(\frac{h}{2}\right)^{2r+2}\sum_{k=0}^{n-1} \int_{x_k}^{x_{k+1}}P_{2l+1}(t)f_{2l+1}(x_t)dx $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * $$\displaystyle (Eq. 9)$$
 * style = |
 * }
 * }

When we derive the composite trap error, we use the simple trap error which contains additive term $$ g^{2r}(+1)+g^{2r}(-1) $$. Because of the additive sign, no term could be canceled in the summation of $$E_n^1$$. We have to do $$\sum_{k}^{n-1}\left[f^{2r}(x_{k+1})+f^{2r}(x_{k})\right]$$ when evalue the error. It is very complicated compared with that derived by canceling items with even oder derivative of g. In that case, we can get simple trap with item $$ g^{2r-1}(+1)-g^{2r-1}(-1) $$ which can simplify the expression of composite trap error by cancel same term when summation and result in $$[f^{(2r-1)}(x_{n})-f^{(2r-1)}(x_0)$$. Thus Trap error proofed by canceling terms with the even order derivative of g is more effective. -- By Min Zhong 12:00, 23 March 2010 (UTC)