Qualitative Analysis
Below we perform some qualitative analysis for a differential equation. We find equilibria and determine the eigenvalues (hence behavior) at the equilibria. Consider a modified Lotka-Volterra model, including intraspecies competition.
>
MLVx := diff(x(t),t) = 0.2*x(t)*(1 - 0.1*x(t) - 0.2*y(t));
MLVy := diff(y(t),t) = 0.3*y(t)*(0.3*x(t)-1);
We begin by viewing the graph of the model.
>
DEplot([MLVx, MLVy], [x(t),y(t)], t=0..50, [[x(0)=1,y(0)=5],[x(0)=1,y(0)=.7]], stepsize=.2,
title=`Lotka-Volterra model`, color = [.3*y(t)*(x(t)-1),x(t)*(1-y(t)),.1],
linecolor=t/2, arrows=MEDIUM, method=rkf45);
We find the equilibria for this model by setting the right hand side of the differential equations equal to zero.
> equil := solve({rhs(MLVx)=0, rhs(MLVy)=0}, {x(t), y(t)});
Linear analysis of a differential equation near an equilibrium is best done by finding the eigenvalues for the linearized system near the equilibrium.
> with(linalg):
Warning, the name adjoint has been redefined
Warning, the protected names norm and trace have been redefined and unprotected
Create a vector for the right hand side of the differential equation.
>
A := vector([0.2*X*(1 - 0.1*X - 0.2*Y),
0.3*Y*(0.3*X-1)]);
Find the Jacobian matrix for this vector function.
> J := jacobian(A, [X,Y]);
Analyze the eigenvalues of the Jacobian matrix near the origin (one equilibrium).
> X := 0: Y := 0: J0 := J(0,0);
> eigenvects(J0);
This give a saddle node since the eigenvalues are real and opposite in sign.
> X := rhs(equil[3][1]); Y := rhs(equil[3][2]);
> J1 := J(X,Y);
> eigenvects(J1);
This give a stable node since the eigenvalues are complex with a negative real part.
The phase portrait above shows these properties very clearly.