MATH383: A first course in differential equationsApril 16, 2020

Homework 12

Due date: April 23, 2020, 11:55PM.

Bibliography: Lessons 22-23

This final homework is a guided tour to some of the behavior encountered in the study of dynamical system.

Problems

Determine the local linearization, eigenvalue maps, and Poincaré sections of the following systems at two different parameter set values of your choice.

1. Duffing oscillator

2. Lorenz system

1Example: Double pendulum

1.1Problem definition

Consider system

u'=v,v'=-sinu-av+bcos(ωt)

that describes the motion of a forced, damped, planar pendulum

sinu=u-u33!+u55!--

1.2Problem analysis

This is a inhomogeneous, nonlinear system of two differential equations of first order,

𝒚'=𝒇(𝒚),with𝒚=( u v ),𝒇(𝒚)=( v -sinu-av+bcos(ωt) )=( f1 f2 )
𝑨=𝒇𝒚=( f1u f1v f2u f2v )=( 0 1 -cosu -a )
p𝑨(λ)=det(λ𝑰-𝑨)=| λ -1 cosu λ+a |=λ2+aλ+cosu=0λ1,2=-a±a2-4cosu2

Observations.

1.3System trajectory

1.3.1Trajectory plot

(%i3) 

plotdf([v, -sin(u)+0.0*v], [u,v], [trajectory_at,0.7,0.7],[direction,forward],
        [u,-1,1],[v,-1,1],[tstep,0.01],[nsteps,1000])$

(%i4) 


              

1.3.2Numerical compuation of trajectory

(%i81) 

(Nsteps: 31, Ncycles: 100, a: 0.2, b: 1.0, w: 2.0)$

(%i82) 

[dudt: v, dvdt: -sin(u)-a*v+b*cos(w*t), T: 2*3.14159/w ];

(%o82) [v,-0.2v-sin(u)+1.0cos(2.0t),3.14159]

(%i83) 

[dt: T/Nsteps, tmax: Ncycles*T ];

(%o83) [0.1013416129032258,314.159]

(%i84) 

tuvL : rk( [dudt,dvdt], [u,v], [0.8,0.8], [t,0,tmax,dt] )$

(%i85) 

N: length(tuvL)$

(%i86) 


              

(%i69) 


              

(%i86) 

tuL: makelist( [tuvL[i][1], tuvL[i][2]],i,1,N)$

(%i87) 

tvL: makelist( [tuvL[i][1], tuvL[i][3]],i,1,N)$

(%i89) 

plot2d( [ [discrete,tuL], [discrete,tvL]], [x,0,tmax], 
        [legend, "u", "v"], [xlabel, "t"])$

(%i90) 


              

1.3.3Numerical computation of phase space plot

(%i90) 

uvL: makelist( [tuvL[i][2], tuvL[i][3]],i,1,N)$

(%i91) 

plot2d( [ [discrete,uvL] ], [xlabel, "u"], [ylabel, "v"] )$

(%i92) 


              

1.3.4Numerical computation of Poincaré section plot

(%i92) 

Nstart: 50*Nsteps$

(%i93) 

PoincareL: makelist( uvL[Nsteps*i+Nstart], i, 0, floor((N-Nstart)/Nsteps) )$

(%i94) 

plot2d( [discrete,PoincareL], [x,-50,50], [y,-50,50], [style,[points,1,1,1]] )$

(%i95) 


              

(%i31) 


              

2Example: Duffing oscillator

2.1Problem definition

Consider system u''+δu'+αu+βu3=γsin(ωt)

u'=v,v'=-δv-αu-βu3+γsin(ωt)

that describes a nonlinear, forced oscillator.

2.2Problem analysis

This is a inhomogeneous, nonlinear system of two differential equations of first order,

𝒚'=𝒇(𝒚),with𝒚=( u v ),𝒇(𝒚)=( v -δv-αu-βu3+γsin(ωt) )=( f1 f2 )
𝑨=𝒇𝒚=( f1u f1v f2u f2v )=( 0 1 -α-3βu2 -δ )
p𝑨(λ)=det(λ𝑰-𝑨)=| λ -1 α+3βu2 λ+δ |=λ2+δλ+(α+3βu2)=0λ1,2=-δ±δ2-4(α+3βu2)2

Observations.

2.3System trajectory

2.3.1Trajectory plot

(%i95) 

plotdf([v, -0.2*v-0.5*u-0.1*u^3], [u,v], [trajectory_at,0.7,0.7],[direction,forward],
        [u,-1,1],[v,-1,1],[tstep,0.01],[nsteps,1000])$

(%i96) 


              

2.3.2Numerical compuation of trajectory

(%i44) 

(Nsteps: 31, Ncycles: 100, a: 1, b: 0.2, d:0.1 , g:1, w: 1.1)$

(%i45) 

[dudt: v, dvdt: -d*v-a*u-b*u^3+g*sin(w*t) , T: 2*3.14159/w ];

(%o45) [v,-0.1v-0.2u3-u+sin(1.1t),5.711981818181817]

(%i46) 

[dt: T/Nsteps, tmax: Ncycles*T ];

(%o46) [0.1842574780058651,571.1981818181818]

(%i47) 

tuvL : rk( [dudt,dvdt], [u,v], [0.1,0.5], [t,0,tmax,dt] )$

(%i48) 

N: length(tuvL)$

(%i49) 


              

(%i69) 


              

(%i49) 

tuL: makelist( [tuvL[i][1], tuvL[i][2]],i,1,N)$

(%i50) 

tvL: makelist( [tuvL[i][1], tuvL[i][3]],i,1,N)$

(%i51) 

plot2d( [ [discrete,tuL], [discrete,tvL]], [x,0,tmax], 
        [legend, "u", "v"], [xlabel, "t"])$

(%i52) 


              

2.3.3Numerical computation of phase space plot

(%i52) 

uvL: makelist( [tuvL[i][2], tuvL[i][3]],i,1,N)$

(%i53) 

plot2d( [ [discrete,uvL] ], [xlabel, "u"], [ylabel, "v"] )$

(%i54) 


              

2.3.4Numerical computation of Poincaré section plot

(%i54) 

Nstart: 1*Nsteps$

(%i55) 

PoincareL: makelist( uvL[Nsteps*i+Nstart], i, 0, floor((N-Nstart)/Nsteps) )$

(%i58) 

plot2d( [discrete,PoincareL], [style,[points,1,1,1]] )$

(%i59) 


              

(%i31) 


              

Figure 1. Poincaré section for Duffing oscillator

3Example: Lorenz system

3.1Problem definition

Consider system

x'=σ(y-x) y'=x(ρ-z)-y z'=xy-βz

that describes atmospheric convection (e.g., cumulo-nimbus clouds).

3.2Problem analysis

This is a homogeneous, nonlinear system of three differential equations of first order,

𝒖'=𝒇(𝒖),with𝒖=( x y z ),𝒇(𝒖)=( σ(y-x) x(ρ-z)-y xy-βz )=( f1 f2 f3 )
𝑨=𝒇𝒖=( f1x f1y f1z f2x f2y f2z f3x f3y f3z )=( -σ σ 0 ρ-z -1 -x y x -β )

Characteristic polynomial

p𝑨(λ)=det(λ𝑰-𝑨)

is a cubic, with complicated analytical form of the roots. Analyze behavior around equilibria

3.3System trajectory

3.3.1Trajectory plot

(%i60) 

plotdf([s*(y-x),x*(r-z)-y], [x,y], [trajectory_at,0.7,0.7],[direction,forward],
       [x,-1,1],[y,-1,1],[tstep,0.01],[nsteps,1000],
       [parameters,"s=0.2,r=0.3,z=0"],
       [sliders,"s=0.1:0.3,r=0.1:0.5,z=-1:1"]
      )$

(%i62) 


              

3.3.2Numerical computation of trajectory

𝒖'=𝒇(𝒖),with𝒖=( x y z ),𝒇(𝒖)=( σ(y-x) x(ρ-z)-y xy-βz )=( f1 f2 f3 )

(%i75) 

(Nsteps: 31, Ncycles: 100, s: 0.1, r: 0.2, b:0.1)$

(%i76) 

[dxdt: s*(y-x), dydt: x*(r-z)-y, dzdt: x*y-b*z  , T: 3.1415 ];

(%o76) [0.1(y-x),x(0.2-z)-y,xy-0.1z,3.1415]

(%i77) 

[dt: T/Nsteps, tmax: Ncycles*T ];

(%o77) [0.1013387096774194,314.15]

(%i78) 

txyzL : rk( [dxdt,dydt,dzdt], [x,y,z], [0.1,0.5,0.2], [t,0,tmax,dt] )$

(%i79) 

N: length(txyzL);

(%o79) 3102

(%i80) 


              

(%i69) 


              

(%i80) 

txL: makelist( [txyzL[i][1], txyzL[i][2]],i,1,N)$

(%i81) 

tyL: makelist( [txyzL[i][1], txyzL[i][3]],i,1,N)$

(%i82) 

tzL: makelist( [txyzL[i][1], txyzL[i][4]],i,1,N)$

(%i83) 

plot2d( [ [discrete,txL], [discrete,tyL], [discrete,tzL] ], 
        [legend, "x", "y", "z"], [xlabel, "t"])$

(%i84) 


              

3.3.3Numerical computation of phase space plot

(%i52) 

uvL: makelist( [tuvL[i][2], tuvL[i][3]],i,1,N)$

(%i53) 

plot2d( [ [discrete,uvL] ], [xlabel, "u"], [ylabel, "v"] )$

(%i54) 


              

3.3.4Numerical computation of Poincaré section plot

(%i54) 

Nstart: 1*Nsteps$

(%i55) 

PoincareL: makelist( uvL[Nsteps*i+Nstart], i, 0, floor((N-Nstart)/Nsteps) )$

(%i58) 

plot2d( [discrete,PoincareL], [style,[points,1,1,1]] )$

(%i59) 


              

(%i31) 


              

Figure 2. Poincaré section for Duffing oscillator