MATH971: Applied Nonlinear Differential Equations

Maple code for First Liapunov Coefficient )


This page contains a maple code for Chapter 6 (Second-order differential equations: Periodic behaviour).

# hopf-liapunov    Calculates the first liapunov number for a planar
# 24.04.08         system of differential equations.
#
# define the first liapunov number
l1 := (-3*Pi)/(2*b*detJ^1.5)*( (a*c*(a11^2+a11*b02 +a02*b11) \
     +a*b*(b11^2+a20*b11+a11*b02) +c^2*(a11*a02+2*a02*b02) \
     -2*a*c*(b02^2-a20*a02) -2*a*b*(a20^2-b20*b02) -b^2*(2*a20*b20+b11*b20) \
     +(b*c-2*a^2)*(b11*b02-a11*a20)) -(a^2+b*c)*( 3*(c*b03-b*a30) \
     +2*a*(a21+b12) +(c*a12-b*b21)));

# define the linear coefficients at the Hopf bifurcation point
# and calculate the determinant.
a    := 0:
b    := 1:
c    := -1:
d    := 0:
detJ := a*d -b*c;

# define the functions p and q
p := 0;
q := -x^2*y;

# calculate the required coefficients.
a20 := coeftayl(p,[x,y]=[0,0],[2,0]);
a11 := coeftayl(p,[x,y]=[0,0],[1,1]);
a02 := coeftayl(p,[x,y]=[0,0],[0,2]);
a30 := coeftayl(p,[x,y]=[0,0],[3,0]);
a21 := coeftayl(p,[x,y]=[0,0],[2,1]);
a12 := coeftayl(p,[x,y]=[0,0],[1,2]);
a03 := coeftayl(p,[x,y]=[0,0],[0,3]);
b20 := coeftayl(q,[x,y]=[0,0],[2,0]);
b11 := coeftayl(q,[x,y]=[0,0],[1,1]);
b02 := coeftayl(q,[x,y]=[0,0],[0,2]);
b30 := coeftayl(q,[x,y]=[0,0],[3,0]);
b21 := coeftayl(q,[x,y]=[0,0],[2,1]);
b12 := coeftayl(q,[x,y]=[0,0],[1,2]);
b03 := coeftayl(q,[x,y]=[0,0],[0,3]);

# We are now ready to calculate the liapunov number
l1;


<< Return to my MATH 971 home page.
<< Return to my teaching home page.
<< Return to my start page.


Page Created: 2nd June 2009.
Last Updated: 2nd June 2009.