User:Egm6341.s10.Team4/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}$$
 * }.
 * }.

Author
Solved and typed by - Egm6341.s10.Team4.andy 08:18, 24 March 2010 (UTC).

Proofed by - Egm6341.s10.Team4.riherd 14:14, 24 March 2010 (UTC) and --Egm6341.s10.Team4.roni 18:35, 24 March 2010 (UTC)

= Problem 2: Steps 4a and 4b in the proof of higher order derivation of Trap. error =

Given
Envisage the acquired expression for E at the end of step 3 on [[media:Egm6341.s10.mtg26.djvu|26-3]] as following:
 * {| style="width:100%" border="0" align="left"


 * $$\displaystyle$$
 * $$\displaystyle E=[p_2(t).g^{(1)}(t)+p_4(t).g^{(3)}(t)]_{-1}^{+1}-\int\limits_{-1}^{+1} p_5(t).g^{(5)}(t)dt$$
 * $$\displaystyle E=[p_2(t).g^{(1)}(t)+p_4(t).g^{(3)}(t)]_{-1}^{+1}-\int\limits_{-1}^{+1} p_5(t).g^{(5)}(t)dt$$


 * }
 * }

Find
What are the expressions for $$\displaystyle p_6(t) $$, and $$\displaystyle p_7(t) $$ ?

Solution
At the end of step 3 of this procedure, we have obtained:


 * $$\displaystyle

p_4(t)=-\dfrac{t^4}{24}+\dfrac{t^2}{12}-\dfrac{7}{360}$$


 * $$\displaystyle

p_5(t)=-\dfrac{t^5}{120}+\dfrac{t^3}{36}-\dfrac{7}{360}t$$

Step 4a:



E=[p_2(t).g^{(1)}(t)+p_4(t).g^{(3)}(t)]_{-1}^{+1}-\int\limits_{-1}^{+1} p_5(t).g^{(5)}(t)dt$$

If we call the second term (integration term) as:



D:=\int\limits_{-1}^{+1} p_5(t).g^{(5)}(t)dt$$

By integrating by parts we have:



dv=p_5(t)dt\Rightarrow v=p_6(t)=\int p_5(t)dt$$



u=g^{(5)}(t)\Rightarrow du=g^{(6)}(t)dt$$



\Rightarrow D=[uv]_{-1}^{+1}-\int\limits_{-1}^{+1} vdu=[p_6(t).g^{(5)}(t)]_{-1}^{+1}-\int\limits_{-1}^{+1} p_6(t).g^{(6)}(t)dt$$



p_6(t)=\int p_5(t)dt=\int (-\dfrac{t^5}{120}+\dfrac{t^3}{36}-\dfrac{7}{360}t)dt=-\dfrac{t^6}{6!}+\dfrac{t^4}{144}-\dfrac{7}{720}t^2+\alpha$$

Step 4b:

Then by defining F as:



F:=\int\limits_{-1}^{+1} p_6(t).g^{(6)}(t)dt$$

We repeat integration by parts method;



dv=p_6(t)dt\Rightarrow v=p_7(t)=\int p_6(t)dt$$



u=g^{(6)}(t)\Rightarrow du=g^{(7)}(t)dt$$



\Rightarrow F=[p_7(t).g^{(6)}]_{-1}^{+1}-\int\limits_{-1}^{+1} p_7(t).g^{(7)}(t)dt$$



p_7(t)=-\dfrac{t^7}{7!}+\dfrac{t^5}{720}-\dfrac{7t^3}{2160}+\alpha t+\beta$$

We want to make $$\displaystyle [p_7(t).g^{(6)}(t)]_{-1}^{+1} $$ to be equal to zero. So, for an odd function like $$\displaystyle p_7(t) $$, we have:



p_7(0)=0\Rightarrow \beta=0$$



p_7(\pm 1)=0$$



\Rightarrow p_7(1)=-\dfrac{1}{7!}+\dfrac{1}{720}-\dfrac{7}{2160}+\alpha=0$$



\Rightarrow \alpha=\dfrac{3!}{7!\times 3}=\dfrac{31}{15120}$$


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

$$\displaystyle p_6(t)=-\dfrac{t^6}{6!}+\dfrac{t^4}{144}-\dfrac{7t^2}{720}+\dfrac{31}{15120}$$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }.
 * {| style="width:１０0%" border="0" align="left"
 * {| style="width:１０0%" border="0" align="left"

$$\displaystyle p_7(t)=-\dfrac{t^7}{7!}+\dfrac{t^5}{720}-\dfrac{7t^3}{2160}+\dfrac{31}{15120}t$$
 * 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 23:25, 18 March 2010 (UTC)

Proofed by - Egm6341.s10.Team4.riherd 14:19, 24 March 2010 (UTC) .

= Problem 3: Deducing a relation between x and t in proof of trapezoidal error =

Given

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




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


 * }.
 * }.

Find

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




 * Find tk in terms of x.
 * }.
 * }.

Solution

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




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


 * }.
 * }.


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




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


 * }.
 * }.


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




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


 * }.
 * }.

Substituting x=xk.


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




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


 * }.
 * }.


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




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


 * }.
 * }.


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




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


 * }.
 * }.

We know that xk+1-xk=h.


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




 * $$\Rightarrow \displaystyle t_k =\frac{-1}{h} (h)$$


 * }.
 * }.


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




 * $$\Rightarrow \displaystyle t_k =-1$$


 * }.
 * }.

Substituting x=xk+1.


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




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


 * }.
 * }.


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




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


 * }.
 * }.


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




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


 * }.
 * }.

We know that xk+1-xk=h.


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




 * $$\Rightarrow \displaystyle t_k =\frac{1}{h} (h)$$


 * }.
 * }.


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




 * $$\Rightarrow \displaystyle t_k =1$$


 * }.
 * }.

Author
Solved and typed by - Egm6341.s10.team4.anandankala 12:50, 24 March 2010 (UTC). Reviewed by - Egm6341.s10.Team4.andy 19:25, 24 March 2010 (UTC)

= Problem 4: Comparing Richarson Extrap. Coeff. to Coeff. from Trap. Error Estimate =

Given
Richardson Extrapolation Coefficients on slide [[media:Egm6341.s10.mtg19.djvu|19-3]], which is:


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


 * $$\displaystyle$$
 * $$\displaystyle a_i=d_i*(f \overset{(2i-1)}{(b)} -f \overset{(2i-1)}{(a)})$$
 * style= |
 * }
 * }
 * }


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


 * $$\displaystyle$$
 * $$\displaystyle d_i=- \frac{{B}_{2i}}{(2i)!}$$
 * style= |
 * }
 * }
 * }

$$\displaystyle$$ $$\displaystyle d_1=- \frac{1}{12} \ \ d_2= \frac{1}{720} \ \  d_3=- \frac{1}{30240}$$

Find
That these coefficients are equal to the following: equation (3) on slide [[media:Egm6341.s10.mtg27.djvu|27-1]]

$$\displaystyle$$ $$\displaystyle \bar{d}_{2r}= \frac{{P}_{2r} (t=1)}{(2^{2r})!}$$

$$\displaystyle$$ $$\displaystyle d_1=\bar{d}_{2r}= \frac{{P}_{2r} (t=1)}{(2^{2r})!} \ \ where  \ \  r=1$$

$$\displaystyle$$ $$\displaystyle d_2=\bar{d}_{2r}= \frac{{P}_{2r} (t=1)}{(2^{2r})!} \ \ where  \ \  r=2$$

$$\displaystyle$$ $$\displaystyle d_3=\bar{d}_{2r}= \frac{{P}_{2r} (t=1)}{(2^{2r})!} \ \ where  \ \  r=3$$

Solution
Recalling:

equation (2) on slide [[media:Egm6341.s10.mtg21.djvu|21-2]]
 * $$\displaystyle

P_1(t)=-t$$

equation (1) on slide [[media:Egm6341.s10.mtg21.djvu|21-3]]

P_2(t)=- \frac{t^2}{2}+\frac{1}{6}$$

equation (4) on slide [[media:Egm6341.s10.mtg21.djvu|21-3]]

P_3(t)=-\frac{t^3}{6}+\frac{t}{6}$$

on slide [[media:Egm6341.s10.mtg21.djvu|26-3]]

P_4(t)=- \frac{t^4}{24}- \frac{t^2}{12}- \frac{72}{360}$$

In General, from the Paper by Patch Kessler we have:



P_{2k}(t)=c1 \frac{t^{2k}}{(2k)!} + c_2 \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)!}$$

Giving (also from HW 5.2 and it's solution) [[media:Egm6341.s10.mtg27.djvu|27-1]]



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

We only need P1, P4 and P6

Giving,


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

$$\displaystyle d_1=\bar{d}_{2}= \frac{{P}_{2} (t=1)}{(4)} \ \ =-1/12$$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |


 * style= |
 * }
 * }


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

$$\displaystyle d_2=\bar{d}_{4}= \frac{{P}_{4} (t=1)}{(16)} \ \ = 1/16*(-1/241/12-7/360)=1/720$$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |


 * style= |
 * }
 * }


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

$$\displaystyle d_3=\bar{d}_{6}= \frac{{P}_{6} (t=1)}{(64)} \ \ = 1/64*(-1/720+1/144-7/720+31/15120)=-1/30240$$
 * 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.roni 18:23, 24 March 2010 (UTC)

= Problem 5: Derivation of Compsit Trap. Rule Error =

Given
Refer Lecture slide 28-3 for problem statement

The Error of Composit Trap. Rule


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

E^1_n= \sum_{k=0}^{n-1} \left[  \int_{x_{k}}^{x_{k+1}}f(x)dx-\frac{h}{2} \left\{ f(x_k)+f(x_{k+1}) \right\}  \right]$$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

Find
Derive the Compsit Trap.Rule Error equation.
 * {| style="width:100%" border="0" align="left"

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

where,


 * $$\displaystyle \overline{d}_{2r} = \frac{p_{2r}(+1)}{2^{2r}} $$
 * $$\displaystyle x \in [a,b] $$

Solution
The Error of Composit Trap. Rule


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

E^1_n= \sum_{k=0}^{n-1} \left[  \int_{x_{k}}^{x_{k+1}}f(x)dx-\frac{h}{2} \left\{ f(x_k)+f(x_{k+1}) \right\}  \right]$$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

Transfer int.$$\displaystyle [x_k, x_{k+1}]$$ to $$\displaystyle [1,+1]$$

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

x(t):=t\frac{h}{2}+\frac{x_k+x_{k+1}}{2}, \, \, \, \, \, \, \, t \in [-1,1]\, \, \,\, \, \,, h:=(b-a)/n$$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.


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

g_k(t) = f(x(t)) \,\,\,\,\,\,such \,\,\,that\,\,\,\,\,x \in [x_k, x_{k+1}]$$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.


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

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

through the successive integration by parts, the below equation can be obtained21-2,326-3


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

\begin{align} E^1_n & = \frac{h}{2} \left[ \sum_{k=0}^{n-1}\Big[p_2(t)g_k^{(1)}(t)+p_4(t)g_k^{(3)}(t_k)+p_6(t)g_k^{(5)}(t)+......+p_{2\ell}(t)g_k^{(2\ell-1)}(t)\Big]_{-1}^{+1}- \sum_{k=0}^{n-1} \left[ \int_{-1}^{1}p_{2\ell}(t)g_k^{(2\ell)}(t) dt \right]\right]\\ &= \frac{h}{2} \left[ \sum_{r=1}^{\ell}\sum_{k=0}^{n-1}\Big[p_{2r}(t)g_k^{(2r-1)}(t)\Big]_{-1}^{+1} - \sum_{k=0}^{n-1} \left[    \int_{-1}^{1}p_{2\ell}(t)g_k^{(2\ell)}(t) dt \right]\right] \end{align}$$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

Extend the first summation term.


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

\begin{align} E^1_n &= \frac{h}{2} \left[ \sum_{r=1}^{\ell}\sum_{k=0}^{n-1}\Big[p_{2r}(+1)g_k^{(2r-1)}(+1)-p_{2r}(-1)g_k^{(2r-1)}(-1)\Big]- \sum_{k=0}^{n-1} \left[   \int_{-1}^{1}p_{2l}(t)g_k^{(2\ell)}(t) dt \right]\right]\\ & because \,\,\,\,\,\,p_{2r}(+1)=p_{2r}(-1),\\ &= \frac{h}{2} \left[ \sum_{r=1}^{\ell}\sum_{k=0}^{n-1} p_{2r}(+1) \Big[g_k^{(2r-1)}(+1)-g_k^{(2r-1)}(-1)\Big]- \sum_{k=0}^{n-1} \left[   \int_{-1}^{1}p_{2l}(t)g_k^{(2\ell)}(t) dt\right]\right] \end{align}$$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

Using 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
 * }.
 * }.

$$\displaystyle g_k(t)$$can be changed to $$\displaystyle f_(x_k)$$ and below was obtained.
 * {| style="width:100%" border="0" align="left"

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

Plug in thess relationships to the equation $$\displaystyle E_n^1$$
 * {| style="width:100%" border="0" align="left"

\begin{align} E^1_n & = \left(\frac{h}{2}\right) \left[ \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]- \sum_{k=0}^{n-1} \left[   \int_{x_k}^{x_{k+1}}p_{2\ell}(t_k(x))\left(\frac{h}{2}\right)^{2\ell}f^{(2\ell)}(x) dx \right] \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+1} \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
 * }.
 * }.

by the definition of $$\displaystyle \overline{d}_{2r}$$
 * $$\displaystyle \overline{d}_{2r} = \frac{p_{2r}(+1)}{2^{2r}} $$
 * $$\displaystyle x_n=b, x_0=a $$


 * {| 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]- \underbrace{\left(\frac{h}{2}\right)^{2\ell+1}}_{(?)} \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
 * }
 * }

This solution is little bit different from the given solution of the lecture.

the coefficient of second summation term that marked $$\displaystyle (?) $$

we got $$\displaystyle \left(\frac{h}{2}\right)^{2\ell+1} $$ instead of $$\displaystyle \left(\frac{h}{2}\right)^{2\ell} $$.

Author
Solved and typed by - Egm6341.s10.Team4.yunseok 16:59, 24 March 2010 (UTC) Reviewed by - Egm6341.s10.Team4.andy 18:41, 24 March 2010 (UTC)

= Problem 6 - Evaluation of d2i =

Given
The hyperbolic cotangent is defined as $$ \displaystyle\ coth(x)=\frac{cosh(x)}{sin(x)}=\frac{e^x+e^{-x}}{e^x-e^{-x}}. $$.

The function $$ \displaystyle\ f(x)=xcosh(x)=\sum_{i=0}^{\infty}\frac{2^{2i}B_{2i}}{(2i)!}x^{2i}$$, where Bi are the Bernoulli numbers.

Find
We are asked to verify the values of di for i=2,4, and 6, where di is the constant $$ \displaystyle\ d_{2i}=\frac{-B_{2i}}{(2i)!}$$. This is done previously given the values d2=-1/12, d4=1/720 and d6=-1/30240.

We are also asked to determine the values of d8 and d10.

Additionally, we are asked to compare these values of di to another relationship for di used in our error of the trapezoidal rule, where $$ \displaystyle\ d_{2i}=\frac{p_{2i}(1)}{2^{2i}}$$.

Solution
Expanding cosh(x) and sinh(x) in terms of the exponential function and then expanding those exponential functions as series around the point x=0, we see that

$$ \displaystyle\ f(x)=xcosh(x)=\sum_{i=1}^{\infty}-2^{2i}d_{2i}x^{2i}$$

$$ \displaystyle\ cosh(x)=1+\frac{1}{2}x^2-\frac{1}{24}x^4+\frac{1}{720}x^6+\frac{1}{40320}x^8+\frac{1}{3628800}x^{10}+...$$

$$ \displaystyle\ sinh(x)=x+\frac{1}{6}x^3+\frac{1}{120}x^5+\frac{1}{5040}x^7+\frac{1}{362880}x^9+\frac{1}{39916800}x^{11}+...$$

Substituting all of this into the function $$ \displaystyle\ f(x)=xcosh(x)$$, we see that

$$ \displaystyle\ f(x)=\frac{x+\frac{1}{2}x^3-\frac{1}{24}x^5+\frac{1}{720}x^7+\frac{1}{40320}x^9+\frac{1}{3628800}x^{11}...}{x+\frac{1}{6}x^3+\frac{1}{120}x^5+\frac{1}{5040}x^7+\frac{1}{362880}x^9+\frac{1}{39916800}x^{11}+...}$$

Performing the appropriate polynomial division (which will not be shown here due to length and no clear way to show long division in Latex), we see that

$$ \displaystyle\ f(x)=xcosh(x)=1+\frac{1}{3}x^2-\frac{1}{45}x^4+\frac{2}{975}x^6-\frac{1}{4725}x^8+\frac{2}{93555}x^{10}-... $$

This series expansion of xcoth(x) in hand, we are able to determine the values of $$ \displaystyle\ 2^{2i}d_{2i} $$ to be -

Additionally, we are asked to calculate d2i using a definition given by the polynomial functions defined in our trapezoidal error analysis, where $$ \displaystyle\ d_{2i}=\frac{p_{2i}(1)}{2^{2i}}$$.

From analysis done in class and coefficients as given by Kessler, P. (Trapezoidal Rule Error, http://www.mechanicaldust.com/UCB/math128a/extrap.pdf, 2008), we know that

$$ \displaystyle\ p_2(t)=-\frac{t^2}{2}+\frac{1}{6}, p_2(1)=-\frac{1}{3}$$

$$ \displaystyle\ p_4(t)=-\frac{t^4}{24}+\frac{t^2}{12}-\frac{7}{360}, p_4(1)=\frac{1}{45}$$

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

$$ \displaystyle\ p_8(t)=-\frac{t^8}{40320}+\frac{t^6}{4320}-\frac{7t^4}{8640}+\frac{31t^2}{30240}-\frac{127}{604800}, p_8(1)=\frac{1}{4725} $$

$$ \displaystyle\ p_{10}=-\frac{t^10}{3628800}+\frac{t^8}{241920}-\frac{7t^6}{259200}+\frac{31t^4}{362880}-\frac{127t^2}{1209600}+\frac{73}{3421440}, p_{10}(t)=\frac{-2}{93555} $$

With these coefficients in hand, we are able to calculate the values for d2i using the formula as given above relating p2i(1) and d2i.

Comparing these values, we see that the formulas given to find d2i are consistent with each other.

Author
Solved and Written by Egm6341.s10.Team4.riherd 07:13, 24 March 2010 (UTC)

= Problem 7: 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.

Author
Solved and typed by - Egm6341.s10.Team4.andy 08:21, 24 March 2010 (UTC) Reviewed by- Egm6341.s10.team4.anandankala 12:55, 24 March 2010 (UTC).

= Problem 8: Using Recurrence formula to find $$\displaystyle c_i $$ =

Given
Consider the Recurrence formula on slide [[media:Egm6341.s10.mtg29.djvu|29-2]] as follows:
 * {| style="width:100%" border="0" align="left"


 * $$\displaystyle$$
 * $$\displaystyle c_{2i+1}=-\dfrac{c_1}{(2i+1)!}-\dfrac{c_3}{(2i-1)!}-\dfrac{c_5}{(2i-3)!}-...-\dfrac{c_{2i-1}}{3!}$$
 * $$\displaystyle c_{2i+1}=-\dfrac{c_1}{(2i+1)!}-\dfrac{c_3}{(2i-1)!}-\dfrac{c_5}{(2i-3)!}-...-\dfrac{c_{2i-1}}{3!}$$


 * }
 * }

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


 * $$\displaystyle$$
 * $$\displaystyle p_1(t)=-t\Rightarrow c_1=-1$$
 * $$\displaystyle p_1(t)=-t\Rightarrow c_1=-1$$


 * }
 * }

Find
Obtain $$\displaystyle (p_2,p_3) $$, $$\displaystyle (p_4,p_5) $$ and $$\displaystyle (p_6,p_7) $$:

Solution

 * $$\displaystyle

p_1(t)=-t\Rightarrow p_2(t)=-\frac{t^2}{2}+c_3\Rightarrow p_3(t)=-\frac{t^3}{3!}$$

For $$\displaystyle (p_2,p_3) $$ we can get $$\displaystyle i=1 $$. Thus,


 * $$\displaystyle

c_{(2\times 1+1)}=c_3=-\frac{c_1}{(2\times 1+1)!}$$


 * $$\displaystyle

\Rightarrow c_3=\frac{1}{3!}$$


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

$$\displaystyle p_2(t)=-\frac{t^2}{2!}+\dfrac{1}{6}$$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }.
 * {| style="width:１０0%" border="0" align="left"
 * {| style="width:１０0%" border="0" align="left"

$$\displaystyle p_3(t)=-\frac{t^3}{3!}+\dfrac{1}{6}t$$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }.
 * }.

Likewise, for $$\displaystyle (p_4,p_5) $$, we can write:



p_4(t)=\int p_3(t)dt=\int (-\frac{t^3}{3!}+c_3t)dt=\int (-\frac{t^3}{3!}+\frac {t}{6})dt=-\frac{t^4}{4!}+\frac{t^2}{12}+c_5$$



p_5(t)=\int p_4(t)dt=\int (-\frac{t^4}{4!}+\frac{t^2}{12}+c_5)dt=-\frac{t^5}{5!}+\frac{t^3}{36}+c_5t$$

By setting $$\displaystyle i=2 $$ in Recurrence equation:



c_{2\times 2+1}=c_5=-\frac{-1}{(2\times 2+1)!}-\frac{\frac{1}{6}}{(2\times 2-1)!}=\frac{1}{5!}-\frac{1}{36}=-\frac{7}{360}$$


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

$$\displaystyle p_4(t)=-\frac{t^4}{4!}+\frac{t^2}{12}-\frac{7}{360}$$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }.
 * {| style="width:１０0%" border="0" align="left"
 * {| style="width:１０0%" border="0" align="left"

$$\displaystyle p_5(t)=-\frac{t^5}{5!}+\frac{t^3}{36}-\frac{7}{360}t$$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }.
 * }.

Ultimately, for $$\displaystyle (p_6,p_7) $$, we have:



p_6(t)=\int p_5(t)dt=\int (-\frac{t^5}{5!}+\frac{t^3}{36}-\frac{7}{360}t)dt=-\frac{t^6}{6!}+\frac{t^4}{144}-\frac{7t^2}{720}+c_7$$



p_7(t)=\int p_6(t)dt=\int (-\frac{t^6}{6!}+\frac{t^4}{144}-\frac{7t^2}{720}+c_7)dt=-\frac{t^7}{7!}+\frac{t^5}{720}-\frac{7t^3}{2160}+c_7t$$

By setting $$\displaystyle i=3 $$ in Recurrence equation:



c_{2\times 3+1}=c_7=-\frac{-1}{(2\times 3+1)!}-\frac{\frac{1}{6}}{(2\times 3-1)!}-\frac{\frac{-7}{360}}{(2\times 3-3)!}=\frac{1}{7!}-\frac{1}{720}+\frac{7}{2160}=\frac{31}{15120}$$


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

$$\displaystyle p_6(t)=-\dfrac{t^6}{6!}+\dfrac{t^4}{144}-\dfrac{7t^2}{720}+\dfrac{31}{15120}$$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }.
 * }.


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

$$\displaystyle p_7(t)=-\dfrac{t^7}{7!}+\dfrac{t^5}{720}-\dfrac{7t^3}{2160}+\dfrac{31}{15120}t$$
 * 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 00:44, 19 March 2010 (UTC) Reviewed by- Egm6341.s10.team4.anandankala 13:05, 24 March 2010 (UTC). .

= Problem 9: Kessler's Code =

Given

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




 * Given below is the Kessler's code


 * }.
 * }.

Find

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

Use (p2,p3),(p4,p5)(p6,p7) to understand the Kessler's code                       $$\displaystyle $$
 * }.
 * }.

Solution

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

The above code has been used to compute the coefficients p(2k) and the constants c(k) where k varies from 1 to n. In the above code a function fracsum has been defined and called accordingly in order to compute c(k) and p(2k). The various commands used in the code are gcd, lcm and round. Gcd is used to find the greatest common divisor between two numbers, lcm is used to find the least common multiple of the two numbers and round is used to round off a number to its nearest intezer. We know that $$\displaystyle p_2(t)= -\frac {t^2}{2!} + \frac {1}{6}$$

$$\displaystyle $$
 * }.
 * }.


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

$$\displaystyle \Rightarrow p_2(1)= -\frac {1}{2!} + \frac {1}{6}= -\frac {1}{3}$$ $$\displaystyle $$
 * }.
 * }.


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

$$\displaystyle p_4(t)= -\frac {t^4}{24} + \frac {t^2}{12} - \frac {7}{360}$$ $$\displaystyle $$
 * }.
 * }.


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

$$\displaystyle \Rightarrow p_4(1)= -\frac {1}{24} + \frac {1}{12} - \frac {7}{360}= \frac {1}{45}$$ $$\displaystyle $$
 * }.
 * }.


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

$$\displaystyle c1=-1, c3=\frac{1}{6}, c5=\frac{-7}{360}. $$ $$\displaystyle $$
 * }.
 * }.


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

In the code, the value of c1 is taken to be -1. The value of k ranges from 1 to n, the value of n being user defined. Considering the case where k=1, we get the value of c3 and p2(1). We have $$\displaystyle f=f\cdot g\cdot (g+1)$$ and cn=-1, cd=1. The initial values of f and g are 1,2. The final value of f is equal to 6. The variables for the function fracsum are $$\displaystyle(-1\cdot cn)$$ and $$\displaystyle(cd\cdot f)$$, which give the new values of c after every iteration. The array size of the input variables for the function increases by a unit size after every iteration. The funtion inputs in the first iteration are (1,6) which are equivalent to (n,d). The function returns the output values of these as (1,6). The cn array has now been updated to [-1 1] and the cd array to [1,6], where cn and cd are the numerator and denominator of constant c(k+2). To compute the value of p2(1), the following steps are done in the program. f array has been changed to [f;1] and g array to [2+g(1);g]. For k=1, we get it as f=[6 1] and g= [4 2]. Now these input variables are returned to the function as $$\displaystyle(g-1)\cdot cn $$and $$\displaystyle f\cdot cd$$ where cn= [-1 1] and cd= [1 6].

In this case we get arrays with two elements each and the commands gcd and lcm are implemented independently on each of those elements. we get the values of newpn and newpd as -1 and 3, where pn and pd are the numerator and denominator of p2k(1). We get p=[pn pd]=[-1 3]

$$\displaystyle $$
 * }.
 * }.


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



In the next iteration the value of k is increased to 2. $$\displaystyle f=f\cdot g\cdot (g+1)$$. We get f= [120 6], cn= [-1 1] and cd= [1 6]. From the function, we get the values of newcn and newcd as -7 and 360.

For computing p4(1), f is again changed to [120 6 1] and g to [6 4 2]. The function is called again with input variables as $$\displaystyle(g-1)\cdot cn $$and $$\displaystyle f\cdot cd$$. We get the values of newpn and newpd as 1 and 45. pn=[-1 1] and pd=[3 45].

similar cycle is continued for all the higher iterations and we get the higher p and c.

$$\displaystyle $$
 * }.
 * }.

Author
Solved and typed by -Egm6341.s10.team4.anandankala 13:15, 24 March 2010 (UTC).

.

= Problem 10: Application of Engineering Orbital Mech. =

Given
Refer Lecture slide 30-4 for problem statement

Polar form relative to focus
 * {| style="width:100%" border="0" align="left"


 * [[Image:Ellipse Polar.svg|200px]]
 * }.
 * }.
 * }.

Eq (3) from Page [[media:Egm6341.s10.mtg30.djvu|30-3]]

$$\displaystyle \ \ r(\theta) = \frac{a(1-e^2)}{1-e \, cos(\theta)}$$

In our problem, a=1

where, eccentricity $$\displaystyle e = \sin(\frac{\pi}{12}) $$

First Method to compute the Arc Length for an elliptical curve is using Eq (4) from Page [[media:Egm6341.s10.mtg30.djvu|30-3]] Since for the Ellipse $$\displaystyle \theta$$ range is from 0 to 2 $$\displaystyle\pi $$

Circumference $$\displaystyle I( \theta) = \int_0^{2\pi} dl$$

Where Eq (1) $$\displaystyle dl= \sqrt{ {r}^{2}+ {\left(  \frac{dr}{d \theta}\right)}^{2}} d\theta $$.

The second method uses the elliptic integral of the second kind which is defined as:

$$E(e^2) = \int_0^{\pi/2}\sqrt {1-e^2 \sin^2\theta}\ d\theta\ $$    Eq(6)    in page     [[media:Egm6341.s10.mtg30.djvu|30-4]]

The circumference of an ellipse is $$\displaystyle C = 4 a E(e^2)$$    Eq(5)   in page   [[media:Egm6341.s10.mtg30.djvu|30-4]],

Giving the integral:


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

$$\displaystyle I= 4 E(e^2) = 4\int_0^{\pi/2}\sqrt {1-e^2 \sin^2\theta}\ d\theta $$
 * }

Find
Find Arc length of ellipse using the two Integrals and the integration methods below.

compute $$\displaystyle I_n$$ to the error $$\displaystyle 10^{-10}$$ ,

compute time using tic/toc matlab command and error estimate

1) Composit Trapozoidal rule

2) Romberg Table

3) Clencurt

Solution
The Integration result are summarized in the following table:



Note that checking both integral calculations against Ramanujan approximation 's:
 * $$C \approx \pi \left[3(a+b) - \sqrt{(3a+b)(a+3b)}\right]= \pi(3(a+b)-\sqrt{10ab+3(a^2+b^2)})$$

where, a = longest radius, b= shortest radius in ellipse

the results of our integration method and Ramanujan approximation were same. $$\displaystyle (c \simeq 6.176601987)$$

Discussion: One can clearly see that for these integrals the Trapezoidal method gives superior performance This is due to the fact that the Integrand is a periodic function. Clencurt has slightly better performance than Romberg. First method Integral gives lower quality on all methods and need more CPU time for similar performance.

(1) Composite Trapezoidal rule

Matlab Code:

subfunction ff5_10(x)

(2) Romberg Table

Matlab Code:

(3) ClenCurt Integration)

Matlab Code:

Author
Solved and typed by - --Egm6341.s10.Team4.roni 18:25, 24 March 2010 (UTC)

= Problem 11: Derivation of the equation of arclength using the cosine law =

Given
Refer Lecture slide for problem statement



[Figure 1]


 * $$\displaystyle

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

where, eccentricity $$\displaystyle e = \sin(\frac{\pi}{12}) $$

Find
Derive the equation of arclength using triangle OAB and cosine law.


 * $$d\ell=d\theta \left[ r^2+ \left( \frac{dr}{d\theta}\right)^2\right]^{\frac{1}{2}}$$

Solution

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

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

the law of cosine
 * $$c^2 = a^2 + b^2 - 2ab\cos(\gamma)\,$$


 * style= |
 * }.
 * }.

Apply the cosine law to triangle OAB in the Figure1 (See Figure 1)


 * $$\displaystyle dl^2=\overline{AB}^2 = \overline{OA}^2 + \overline{OB}^2 - 2\overline{OA}\,\,\, \overline{OB}\cos(d\theta)\, $$
 * $$\displaystyle dl = \sqrt{\overline{OA}^2 + \overline{OB}^2 - 2\overline{OA}\,\,\, \overline{OB}\cos(d\theta)}\, $$
 * $$\displaystyle dl = \sqrt{r(\theta)^2 + r(\theta+d\theta)^2 - 2r(\theta)r(\theta+d\theta)\cos(d\theta)}\, $$
 * $$\displaystyle dl = \sqrt{\underbrace{\Big[r(\theta) - r(\theta+d\theta)\Big]^2}_{(a)} + 2r(\theta)r(\theta+d\theta)\underbrace{(1-\cos(d\theta))}_{(b)}}\, $$

Part$$\displaystyle (a) $$ is approximately
 * $$\displaystyle (r(\theta) - r(\theta+d\theta))^2 \simeq (dr)^2 \, $$

For part$$\displaystyle (b) $$

Using the other cosine summation law


 * $$\displaystyle cos(\alpha + \beta)=cos(\alpha)cos(\beta)-sin(\alpha)sin(\beta) \, $$


 * $$\displaystyle cos(d\theta)=cos\left(\frac{d\theta}{2}+\frac{d\theta}{2}\right) =cos\left(\frac{d\theta}{2}\right)cos\left(\frac{d\theta}{2}\right)-sin\left(\frac{d\theta}{2}\right)sin\left(\frac{d\theta}{2}\right)= cos^2\left(\frac{d\theta}{2}\right)-sin^2\left(\frac{d\theta}{2}\right) \, $$

because, $$\displaystyle cos^2\left(\frac{d\theta}{2}\right)= 1-sin^2\left(\frac{d\theta}{2}\right)\, $$


 * $$\displaystyle \Rightarrow cos(d\theta)= \left(1-sin^2\left(\frac{d\theta}{2}\right)\right)-sin^2\left(\frac{d\theta}{2}\right) = 1-2sin^2\left(\frac{d\theta}{2}\right)\ \, $$

In small $$\displaystyle d\theta$$ approximately,
 * $$\displaystyle sin(\frac{d\theta}{2}) \simeq \frac{d\theta}{2} \, $$

using this fact,


 * $$\displaystyle 1-cos(d\theta)= 1-\left(1-2sin^2\left(\frac{d\theta}{2}\right)\right) = 2\left(\frac{d\theta}{2}\right)^2 =\frac{(d\theta)^2}{2} $$

So, Plug in part(a) and Part(b)


 * $$\displaystyle dl = \sqrt{(r(\theta) - r(\theta+d\theta))^2 + 2r(\theta)r(\theta+d\theta)(1-\cos(d\theta))}\, $$
 * $$\displaystyle = \sqrt{(dr)^2 + 2r(\theta)r(\theta+d\theta)(\frac{(d\theta)^2}{2})} = \sqrt{(dr)^2 + r(\theta)r(\theta+d\theta)(d\theta)^2} \, $$
 * $$\displaystyle = d\theta \sqrt{\left(\frac{dr}{d\theta}\right)^2 + r(\theta)r(\theta+d\theta)} \, $$

when $$\displaystyle d\theta$$ is very small, approximately, $$\displaystyle r(\theta)r(\theta+d\theta) \simeq r(\theta)^2 \, $$


 * $$\displaystyle \simeq d\theta \sqrt{\left(\frac{dr}{d\theta}\right)^2 + r(\theta)^2} \, $$

Author
Solved and typed by - Egm6341.s10.Team4.yunseok 17:01, 24 March 2010 (UTC)

Proof read by - Egm6341.s10.Team4.nimaa&amp;m 16:06, 24 March 2010 (UTC) and --Egm6341.s10.Team4.roni 18:26, 24 March 2010 (UTC)

= Contributing Members = Egm6341.s10.Team4.andy 08:28, 24 March 2010 (UTC) - Author of Problems: 1, 7 ; Proof Read: 5, 3

Egm6341.s10.Team4.riherd 14:19, 24 March 2010 (UTC) - Author of Problem: 6 ; Proof Read: 1, 2

Egm6341.s10.Team4.nimaa&amp;m 16:06, 24 March 2010 (UTC) - Author of Problems: 2, 8 ; Proof Read: 11

Egm6341.s10.Team4.yunseok 17:02, 24 March 2010 (UTC) - Author of Problems: 5, 11

Egm6341.s10.team4.anandankala 12:50, 24 March 2010 (UTC)- Author of problems: 3,9; Proofread:7, 8.

Egm6341.s10.Team4.roni 18:28, 24 March 2010 (UTC) - Author of problems: 4,10; Proofread: 1,11.