User:Egm6341.s2010.Team1.lei/HW4

For HW 4, I am responsible for 3 problems: 20-1,20-2(1) and 20-2(2).

=Problem 20-1 =

Find
Find $$ I_{n}\,$$ using$$ CT_{1},CT_{2},CT_{3}\,$$ for $$  n=2,4,8,16,...\,$$ untill  $$ I-I_{n}=O(10^{-6}) \,$$

Given
[[media:Egm6341.s10.mtg20.djvu|p.20-1]]

$$ CT_{K}(n)=CT_{K-1}(n)+a_{k}h^{2*k} \,$$

see [[media:Egm6341.s10.mtg6.pdf|p.6-5]] and [[media:Egm6341.s10.mtg19.djvu|p.19-2]]

Solution
From [[media:Egm6341.s10.mtg19.djvu|p.19-3]] and [[media:Egm6341.s10.mtg20.djvu|p.20-1]]

Case 1,find $$ I_{n}\, $$ using $$ CT_{1}\,$$

$$ CT_{1}(n)=\underbrace{\left( CT_{0}(n)\right)}_{T_{0}(n)} +a_{1}h^{2*1}\,$$

$$ I= \underbrace{\left( CT_{1}(n)\right)}_{I_{n}} +O(h^{4})\,$$

$$ CT_{2}(n)=\underbrace{\left( CT_{1}(n)\right)}_{T_{1}(n)} +a_{2}h^{2*2}\,$$

$$ I= \underbrace{\left( CT_{2}(n)\right)}_{I_{n}} +O(h^{6})\,$$

$$ CT_{3}(n)=\underbrace{\left( CT_{2}(n)\right)}_{T_{2}(n)} +a_{3}h^{2*6}\,$$

$$ I= \underbrace{\left( CT_{3}(n)\right)}_{I_{n}} +O(h^{8})\,$$

where $$ a_{1},a_{2},a_{3} \,$$ can be derived from [[media:Egm6341.s10.mtg19.djvu|p.19-3]]

$$ a_{i}=d_{i}[f^{2i-1}(b)-f^{2i-1}(a)]\,$$

$$ d_{i}=- \frac{B_{2i}}{(2i)!}\, $$

$$ d_{1}=- \frac{1}{12}, d_{2}= \frac{1}{720}, d_{3}= - \frac{1}{30240}\,$$

The above integral can be caculated using MATLAB codes and corresponding errors are tabulated.

From the results above, it can be easily seen that for $$ CT_{1}\,$$ the error can reach $$ O(10^{-6})\,$$ when n=4; for $$ CT_{2}\,$$ the error can already reach $$ O(10^{-7}\,$$) when n=2; for $$ CT_{3}\,$$ the error can already reach $$ O(10^{-9})\,$$ when n=2. So corrected trap.rule is more accurate than previous methods.

Matlab Code:

For $$ CT_{1},$$ and corresponding error

Matlab Code:

For $$ CT_{2},$$ and corresponding error Matlab Code:

For $$ CT_{3},$$ and corresponding error

Egm6341.s10.team1.lei16:31, 3 March 2010 (UTC)

=Problem 20-2(1)=

Find
For which $$ n,\,$$ so that $$ E_{n}^{1}=0 \, $$

Given
[[media:Egm6341.s10.mtg20.djvu|p.20-2]] equation(1)

$$ f \,$$ is  periodic  on$$ [a,b] \Longleftrightarrow f^{(k)}(a)=f^{(k)}(b),   k=0,1,2,...\,$$ Clearly (1) is valid for odd numb.

Solution
From [[media:Egm6341.s10.mtg19.djvu|p.19-3]]

$$ a_{i}=d_{i}[f^{2i-1}(b)-f^{2i-1}(a)]\,$$

if (1) is valid, then

$$ a_{i}=0 \,$$

Recall [[media:Egm6341.s10.mtg18.djvu|p.18-2]] and [[media:Egm6341.s10.mtg18.djvu|p.18-3]]

$$ E_{n}^{1}=a_{1} h^{2*1}+a_{2} h^{2*2}+... =\sum _{i=1}^{\infty}a_{i}h^{2*i}\,$$

where $$ a_{i}=0\,$$, therefore no matter $$ h\,$$,$$ E_{n}^{1}=0\,$$

That means $$ E_{n}^{1}\,$$ does not depend on $$ n\,$$,if the $$ f \,$$ is  periodic  on$$ [a,b]\,$$

Egm6341.s10.team1.lei16:32, 3 March 2010 (UTC)

=Problem 20-2(2)=

Find
Discuss Pros and cons:

1) $$ Taylor Series\,$$

2) $$ Compos. Trap.\,$$

3) $$ Compos. Simpson\,$$

4) $$ Romberg Table (Richardson)\,$$

5) $$ CT_{K}(n)\,$$

Solution
1) $$ Taylor  Series\,$$

$$ \bullet\,$$ Accuracy and speediness. $$ \bullet\,$$ Number of operations can be large. $$ \bullet\,$$ Need to know about smoothness of solution.It is senseless to use high order method when the solution has unbounded high order derivatives. $$ \bullet\,$$ For oscillatory functions, a high order Taylor seems a good choice, but can lead to problems of loss of significance in the computation if not programmed carefully.

2) $$ Compos.  Trap.\,$$

$$ \bullet\,$$ Approximate derivative by constant. $$ \bullet\,$$ Average (not discriminate) endpoints. $$ \bullet\,$$ Often converges very quickly for periodic functions, and tends to become extremely accurate when periodic functions are integrated over their periods. $$ \bullet\,$$ For various classes of functions that are not twice-differentiable, the trapezoidal rule has sharper bounds than Simpson's rule.

3) $$ Compos.  Simpson\,$$

$$ \bullet\,$$ In general has faster convergence than the trapezoidal rule However for various classes of rougher functions (ones with weaker smoothness conditions), the trapezoidal rule has faster convergence in general than Simpson's rule. $$ \bullet\,$$ Provides exact results for any polynomial of degree three or less.

4)$$ Romberg  Table\,$$

$$ \bullet\,$$ By using Richardson extrapolation repeatedly on the trap. rule is more efficient. $$ \bullet\,$$ Converge to high accuracy.

5) $$ CT_{K}(n)\,$$

$$ \bullet\,$$ More accurate than composite trap.rule and Romberg table. $$ \bullet\,$$ Converge more quickly than trap.rule.

Egm6341.s10.team1.lei16:33, 3 March 2010 (UTC)