MATH971: Applied Nonlinear Differential Equations

Maple code for Liapunov Functions (1)


This page contains a maple code for Chapter 3 (Second-order differential equations: Steady-state solutions and their stability).

#liapunov.txt
#26.05.09

# Define the candidate Lyapunov function

V := a*x^2 +2*b*x*y +c*y^2;

# To use theorem 3.1 we need the point (0,0) to be a local minimum
# of the function V(x,y). Find out if this is satisfied, or if it
# imposes some constraints on the parameters in the function

Vx := diff(V,x):
Vy := diff(V,y):

VA := subs({x=0,y=0},diff(Vx,x));
VB := subs({x=0,y=0},diff(Vx,y));
VC := subs({x=0,y=0},diff(Vy,y));

# Print the requirements for (0,0) to be a local minimum
print("For a local minimum we require");
print("inequality one",VA>0);
print("inequality two:",VA*VC-VB^2>0);

#Define the differential equations

#xdot :=  -x -2*y+x*y^2;
#ydot := 3*x -3*y  +y^3;

xdot := -4*y +x^2;
ydot :=  4*x +y^2;

# Determine Vdot

Vdot := Vx*xdot +Vy*ydot;

# If we need to use the following piece of code then we are not going
# to be able to prove global stability, only asymptotic stability or
# unstability.

# To use theorem 3.1 we need the point (0,0) to be either a local minimum
# or a local maximum of the function Vdot(x,y). Find out if this is satisfied, or if it
# imposes some constraints on the parameters in the function

Vdotx := diff(Vdot,x):
Vdoty := diff(Vdot,y):

VdotA := subs({x=0,y=0},diff(Vdotx,x));
VdotB := subs({x=0,y=0},diff(Vdotx,y));
VdotC := subs({x=0,y=0},diff(Vdoty,y));
disc  := VdotA*VdotC-VdotB^2;

print("Investigating Vdot(0,0), We always require");
print("inequality three:",disc>0);


# Print the requirements for (0,0) to be a local minimum
# This means that Vdot > 0 and (0,0) is unstable.
print("For a local minimum we require");
print("inequality four-a",VdotA>0);

# Print the requirements for (0,0) to be a local maximum
# This means that Vdot<0 and (0,0) is asymptotically stable
print("For a local maximum we require");
print("inequality four-b",VdotA<0);


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


Page Created: 27th May 2009.
Last Updated: 27th May 2009.