User:Egm6341.s2010.Team1/HW5

=Problem 1 Find out the constants of integration function $$P_{n}(t)$$=

Statement
Find $$C_{5}\,$$ and $$C_{6}\,$$ Given $$P_{5}(t)= \!\,\int P_{4}(t)dt \!\,= \!\,-\!\,\frac{t^{5}}{120}+ \!\,\frac{t^{3}}{12}+\!\,C_{5}t+\!\,C_{6}$$


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


 * Ref: Lecture Notes [[media:Egm6341.s10.mtg26.djvu|P26-3]]
 * }
 * }

Solution
(i)Select $$P_{5} :\!\,P_{5}(\pm \!\,1)=\!\,0$$ and $$P_{5} (0)=\!\,0$$

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

P_{5}(0)=0 $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

\Rightarrow-\frac{0^{5}}{120}+\frac{0^{3}}{36}+C_{5}0+C_{6} = 0 $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

\Rightarrow\,C_{6} = 0 $$ (iii) $$P_{5}(+ \!\,1)=\!\,0$$
 * $$ \displaystyle
 * $$ \displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

\Rightarrow-\frac{1^{5}}{120}+\frac{1^{3}}{36}+C_{5}1 = 0 $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

\Rightarrow-\frac{3}{360}+\frac{10}{360}+C_{5} = 0 $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

\Rightarrow C_{5} = -\frac{7}{360} $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }

Solved by : EGM6341.s10.Team1.Ya-Chiao Chang 19:09, 23 March 2010 (UTC)

=Problem 2-Pf of Trap.error =

Find
Do steps 4ab to find $$ p_{6}(t),p_{7}(t)\,$$

Given
[[media:Egm6341.s10.mtg26.djvu|p.26-1]],[[media:Egm6341.s10.mtg26.djvu|p.26-2]],[[media:Egm6341.s10.mtg26.djvu|p.26-3]]

Solution
Step 4a [[media:Egm6341.s10.mtg26.djvu|p.26-3]]

$$ E= \,[\,p_{2}(t)g^{(1)}(t)+p_{4}(t)g^{(3)(t)}\,]_{-1}^{+1}\,-\,\underbrace{\left (\int_{-1}^{+1}p_{5}(t)g^{(5)}(t)dt\right)}_{B}\,$$

$$ B=\,[\,p_{6}(t)g^{(5)}(t)\,]_{-1}^{+1}\,-\,\underbrace{\left (\int_{-1}^{+1}p_{6}(t)g^{(6)}(t)dt\right)}_{C}\,$$

$$ p_{6}(t)=\int p_{5}(t)dt = \int -\frac{t^{5}}{120}+\frac{t^{3}}{36}-\frac{7t}{360}dt \,$$

$$ =-\frac{t^{6}}{720}+\frac{t^{4}}{144}-\frac{7t^{2}}{720}+\alpha \,$$

Step 4b [[media:Egm6341.s10.mtg26.djvu|p.26-2]]

$$ C=\,[\,p_{7}(t)g^{(6)}(t)\,]_{-1}^{+1}\,-\,\int_{-1}^{+1}p_{7}(t)g^{(7)}(t)dt\,$$

$$ p_{7}(t)=\int p_{6}(t)dt = \int -\frac{t^{6}}{720}+\frac{t^{4}}{144}-\frac{7t^{2}}{720}+\alpha dt \,$$

$$ =-\frac{t^{7}}{5040}+\frac{t^{5}}{720}-\frac{7t^{3}}{2160}+\alpha t+\beta \,$$

Select $$ p_{7}(t)\,$$ st $$ p_{7}(+1)=0,p_{7}(-1)=0,p_{7}(0)=0 \, $$

$$ \Rightarrow \beta=0, \alpha=\frac{31}{15120}\, $$

Summary: steps 4ab

$$ p_{6}(t)=-\frac{t^{6}}{720}+\frac{t^{4}}{144}-\frac{7t^{2}}{720}+\frac{31}{15120} \,$$

$$ p_{7}(t)=-\frac{t^{7}}{5040}+\frac{t^{5}}{720}-\frac{7t^{3}}{2160}+\frac{31t}{15120}\,$$
 * {| style="width:100%" border="0" align="left"


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

p_{6}(t)=-\frac{t^{6}}{720}+\frac{t^{4}}{144}-\frac{7t^{2}}{720}+\frac{31}{15120}, p_{7}(t)=-\frac{t^{7}}{5040}+\frac{t^{5}}{720}-\frac{7t^{3}}{2160}+\frac{31t}{15120}\,$$ $$
 * $$\displaystyle
 * }
 * }

Solved by :Egm6341.s10.team1.lei00:53, 24 March 2010 (UTC)

Reviewed by : EGM6341.s10.Team1.Ya-Chiao Chang 19:20, 23 March 2010 (UTC)

= Problem 3: Change dependent variable of a function =

Given
Given the equation


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle x(t)=t\dfrac{h}{2}+\dfrac{x_k+x_{k+1}}{2}
 * }.
 * }.

Find
Solve the above equation so that t is the dependent variable

Solution
It is simple enough to solve this equation for t giving


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle t(x)=\dfrac{2x}{h}-\dfrac{x_k+x_{k+1}}{h}
 * }.
 * }.

Thus because


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

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

When


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle x=x_k, t=-1
 * }.
 * }.

and when


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

$$ $$ Solved by: --Egm6341.s10.team1.toddmock 21:00, 23 March 2010 (UTC) Reviewed by: Egm6341.s10.team1.andrewdugan 08:19, 24 March 2010 (UTC)
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle x=x_{k+1}, t=1
 * }.
 * }.

=Problem 4: Calculate d1, d2, d3=

Find
$$ d_1=\overline{d_{2}}, d_2=\overline{d_{4}}, d_3=\overline{d_{6}}\,$$

Given
$$ d_1=\overline{d_{2}}=\frac{P_2^{(1)}}{2^2}\,$$ $$ d_2=\overline{d_{4}}=\frac{P_4^{(1)}}{2^4}\,$$ $$ d_3=\overline{d_{6}}=\frac{P_6^{(1)}}{2^6}\,$$

Solution
$$ P_2=C_1\frac{t^2}{2!}+C_3\,$$ $$ P_4=C_1\frac{t^4}{4!}+C_3\frac{t^2}{2!}+C_5\,$$ $$ P_6=C_1\frac{t^6}{6!}+C_3\frac{t^4}{4!}+C_5\frac{t^2}{2!}+C_7\,$$ where $$ C_1=-1, C_3=\frac{1}{6}, C_5=\frac{-7}{360}, C_7=\frac{31}{15120} \,$$ $$ P_2(1)=(-1)(\frac{1}{2})+\frac{1}{6}=\frac{-1}{3}\Rightarrow\overline{d_{2}}=(\frac{-1}{3})(\frac{1}{4})=\frac{-1}{12}\,$$ $$ P_4(1)=(-1)(\frac{1}{24})+(\frac{1}{6})(\frac{1}{2})-\frac{7}{360}=\frac{1}{45}\Rightarrow\overline{d_{4}}=(\frac{1}{45})(\frac{1}{16})=\frac{1}{720}\,$$ $$ P_6(1)=(-1)(\frac{1}{720})+(\frac{1}{6})(\frac{1}{24})+(\frac{-7}{360})(\frac{1}{2})+\frac{31}{15120}=\frac{-2}{945}\Rightarrow\overline{d_{6}}=(\frac{-2}{945})(\frac{1}{64})=\frac{-1}{30240}\,$$
 * Note: Coefficient $$ C_7 \,$$ can be found using the same method as in Problem 1.

These values are the same as those obtained using the Bernoulli numbers. Solved by: Egm6341.s10.team1.andrewdugan 08:17, 24 March 2010 (UTC)

=Problem 5-Deriv.Trap.rule error =

Find
Deriv.(1)[[media:Egm6341.s10.mtg27.djvu|p.29-1]]

Given
(4)[[media:Egm6341.s10.mtg21.djvu|p.21-2]]

$$ E= \int_{-1}^{+1}p_{1}(t)g^{(1)}(t)dt = [P_2(t)g^{(1)}(t)]_{-1}^{+1}-\int_{-1}^{+1}P_2(t)g^{(2)}(t)dt \,$$

Solution
From the (4)[[media:Egm6341.s10.mtg21.djvu|p.21-2]],we can get the generalized form:

$$ E= \int_{-1}^{+1}p_{1}(t)g^{(1)}(t)dt \,$$

$$ =[p_{2}g^{1}+p_{4}g^{3}+...+p_{2l}g^{(2l-1)}]_{-1}^{+1}-\int_{-1}^{+1}p_{2l}(t)g^{(2l)}(t)dt \,$$

Recall that

$$ [p_{2}(t)g^{1}]_{-1}^{+1}=p_{2}(+1)g^{1}(+1)-p_{2}(-1)g^{1}(-1)\,$$

where $$ p_{2}\,$$ is even func.

$$\Rightarrow p_{2}(-1)=p_{2}(+1)\, $$

thus

$$ [p_{2}(t)g^{1}]_{-1}^{+1}=p_{2}(+1)[g^{1}(+1)-g^{1}(-1)]\, $$

and $$ p_{2i}\,$$ is even func.

$$\Rightarrow E=\underbrace{\left (\sum_{r=1}^{l} p_{2r}(+1)[g^{2r-1}(+1)-g^{2r-1}(-1)]\right)}_{A}-\underbrace{\left (\int_{-1}^{+1}p_{2l}(t)g^{2l}(t)dt\right)}_{B}\, $$

next, we should change varible t into x

from (3) [[media:Egm6341.s10.mtg21.djvu|p.21-2]]

$$ g_{k}^{(i)}(t)=(\frac{h}{2})^{i}f^{(i)}(x(t)), [\,x_k,x_{k+1}\,]\,$$

$$ \Rightarrow g^{(2r-1)}(+1)=(\frac{h}{2})^{2r-1}f^{(2r-1)}(x_{k+1})\, $$

$$ \Rightarrow g^{(2r-1)}(-1)=(\frac{h}{2})^{2r-1}f^{(2r-1)}(x_{k})\, $$

Recall (3) [[media:Egm6341.s10.mtg27.djvu|p.27-1]]

$$ \overline{d_{2r}} = \frac{p_{2r}(+1)}{2^{2r}}\, $$

$$ \Rightarrow p_{2r}(+1)=\overline {d_{2r}}*2^{2r}\, $$

thus $$ A \,$$ can be changed into

$$ A=\sum_{r=1}^{l} 2\overline{d_{2r}} h^{2r-1}[f^{2r-1}(x_{k+1})-f^{2r-1}(x_{k})]\,$$

from (3) [[media:Egm6341.s10.mtg21.djvu|p.21-2]]

$$ g_{k}^{(i)}(t)=(\frac{h}{2})^{i}f^{(i)}(x(t)), [\,x_k,x_{k+1}\,]\,$$

$$ g_{k}^{(2l)}(t)=(\frac{h}{2})^{2l}f^{(2l)}(x)\, $$

thus $$ B\, $$ can be changed into

$$ B=\frac{h^{2l}}{2^{2l}}\int_{x_k}^{x_{k+1}}p_{2l}(t_{k}(x))f^{(2l)}(x)(\frac{2}{h})dx \, $$

Recall trap.rule error is in (5)[[media:Egm6341.s10.mtg21.djvu|P21-1]]

$$ E_{n}^{1}=\frac{h}{2}\sum_{k=0}^{n-1}[\int_{-1}^{+1}g_{k}(t)dt-(g_{k}(-1)+g_{k}(+1))]\,$$

Plug A and B into the equation $$\displaystyle E_n^1$$
 * {| style="width:100%" border="0" align="left"

\begin{align} E^1_n & = \left(\frac{h}{2}\right)\sum_{r=1}^{\ell} p_{2r}(+1) \left(\frac{h}{2}\right)^{2r-1} \sum_{k=0}^{n-1} \Big[f^{(2r-1)}(x_{k+1})-f^{(2r-1)}(x_k)\Big]- \frac{h}{2}\sum_{k=0}^{n-1} \left[   \int_{x_k}^{x_{k+1}}p_{2l}(t_k(x))\left(\frac{h}{2}\right)^{2\ell}f^{(2\ell)}(x)\frac{2}{h} dx \right]\\ &= \sum_{r=1}^{\ell} h^{2r} \frac{p_{2r}(+1)}{2^{2r}} \Big[f^{(2r-1)}(x_{n})-f^{(2r-1)}(x_0)\Big]-  \left(\frac{h}{2}\right)^{2\ell} \sum_{k=0}^{n-1} \left[ \int_{x_k}^{x_{k+1}}p_{2\ell}(t_k(x))f^{(2\ell)}(x) dx \right] \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.


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

E^1_n = \sum_{r=1}^{\ell} h^{2r} \overline{d}_{2r} \Big[f^{(2r-1)}(b)-f^{(2r-1)}(a)\Big]-  \left(\frac{h}{2}\right)^{2\ell} \sum_{k=0}^{n-1} \left[ \int_{x_k}^{x_{k+1}}p_{2\ell}(t_k(x))f^{(2\ell)}(x) dx \right] $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

Solved by : Egm6341.s10.team1.lei00:54, 24 March 2010 (UTC)

Reviewed by : EGM6341.s10.Team1.Ya-Chiao Chang 19:20, 23 March 2010 (UTC)

= Problem 6: Taylor series expansion for Bernoulli numbers =

Given
Note that this function contradicts the one given in the notes, however it has been verified through added manipulation of equation 6 on wolfram


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle \ x\coth(x)= \sum_{r=0}^{\infty} \frac{2^{2r}B_{2r}}{(2r)!}x^{2r}
 * }
 * }

This equation can be used to obtain the Bernoulli numbers as well as the term


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle \ -d_{2r}=\frac{B_{2r}}{(2r)!}
 * }
 * }

Find
Using the above relations obtain the Richardson Extrapolation Coefficients
 * {| style="width:100%" border="0" align="left"

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle \ d_{2},d_{4},d_{6},d_{8},d_{10}
 * }
 * }

Solution
The hyperbolic cotangent function can be defined as


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle \ \coth(x)=\frac{\cosh(x)}{\sinh(x)}=\frac{e^x+e^{-x}}{e^x-e^{-x}}
 * }
 * }

Furthermore we can write these terms as a series of summations


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle \ e^x=\sum_{j=0}^{\infty}\frac{x^j}{j!}
 * }
 * }

and


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle \ e^{-x}=\sum_{j=0}^{\infty}(-1)^j\frac{x^j}{j!}
 * }
 * }

Thus giving


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle \ e^x+e^{-x}=\sum_{j=0}^{\infty}\frac{x^j}{j!}(1+(-1)^j)
 * }
 * }

and


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle \ e^x-e^{-x}=\sum_{k=0}^{\infty}\frac{x^k}{k!}(1-(-1)^k)
 * }
 * }

or


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle \ x\coth(x)=\dfrac{\sum_{j=0}^{\infty}\dfrac{x^{j+1}}{j!}(1+(-1)^j)}{\sum_{k=j+1}^{\infty}\dfrac{x^k}{k!}(1-(-1)^k)}
 * }
 * }

With these formulations we can write the series out so that we can identify the Bernoulli numbers and the extrapolation terms


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle \ x\coth(x)=1+\dfrac{x^2}{3}-\dfrac{x^4}{45}+\dfrac{2x^6}{945}-\dfrac{x^8}{4725}+\dfrac{2x^{10}}{93555}
 * }
 * }

Thus pulling out the Bernoulli numbers

we can calculate the extrapolation coefficients to be

Solved by:--Egm6341.s10.team1.toddmock 21:01, 23 March 2010 (UTC) Reviewed by: Egm6341.s10.team1.andrewdugan 08:20, 24 March 2010 (UTC)

=Problem 7: Compare values of $$ \overline{d_{2r}}\,$$=

Find
Verify that the values for $$ \overline{d_{2}}, \overline{d_{4}}, \overline{d_{6}}, \overline{d_{8}}, \overline{d_{10}}\,$$ are the same whether calculated by the $$ xcoth \,$$ method or the $$ \frac{P_{2r}(1)}{2^{2r}}\,$$ method.

Given
The results calculated from the $$ xcoth \,$$ method in Problem 6 are: $$\overline{d_{2}}=\frac{-1}{12}, \overline{d_{4}}=\frac{1}{720}, \overline{d_{6}}=\frac{-1}{30240}, \overline{d_{8}}=\frac{1}{1209600}, \overline{d_{10}}=\frac{-1}{47900160} \,$$ Using the $$ \frac{P_{2r}(1)}{2^{2r}}\,$$ method, remember that: $$\overline{d_{2}}=\frac{P_2^{(1)}}{2^2}\,$$ $$\overline{d_{4}}=\frac{P_4^{(1)}}{2^4}\,$$ $$\overline{d_{6}}=\frac{P_6^{(1)}}{2^6}\,$$ $$\overline{d_{8}}=\frac{P_8^{(1)}}{2^8}\,$$ $$\overline{d_{10}}=\frac{P_{10}^{(1)}}{2^{10}}\,$$

Solution
$$ P_2=C_1\frac{t^2}{2!}+C_3\,$$ $$ P_4=C_1\frac{t^4}{4!}+C_3\frac{t^2}{2!}+C_5\,$$ $$ P_6=C_1\frac{t^6}{6!}+C_3\frac{t^4}{4!}+C_5\frac{t^2}{2!}+C_7\,$$ $$ P_8=C_1\frac{t^8}{8!}+C_3\frac{t^6}{6!}+C_5\frac{t^4}{4!}+C_7\frac{t^2}{2!}+C_9\,$$ $$ P_{10}=C_1\frac{t^{10}}{10!}+C_3\frac{t^8}{8!}+C_5\frac{t^6}{6!}+C_7\frac{t^4}{4!}+C_9\frac{t^2}{2!}+C_{11}\,$$ where $$ C_1=-1, C_3=\frac{1}{6}, C_5=\frac{-7}{360}, C_7=\frac{31}{15120}, C_9=\frac{1}{4725}, C_{11}=\frac{73}{3421440} \,$$
 * Note: Coefficients $$ C_7, C_9, C_{11} \,$$ can be found using the same method as in Problem 1.

$$ P_2(1)=(-1)(\frac{1}{2})+\frac{1}{6}=\frac{-1}{3}\Rightarrow\overline{d_{2}}=(\frac{-1}{3})(\frac{1}{4})=\frac{-1}{12}\,$$ $$ P_4(1)=(-1)(\frac{1}{24})+(\frac{1}{6})(\frac{1}{2})-\frac{7}{360}=\frac{1}{45}\Rightarrow\overline{d_{4}}=(\frac{1}{45})(\frac{1}{16})=\frac{1}{720}\,$$ $$ P_6(1)=(-1)(\frac{1}{720})+(\frac{1}{6})(\frac{1}{24})+(\frac{-7}{360})(\frac{1}{2})+\frac{31}{15120}=\frac{-2}{945}\Rightarrow\overline{d_{6}}=(\frac{-2}{945})(\frac{1}{64})=\frac{-1}{30240}\,$$ $$ P_8(1)=(-1)(\frac{1}{40320})+(\frac{1}{6})(\frac{1}{720})+(\frac{-7}{360})(\frac{1}{24})+(\frac{31}{15120})(\frac{1}{2})-\frac{127}{604800}=\frac{1}{4725}\Rightarrow\overline{d_{8}}=(\frac{1}{4725})(\frac{1}{256})=\frac{1}{1209600}\,$$ $$ P_{10}(1)=(-1)(\frac{1}{3628800})+(\frac{1}{6})(\frac{1}{40320})+(\frac{-7}{360})(\frac{1}{720})+(\frac{31}{15120})(\frac{1}{24})-(\frac{127}{604800})(\frac{1}{2})+\frac{73}{3421440}=\frac{-2}{93555}\Rightarrow\overline{d_{8}}=(\frac{-2}{93555})(\frac{1}{1024})=\frac{-1}{47900160}\,$$

Solved by: -Egm6341.s10.team1.andrewdugan 08:17, 24 March 2010 (UTC)

=Problem 8 Redo steps in proof of Trapezoidal error=

Statement
Redo steps in proof of Trapezoidal error by try to cancel terms with odd order of derivative of g


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


 * Ref: Lecture Notes [[media:Egm6341.s10.mtg28.djvu|P28-4]]
 * }
 * }

Solution
From


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


 * Ref: Lecture Notes [[media:Egm6341.s10.mtg26.djvu|P26-1]] [[media:Egm6341.s10.mtg21.djvu|P21-3]]
 * }
 * }



\begin{align} \\E &= \int_{+1}^{-1}\underbrace{(-t)}_{P_{1}(t)}g^{1}(t)dt\; \\ &= [\!\,P_{2}(t)g^{1}(t)]\!\,_{-1}^{+1}-\underbrace{\int_{-1}^{+1}P_{2}(t)g^{2}(t)dt}_{A}\,. \end{align} $$

In order to cancel odd order of derivative of g, select $$P_{2}(t) = 0 \,\,at\,\, t=\pm\!\,1$$



\begin{align} \\P_{2}(t) &= \int P_{1}(t)dt\; \\ &= -C_{1}\frac{t^{2}}{2}+C_{3}\,where C_{2} = 0\; \\ &= -\frac{t^{2}}{2}+\alpha\!\,\; \end{align} $$ $$P_{2}(t) = 0 \,\,at\,\, t=1$$

$$\rightarrow \alpha\!\,=\frac{1}{2}$$

$$\rightarrow C_{1} = -1\,\,C_{3} = \frac{1}{2}$$

$$ A = [P_{3}(t)g^{2}(t)]_{-1}^{+1} + \underbrace{\int_{-1}^{+1}\underbrace{P_{3}(t)}_{U^{'}}\underbrace{g^{3}(t)}_{V}dt}_{B}$$

$$ B = [UV]_{-1}^{+1} - \int UV^{'} = [P_{4}(t)g^{3}(t)]_{-1}^{+1} - \underbrace{\int_{-1}^{+1}P_{4}(t)g^{4}(t)dt}_{C}$$

In order to cancel odd order of derivative of g, select $$P_{2}(t) = 0 \,\,at\,\, t=\pm\!\,1$$

$$ t = 1 $$



\begin{align} \\P_{4}(1) &= \int P_{3}(t)dt\; \\ &= -\frac{1}{4!\!\,}+\frac{1}{4}+C_{4}+C_{5}\; \\ &= 0\; \end{align} $$

$$\rightarrow C_{4}+C_{5} = \frac{1}{24}-\frac{1}{4} = -\frac{5}{24}$$

$$ t = -1 $$



\begin{align} \\P_{4}(-1) &= \int P_{3}(t)dt\; \\ &= -\frac{1}{4!\!\,}+\frac{1}{4}-C_{4}+C_{5}\; \\ &= 0\; \end{align} $$

$$\rightarrow -C_{4}+C_{5} = \frac{1}{24}-\frac{1}{4} = -\frac{5}{24}$$

$$ C_{5} = -\frac{5}{24}\,\,C_{4} = 0 $$

$$ C = [P_{5}(t)g^{4}(t)]_{-1}^{+1} - \underbrace{\int_{-1}^{+1} P_{5}(t)g^{5}(t)dt}_{D}$$

$$ D = \underbrace{[P_{6}(t)g^{5}(t)]_{-1}^{+1}}_{= 0} - \int_{-1}^{+1} P_{6}(t)g^{6}(t)dt$$

$$ E = -[P_{3}(t)g^{2}(t)+P_{5}(t)g^{4}(t)+...+P_{2l+1}(t)g^{2l}(t)]_{t = -1}^{t = +1} - \int_{-1}^{+1}P_{2l+2}(t)g^{2l+2}(t)dt$$

$$ P_{3}(t) $$ is odd function $$ \rightarrow P_{3}(-1) = -P_{3}(1)$$

$$ [\,P_{3}(t)g^{2}(t)]_{-1}^{1} = P_{3}(1)g^{2}(1) - P_{3}(-1)g^{2}(-1) = P_{3}(1)[g^{2}(1) + g^{2}(-1)]$$

$$ E = -\sum_{r = 1}^{l}P_{2r+1}(1)[g^{2r}(1) + g^{2r}(-1)] - \int_{-1}^{+1}P_{2l+2}(t)g^{2l+2}(t)dt$$

From [[media:Egm6341.s10.mtg21.djvu|p.21-2]] $$ g_{k}^{i} = (\frac{h}{2})^{i}f^{i}(x(t))\,\,x\in\!\,[x_{k},\,x_{k+1}] $$

$$ E = -\sum_{r = 1}^{l}P_{2r+1}(1)[(\frac{h}{2})^{2r}f^{2r}(x(1)) + (\frac{h}{2})^{2r}f^{2r}(x(-1))] - \int_{-1}^{+1}P_{2l+2}(t)(\frac{h}{2})^{2l+2}f^{2l+2}(x)\frac{2}{h}dx$$

$$ \overline{d_{2r}} = \frac{P_{2r}(1)}{2^{2r}}$$

$$ E = -\sum_{r = 1}^{l}2\overline{d_{2r+1}}h^{2r} [f^{2r}(b) + f^{2r}(a)] - (\frac{h}{2})^{2l+2}\frac{2}{h}\sum_{k = 0}^{n - 1}\int_{x_{k}}^{x_{k+1}}P_{2l+2}(t_{k}(x))f^{2l+2}(x)dx$$



\begin{align} \\E_{n}^{1} &= \frac{h}{2}E\; \\ &= -\sum_{r = 1}^{l}\overline{d_{2r+1}}h^{2r-1} [f^{2r}(b) + f^{2r}(a)] - (\frac{h}{2})^{2l+2}\sum_{k = 0}^{n - 1}\int_{x_{k}}^{x_{k+1}}P_{2l+2}(t_{k}(x))f^{2l+2}(x)dx\; \end{align} $$

Solved by : EGM6341.s10.Team1.Ya-Chiao Chang 19:09, 23 March 2010 (UTC)

=Problem 9-Recurrence formula =

Find
Use (6)[[media:Egm6341.s10.mtg29.djvu|p.29-2]] to obtain $$ (p_{2},p_{3}),(p_{4},p_{5}),(p_{6},p_{7})\,$$

Given
Using $$ p_{1}(t)=-t,i.e.,c_{1}=-1 \, $$

Solution
(6)[[media:Egm6341.s10.mtg29.djvu|p.29-2]]

$$ \frac{c_{1}}{(2i+1)!}+\frac{c_{3}}{(2i-1)!}+\frac{c_{5}}{(2i-3)!}+...+\frac{c_{2i-1}}{3!}+c_{2i+1}=0\, $$

when $$ i=1 \,$$

$$ \frac{c_{1}}{3!}+c_{3}=0\, $$

Recall $$ p_{1}(t)=-t,i.e.,c_{1}=-1 \, $$

$$ \Rightarrow c_{3}=\frac{1}{6}\, $$

when $$ i=2 \,$$

$$ \frac{c_{1}}{5!}+\frac{c_{3}}{3!}+c_{5}=0\, $$

Recall $$ c_{3}=\frac{1}{6}\, $$

$$ \Rightarrow c_{5}=-\frac{7}{360}\, $$

when $$ i=3 \,$$

$$ \frac{c_{1}}{7!}+\frac{c_{3}}{5!}+\frac{c_{5}}{3!}+c_{7}=0\, $$

Recall $$ c_{5}=-\frac{7}{360}\, $$

$$ \Rightarrow c_{7}=\frac{31}{15120}\, $$

From (1)and (3)[[media:Egm6341.s10.mtg29.djvu|p.29-2]]

$$ p_{2i}(t)=\sum_{j=0}^{i}c_{2j+1}\frac{t^{2(i-j)}}{[2(i-j)]!}\, $$

$$ p_{2i+1}(t)=\sum_{j=0}^{i}c_{2j+1}\frac{t^{2(i-j)+1}}{[2(i-j)+1]!}+c_{2i+2}\, $$

where $$ c_{2i+2}=0\, $$

thus when $$ i=1 \,$$

$$ p_{2}=c_{1}\frac{t^{2}}{2!}+c_{3}=-\frac{t^{2}}{2}+\frac{1}{6}\,$$

$$ p_{3}=c_{1}\frac{t^{3}}{3!}+c_{3}t=-\frac{t^{3}}{6}+\frac{1t}{6}\,$$

when $$ i=2 \,$$

$$ p_{4}=c_{1}\frac{t^{4}}{4!}+c_{3}\frac{t^{2}}{2!}+c_{5}=-\frac{t^{4}}{24}+\frac{t^{2}}{12}-\frac{7}{360}\,$$

$$ p_{5}=c_{1}\frac{t^{5}}{5!}+c_{3}\frac{t^{3}}{3!}+c_{5}t=-\frac{t^{5}}{120}+\frac{t^{3}}{36}-\frac{7t}{360}\,$$

when $$ i=3 \,$$

$$ p_{6}=c_{1}\frac{t^{6}}{6!}+c_{3}\frac{t^{4}}{4!}+c_{5}\frac{t^{2}}{2!}+c_{7}=-\frac{t^{6}}{720}+\frac{t^{4}}{144}-\frac{7t^{2}}{720}+\frac{31}{15120}\,$$

$$ p_{7}=c_{1}\frac{t^{7}}{7!}+c_{3}\frac{t^{5}}{5!}+c_{5}\frac{t^{3}}{3!}+c_{7}t=-\frac{t^{7}}{5040}+\frac{t^{5}}{720}-\frac{7t^{3}}{2160}+\frac{31t}{15120}\,$$


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


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

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


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

p_{4}=-\frac{t^{4}}{24}+\frac{t^{2}}{12}-\frac{7}{360}, p_{5}=-\frac{t^{5}}{120}+\frac{t^{3}}{36}-\frac{7t}{360}\,$$ $$
 * $$\displaystyle
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"


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

p_{6}=-\frac{t^{6}}{720}+\frac{t^{4}}{144}-\frac{7t^{2}}{720}+\frac{31}{15120}, p_{7}=-\frac{t^{7}}{5040}+\frac{t^{5}}{720}-\frac{7t^{3}}{2160}+\frac{31t}{15120}\,$$ $$
 * $$\displaystyle
 * }
 * }

Solved by : Egm6341.s10.team1.lei00:55, 24 March 2010 (UTC)

=Problem 10: Decipher the MATLAB code by Kessler=

Statement
Review the MATLAB code written by Kessler. Comment on what each line does.

Solution
The code computes the Trapezoidal error polynomials evaluated at t=1. The polynomial equation is,
 * $$p_{2k}(t)=c_1\frac{t^{2k}}{(2k)!}+c_3\frac{t^{2k-2}}{(2k-2)!}+c_5\frac{t^{2k-4}}{(2k-4)!}+...+c_{2k-3}\frac{t^4}{4!}+c_{2k-1}\frac{t^2}{2!}+c_{2k+1}\frac{t^0}{0!}$$

When evaluated at t=1, the equation is,
 * $$p_{2k}(1)=\frac{c_1}{(2k)!}+\frac{c_3}{(2k-2)!}+\frac{c_5}{(2k-4)!}+...+\frac{c_{2k-3}}{4!}+\frac{c_{2k-1}}{2!}+\frac{c_{2k+1}}{0!}$$

The coefficients, $$c$$, are computed by solving the below equation using $$c_1=-1$$ as a starting point,
 * $$\frac{c_1}{(2k-1)!}+\frac{c_3}{(2k-3)!}+\frac{c_5}{(2k-5)!}+...+\frac{c_{2k-5}}{5!}+\frac{c_{2k-3}}{3!}+\frac{c_{2k-1}}{1!}=0$$

For illustration, the first few coefficients and polynomial equations are shown below.

Notice that the factorials in the denominators of the polynomials differ by 1 from those in the coefficients. Also, to solve for the next coefficient, the preceding coefficients only need to be summed and then moved to the other side of the equal sign, i.e $$c_7=-(\frac{c_1}{7!}+\frac{c_3}{5!}+\frac{c_5}{3!})$$.

The following code will be commented line-by-line to explain the algorithm of Kessler:

Solved by: EGM6341.s10.Team1.Kumanchik 19:43, 24 March 2010 (UTC)

=Problem 11 Compute the curve length of ellipse=

Statement
Compute C by using two methods:

$$ \displaystyle a)\, C = \int_{\theta = 0}^{\theta = 2\pi}dl \,\,\rightarrow From(4)$$ [[media:Egm6341.s10.mtg30.djvu|P30-3]]

$$ dl = d\theta[r^{2} + (\frac{dr}{d\theta})^{2}]^{\frac{1}{2}}\,\,\rightarrow From(1) $$ [[media:Egm6341.s10.mtg30.djvu|p.30-3]]

$$ \displaystyle b)\, C = 4aE(e^{2}) \,\,\rightarrow From(5)$$ [[media:Egm6341.s10.mtg30.djvu|p.30-4]]

$$ E(e^{2}) = \int_{0}^{\frac{\pi}{2}}[1 - e^{2}sin^{2}\theta]^{\frac{1}{2}}d\theta \rightarrow From(6)$$ [[media:Egm6341.s10.mtg30.djvu|p.30-4]]

Solution
$$ \begin{align} \displaystyle a)\, C = \int_{\theta = 0}^{\theta = 2\pi}dl \\ &=\int_{\theta = 0}^{\theta = 2\pi}d\theta[r^{2} + (\frac{dr}{d\theta})^{2}]^{\frac{1}{2}} \\\end{align}\ $$

$$ r(\theta) = \frac{1 - e^{2}}{1 - ecos\theta} $$

$$ e = sin(\frac{\pi}{12}) $$

$$ \begin{align} C = \int_{\theta = 0}^{\theta = 2\pi}dl \\ &=\int_{\theta = 0}^{\theta = 2\pi}[(\frac{1 - e^{2}}{1-ecos\theta})^{2} + (\frac{(e^{3} - e)sin\theta}{e^{2}cos^{2}\theta - 2ecos\theta + 1})^{2}]^{\frac{1}{2}}d\theta\\ &=\int_{\theta = 0}^{\theta = 2\pi}[1 + (\frac{e\cancelto{1}{(e^{2} - 1)}sin\theta}{(ecos\theta - 1)^{\cancelto{1}{2}}})^{2}(\frac{\cancelto{1}{1-ecos\theta}}{\cancelto{1}{1 - e^{2}}})^{2}]^{\frac{1}{2}}d\theta\\ &=[1 + (\frac{esin\theta}{ecos\theta - 1})^{2}]^{\frac{1}{2}}d\theta \\\end{align}\ $$

Use Matlab to find the exact value of C

Get I1 = 1.6041  Elapsed time is 0.049997 seconds.

Use Composite Trapezoidal rule: Get n = 18 In = 6.176601987629740 Elapsed time is 0.009616 seconds.

Use Clenshaw-Curtis quadrature : Get n = 23 In2 = 6.1766 En2 = 7.5165e-011 Elapsed time is 0.038245 seconds.

Use Romberg Table:

Get N = 128 In3 = 6.1766 En3 = 2.0250 e-013 Elapsed time is 0.006707 seconds.

$$ \displaystyle b)\, C = 4a\int_{0}^{\frac{\pi}{2}}[1-e^{2}sin^{2}\theta]^{\frac{1}{2}}d\theta \ $$

Here $$ a\, =\, 1\, $$

Use Matlab to find the exact value of C

Get I2 = 6.1766  Elapsed time is 0.057046 seconds.

Solved by : EGM6341.s10.Team1.Ya-Chiao Chang 19:09, 23 March 2010 (UTC)

=Problem 12: Derive the arc length of a curve using the law of cosines=

Find
The arc length of a curve in space using the Law of Cosines

Given
The law of cosines:
 * $$c^2=a^2+b^2-2abcos(\gamma) \,$$

Solution
The law of cosines can be directly applied to the triangle with sides $$r$$, $$r+dr$$, and inner angle $$d\theta$$ to determine the differential line segment AB=$$dl$$.
 * $$dl^2=r^2+(r+dr)^2-2r(r+dr)cos(d\theta)=2r^2+2rdr+dr^2-(2r^2+2rdr)cos(d\theta) \,$$

The Taylor series expansion of $$cos(x)$$ is,
 * $$cos(x)=1-\frac{x^2}{2!}+\frac{x^4}{4!}-...$$

Taking the first two terms of the expansion and applying them to the differential length equation yields,
 * $$dl^2=2r^2+2rdr+dr^2-(2r^2+2rdr)(1-\frac{d\theta^2}{2})=dr^2+r^2d\theta^2+r\cancel{drd\theta^2}^{\approx 0}$$

Since the triple differential element $$drd\theta^2$$ shrinks faster than the double elements $$dr^2$$ and $$d\theta^2$$, it is set to zero. The remainder is,
 * $$dl^2=d\theta^2(\frac{dr^2}{d\theta^2}+r^2)$$

Integrating from $$\theta_1$$ to $$\theta_2$$ yields,
 * $$l=\int_{\theta_1}^{\theta_2}d\theta\sqrt{(\frac{dr}{d\theta})^2+r^2}$$

This is identical to the expression derived from geometry.

Solved by: EGM6341.s10.Team1.Kumanchik 19:44, 24 March 2010 (UTC)

=Contributing Members= EGM6341.s10.Team1.Ya-Chiao Chang 19:09, 23 March 2010 (UTC) Author of problems 1,8 and 11  Proof read : 2 and 5

Egm6341.s10.team1.toddmock 21:05, 23 March 2010 (UTC) Author of problems 3 and 6

Egm6341.s10.team1.lei 00:57, 24 March 2010 (UTC) Author of problems 2,5 and 9

Egm6341.s10.team1.andrewdugan 08:23, 24 March 2010 (UTC) Author of problems 4 and 7 Proof read : 3 and 6

EGM6341.s10.Team1.Kumanchik 15:22, 25 March 2010 (UTC) Author of problems 10 and 12 Proof read : 1, 4, and 9