User:Egm6341.s2010.Team1.lei/HW7

For HW7,I am responsible for problem 3,16 and 17.

=Problem 3-Hermite-Simpson Algorithm to integrate Verhulst equation =

Find
Use Hermite-Simpson rule to integrate the above given Verhulst equation

Given
Refer Lecture slide (1) [[media:Egm6341.s10.mtg38.djvu|p.38-3]]

$$ f(x)=rx (1-\frac {x}{x_{max}}) $$

$$ x_{max}=10\,$$

$$ r=1.2 \,$$

2cases:

$$ x_{0}=2 <\frac {1}{2}x_{max} $$

$$ x_{0}=7 >\frac {1}{2}x_{max} $$

Such that $$ AbsTol= O(10^{-6})\, $$ for $$ t \isin [0,10]$$

Solution
For the first case:

$$ x_{0}=2 \, $$

Matlab Code:

---

For the second case:

$$ x_{0}=7 \, $$

Matlab Code:



=Problem 16-Find the Cosine Series coeffient ak =

Find
Find

$$ a_{k}=\frac {2}{\pi}\int_{0}^{\pi}f(\cos \theta) \cos (k \theta)d \theta $$

Given
We know Fourier Cosine Series:

$$ f(\cos\theta)=\frac{a_{0}}{2}+\sum _{k=1}^{\infin} a_{k}\cos (k\theta) $$

Solution
$$ a_{0}=\frac{1}{\pi}\int _{-\pi}^{\pi} f(\cos\theta)d\theta $$

$$ =\frac{2}{\pi}\int _{0}^{\pi} f(\cos\theta)d\theta $$

$$ a_{n}=\frac{1}{\pi}\int _{-\pi}^{\pi} f(\cos\theta)\cos(k\theta) d\theta $$

$$ =\frac{2}{\pi}\int _{0}^{\pi} f(\cos\theta) cos(k\theta)d\theta $$

=Problem 17-Find int if cosine series is know =

Find
[[media:Egm6341.s10.mtg42.djvu|p.42-3]]

$$ I=a_{0}+\sum_{j=1}^{\infin} \frac{2a_{2j}}{1-(2j)^2} $$

Given
[[media:Egm6341.s10.mtg42.djvu|p.42-2]]

$$ I= \int_{-1}^{+1}f(x)dx= \int_{0}^{\pi} f(\cos\theta) \sin\theta d\theta\, $$

[[media:Egm6341.s10.mtg42.djvu|p.42-3]]

$$ f(\cos\theta)=\frac{a_{0}}{2}+\sum _{k=1}^{\infin} a_{k}\cos (k\theta) $$

Solution
$$ I=\int_{0}^{\pi}(\frac{a_{0}}{2}+\sum _{j=1}^{\infin}a_{2j}\cos(2j\theta))\sin\theta d\theta$$

$$ =\int_{0}^{\pi}\frac {a_{0}}{2}\sin\theta d\theta +\int_{0}^{\pi}\sum _{j=1}^{\infin}a_{2j}\cos(2j\theta)\sin\theta d\theta$$

$$ =-\frac{a_{0}}{2} \cos\theta |_{0}^{\pi}+ \sum _{j=1}^{\infin}\int_{0}^{\pi}a_{2j}\cos(2j\theta)\sin\theta d\theta$$

$$ =a_{0}+\sum _{j=1}^{\infin}a_{2j} \int_{0}^{\pi}\cos(2j\theta)\sin\theta d\theta$$

$$ =a_{0}+\sum _{j=1}^{\infin}a_{2j} \int_{0}^{\pi}-[\sin((2j+1)\theta)-\sin((2j-1)\theta)]d\theta $$

$$ =a_{0}+\sum _{j=1}^{\infin}a_{2j}[\int_{0}^{\pi}-\sin((2j+1)\theta)d\theta +\int_{0}^{\pi}\sin((2j-1)\theta)d\theta] $$

$$ =a_{0}+\sum _{j=1}^{\infin}a_{2j}[\frac{1}{2j+1} \cos(2j+1)\theta|_{0}^{\pi}-\frac{1}{2j-1} \cos(2j-1)\theta|_{0}^{\pi}]$$

$$ =a_{0}+\sum _{j=1}^{\infin}a_{2j}\frac{2}{1-(2j)^{2}} $$


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


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

\Rightarrow I=a_{0}+\sum _{j=1}^{\infin}\frac{2a_{2j}}{1-(2j)^{2}} $$ $$
 * $$\displaystyle
 * }
 * }

Egm6341.s10.team1.lei03:57, 23 April 2010 (UTC)