User:Rjorjorjo/HW7

HW 6 Problem Set  =Reprodace the Chaotic System of Population Dynamics=

Problem Statement
Reproduce Figure 15.6 and 15.7 in "Differential equations : linear, nonlinear, ordinary, partial " on page 455-456

Ref: Lecture Notes [[media:Egm6341.s10.mtg40.djvu|p.40-1]]  

Solution
(1) Figure 15.6 Copy the code directly from the book (2) Figure 15.7 Change initial conditions from random to 0.1 and 0.1+10e-16 at r=4



=Use $$\alpha$$ As A Differential Variable to Calculate the Circumference of Ellipse=

Problem Statement
We already have $$C= \!\,\int dl \!\,= \!\,a\int_{t=0}^{2 \pi}[1-e^2cos^2t]^\frac{1}{2}dt$$ What if we change the differential variable from t to $$\alpha$$ Ref: Lecture Notes [[media:Egm6341.s10.mtg42.djvu|p.42-2]]  

Solution

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

C = \!\,\int_{o}^{\pi/2}dl = 4*\!\,[dx^2+dy^2]^\frac{1}{2} $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }


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

x = \!\,asin(\alpha), y = \!\,bcos(\alpha) $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }


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

dx = \!\,acos(\alpha)d\alpha, dy = \!\,-bsin(\alpha)d\alpha $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }


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

dx^2 = \!\,a^2cos^2(\alpha)(d\alpha)^2, dy^2 = \!\,b^2sin^2(\alpha)(d\alpha)^2 $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }


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

C = \!\, \int_{o}^{\pi/2}dl = \!\,4[a^2cos^2(\alpha)+b^2sin^2(\alpha)]^\frac{1}{2}d\alpha $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }


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

C = \!\, \int_{o}^{\pi/2}dl = \!\,4[a^2cos^2(\alpha)+a^2sin^2(\alpha)-a^2sin^2(\alpha)+b^2sin^2(\alpha)]^\frac{1}{2}d\alpha $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }


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

C = \!\, \int_{o}^{\pi/2}dl = \!\,4[\underbrace{(a^2cos^2(\alpha)+a^2sin^2(\alpha))}_{a^2}-a^2sin^2(\alpha)+b^2sin^2(\alpha)]^\frac{1}{2}d\alpha $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }


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

C = \!\,\int_{o}^{\pi/2}dl = \!\,4*a*[1-\underbrace{(1-(\frac{b}{a})^2)}_{e^2}sin^2(\alpha)]^\frac{1}{2}d\alpha $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }


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

C = \!\,\int_{o}^{\pi/2}dl = \!\,4a[1-e^2sin^2(\alpha)]^\frac{1}{2}d\alpha $$ - $$C = \!\,\int_{o}^{\pi/2}dl = \!\,4a[1-e^2sin^2(\alpha)]^\frac{1}{2}d\alpha$$
 * $$ \displaystyle
 * $$ \displaystyle
 * }

=Solve Logistic Equation by Using Inconsistent Trap-Simpson Algorithm=

Problem Statement
Compare with Hermite-Simpson results using same value of h Ref: Lecture Notes [[media:Egm6341.s10.mtg41.djvu|p.41-3]] [[media:Egm6341.s10.mtg39.djvu|p.39-1]] 

Solution
Inconsistent Trap-Simpson Algorithm Matlab code change from $$ x_{\frac{1}{2}} = \!\,\frac{1}{2}*[x(i)+x(i+1)]+\frac{h}{8}*(f_1-f_2)$$ to $$ x_{\frac{1}{2}} = \!\,\frac{1}{2}*[x(i)+x(i+1)]$$

(1) initial condition is $$x_0 = \!\, 2 $$



- (2) initial condition is $$x_0 = \!\, 7 $$

II Compare with Problem 3-Hermite-Simpson Algorithm to integrate Verhulst equation the result is pretty much the same