This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Project 2  Math 306 — DUE APRIL 10
Spring 2018
Prof. Dimoek Consider the following differential equation J 3
.17”+ 3’— ~ :1: + m— z 0
5 6
1. Write the equation as a. ﬁrst order system :3’ = f (:B,y),y’ = g(.1:,y).
Find all the equilibrium points. (An equilibrium point hey) is a point
such that the vector ﬁeld vanishes: f(x,y)=0, g(x,y)=0). 2. Using Maple plot the direction ﬁeld. 3. Using Maple and Euler’s method plot solution curves (560?), y(t)) with
various choices of initial conditions. (Plot enough curves and use a
small enough step size to get a good idea of the phase portrait. You
need not display tables of the data points) 4. Plot the graphs of 1305) and y(t) for at least one choice of initial condi—
tions. Notes: 1. On the next page we include some samples which you can use as a
guide. The sample is for the van der Pol equation which we did in
class. The step size in the samples is not very small, you will want to
take something smaller. The samples are presented ﬁrst in 2d input
and then in 1—d input (Maple input).You can work in either. 2. Hint: to start a. new line without executing the commands, press shift
key with return. 3. Recitation sections will meet in the computer lab Baldy 8B the week
of April 26. restart : with (DEtools) : I plot] == dﬁeldplafHST x(r) =y(t), % y(f) = —x(r) + (I —x(f)2) y(f)], [Jay], 1': 0..1,x= —1.6..1.6,y= 1.6..1.6) :
with (plots) :display(plorl ) (((‘//////
(((////// (//////// ~*\V\\\\C\\\\V\
\x\\\“’\\\\\ tend h
J'ca’ata0 == x :ydcu’aD == y : forkfrom 0 to n — 1 do ﬂc==y; gk== —x+ (1 —x2)y;
t==f+h;
x==x+hfk;
ymy+hﬂ; tdatak + 1 == 1' xdatak + 1 == x; ydatak + l == y end do : forifrom 0 to 11 do restart : 11 == 0.25 :tend == 2.0 : n := [ l: r == 0. :2: == 1.0 :y := 1.0 : tdatao := t: print“ "%d %8.2f %12.5f %12.5f\n", 1', tdatai, xdataf, ydataf) end do : 0 0.00 1.00000 1.00000
1 0.25 1.25000 0.75000
2 0.50 1.43750 0.33203
3 0.75 1.52051 —0.11586
4 1.00 1.49154 —0.45799
5 1.25 1.37704 —0.69065
6 1.50 1.20438 —0.88016
7 1.75 0.98434 —1.08212
8 2.00 0.71381 —l.33661
wdamlisf == [seq( [xdafap ydafaf], 1': 0 .17) 1 : plothydatalist, color = 'blue') 1 0.5 0.5 txdamlist := [seq( [tdatap xdafai], i= 0 ..n)] : plotdeatalisf, color = 'green') 1.5 1.4 1.3 1.2 1.1 1.0 0.9 0.8 0.5 1.5 > restart.
with(DEtools): Ia plot1:= dfieldplot( [diff(x(t), t)=y(t), diff(y(t), 6t)=x(t) + (1x (t)‘2)*y(t)], [x y], t=0. .1, x=—1. 6. .1. 6 ,y=1. 6. .1. h)
with(p10ts):
display(plot1);
\ﬂ2//////////2a\\\\\
\12/////}///2»\\\\\
NA///////////2u\\\\\
»////////{///»~\\\\\
»//////;/////A\\\\\\
/////////////H\\\\\\
/////////g//»\\\\\\\
////////P7//ﬁ\\\\\\\
IIIl/l/////A\\\\\\\\  m
1  0. i .5 1 .5
«\«\\\\\~ //§//Jll l
x\\\\\\~ﬁ{//////////
\'\'\\\\\r*/‘///////////
\'\\\\‘\*—(///////////
\\\\\\e/4{/////////r
\\\\‘\“=’///////////z~r—
\\\\\««//////////zex
\\\\\hng{///////x~\
\\\\\LL/ 7///////(h\
> restart.
h:= 0.25
tend:= 2.0:
n: a ceil(tend/h):
t:= 0.0:
x: = 1.0:
y: = 1.0:
tdata[0]. =
xdata[0]. =
¥ggta[g;om§ 0 to n1 do
fk : y. gk := — x+ (1x‘2)*y. t := t+h: x := x + h*£k:
y := y + h*gk:
tdata[k+1]:= t:
xdata[k+1]:= x:
ydata[k+1]:= y: ed: for i from 0 to n do no printf( 6
od:
0.00
0.25
0.50
0.75
1.00
1.25
1.50
1.75
2.00 xydatalist := V mummprI—Io %3.2£ %12.5£ %12.5f\n",i,tdata[i],xdata[i],ydata[i]) 1.00000 1.00000
1.25000 0.75000
1.43750 0.33203
1.52051 —0.11586
1.49154 —0.45799
1.37704 —0.69065
1.20438 —0.88016
0.98434 —1.08212
0.71381 —l.33661 [seq ( Exdata[i], ydata{i1], i=0..n )]: plot( xydatalist, color='b1ue' ); 1 (LS (LS > txdatalist := [seq ( [tdata[i], xdata[i]], i=0..n )]:
plot( txdatalist, color='green ); 1.5 1.4 1.3 1.2 1.1 1.0 0.9 0.8 0.5 1.5 ...
View
Full Document
 Fall '09
 Math, Equilibrium point, step size, Stability theory, following differential equation, a. ﬁrst order, lab Baldy 8B

Click to edit the document details