User:Egm6341.s10.Team4.andy/HW6

= Problem 1: Arc Length Calculation =

Given
Refer Lecture slide 32-1 for problem statement

The value of $$\displaystyle r(\theta) $$ from Page [[media:Egm6341.s10.mtg30.djvu|30-3]] is given by,


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

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

Here, $$\displaystyle a=1 $$ and $$\displaystyle e = \sin(\pi/12) $$

Arc Length for an elliptical curve with $$\displaystyle \theta$$ varying from 0 to $$\displaystyle \frac{\pi}{3} $$ is given by,


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

$$\displaystyle I = \int_0^{\frac{\pi}{3}} \sqrt{ {r}^{2}+ {\left( \frac{dr}{d \theta}\right)}^{2}} d\theta $$ $$
 * $$\displaystyle \longrightarrow (2)
 * }.
 * }.

The elliptic integral of the second kind is given as:


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

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

Find
1. Use error estimate for Composite Trapezoidal Rule to find n, such that the error is to the order of $$\displaystyle O(10^{-10}) $$.

Error estimate is given by,


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

$$ $$
 * $$\displaystyle
 * E_{n}| \leq \frac{(b-a)^3}{12n^2}M_{2}
 * E_{n}| \leq \frac{(b-a)^3}{12n^2}M_{2}
 * $$\displaystyle \longrightarrow (4)
 * }.
 * }.

2. Use successive numerical Integration results as a stopping criterion, i.e,


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

$$ $$
 * $$\displaystyle
 * I_{2n} - I_{n}| < 10^{-10}
 * I_{2n} - I_{n}| < 10^{-10}
 * $$\displaystyle \longrightarrow (5)
 * }.
 * }.

3. Verify results of Romberg Integration, Clencurt Integration, Chebfun sum Integration with that of Composite Trapezoidal Rule.

Solution
1.

Using the error estimate of Composite Trapezoidal Rule given by Equation (4) for Equation (2), an error tolerance of the order of $$\displaystyle O(10^{-10}) $$ is obtained for,


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

n \le 1.675553588956571 \times 10^{4} \approx 16756 $$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

Using the error estimate of Composite Trapezoidal Rule given by Equation (4) for Equation (3), an error tolerance of the order of $$\displaystyle O(10^{-10}) $$ is obtained for,


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

n \le 8.006607416431191 \times 10^{3} \approx 8007
 * $$\displaystyle
 * $$\displaystyle

$$  Matlab Code: 
 * }.
 * }.

2. Using Successive Numerical Integration Results to obtain error tolerance of order of $$\displaystyle O(10^{-10}) $$.

For Equation (2), an error tolerance of the order of $$\displaystyle O(10^{-10}) $$ is obtained for,


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

\begin{align} n &= 16384 \\ E &= 2.685143218883468 \times 10^{-10} \\ I_n &= 1.26369048548985 \\ \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

From above we get $$\displaystyle n < 16756 $$.

For Equation (3), an error tolerance of the order of $$\displaystyle O(10^{-10}) $$ is obtained for,


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

\begin{align} n &= 4096 \\ E &= 4.863667246723935 \times 10^{-10} \\ I_n &= 1.03682664319432 \\ \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

From above we get $$\displaystyle n < 8007 $$.

 Matlab Code:  . 3. Verifying results with Romberg Integration, Clencurt Integration and Chebfun Sum Integration.

Using Romberg table, the integration results are given by:

For Equation (2), an error tolerance of the order of $$\displaystyle O(10^{-10}) $$ is obtained for,


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

\begin{align} n &= 64 \\ E &= 3.917310920087402 \times 10^{-11} \\ I_n &= 1.26368461998287 \\ \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

For Equation (3), an error tolerance of the order of $$\displaystyle O(10^{-10}) $$ is obtained for,


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

\begin{align} n &= 32 \\ E &= 3.602149689641010 \times 10^{-10} \\ I_n &= 1.03682398743891 \\ \end{align} $$  Matlab Code:  .
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

Using Clencurt, the integration results are given by:

For Equation (2), an error tolerance of the order of $$\displaystyle O(10^{-10}) $$ is obtained for,


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

\begin{align} n &= 8 \\ E &= 1.575350960791866 \times 10^{-10} \\ I_n &= 1.26369048600540 \\ \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

For Equation (3), an error tolerance of the order of $$\displaystyle O(10^{-10}) $$ is obtained for,


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

\begin{align} n &= 8 \\ E &= 2.562394740834861 \times 10^{-13} \\ I_n &= 1.03682664384306 \\ \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

 Matlab Code:  .

Using Chebfun sum, the integration results are given by:

For Equation (2), an error tolerance $$\displaystyle E $$ is obtained as,


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

\begin{align} E &= 5.107025913275720 \times 10^{-15} \\ I_n &= 1.263690485847865 \\ \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

For Equation (3), an error tolerance $$\displaystyle E $$ is obtained as,


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

\begin{align} E &= 2.220446049250313 \times 10^{-16} \\ I_n &= 1.036826643842808 \\ \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

 Matlab Code: