newproject2posted.pdf

# newproject2posted.pdf - Project 2 Math 306 — DUE APRIL 10...

This preview shows pages 1–7. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the 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 2-d 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 2-6. restart : with (DEtools) : I plot] == dﬁeldplafH-ST 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' xdat-ak + 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) + (1-x (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 n-1 do fk :- y. gk := — x+ (1-x‘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

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern