Direction Field and Linear Analysis for Competition Model

We begin by creating the direction field and the nullclines for the webpage. We begin by entering the differential equations and creating the direction field.

> dex := diff(x(t),t) = 0.2586*x(t) - 0.0203*x(t)^2 - 0.05711*x(t)*y(t);

dex := diff(x(t),t) = .2586*x(t)-.203e-1*x(t)^2-.57...

> dey := diff(y(t),t) = 0.05744*y(t) - 0.009768*y(t)^2 - 0.004803*x(t)*y(t);

dey := diff(y(t),t) = .5744e-1*y(t)-.9768e-2*y(t)^2...

> with(DEtools):
with(plots):

Warning, the name changecoords has been redefined

> P1 := dfieldplot([dex,dey],[x(t),y(t)], t=0..20, x=0..14, y=0..8, arrows=MEDIUM, title=`Competition Model`,
color=GREEN):

Create the nullclines. Then show all graphs together.

> eq1 := 0.2586 - 0.0203*X - 0.05711*Y;
eq2 := 0.05744 - 0.009768*Y - 0.004803*X;

eq1 := .2586-.203e-1*X-.5711e-1*Y

eq2 := .5744e-1-.9768e-2*Y-.4803e-2*X

> Y1 := solve(eq1=0,Y); Y2 := solve(eq2=0,Y);

Y1 := 4.528103660-.3554543863*X

Y2 := 5.880425880-.4917076167*X

> P2 := plot({Y1,1E12*(X-0.05)}, X = 0..14, Y = 0..8, color = BLUE):

> P3 := plot({0.01,Y2}, X = 0..14, Y = 0..8, color = RED):

> display({P1,P2,P3});

[Maple Plot]

Next we find the equilibria. We simply note that (0, 0) is one of them. The others are found as follows:

> xelog := solve(subs(Y=0,eq1=0),X);

xelog := 12.73891626

This gives the S. cerevisiae carrying capacity.

> yelog := solve(subs(X=0,eq2=0),Y);

yelog := 5.880425880

This gives the S. kephir carrying capacity.

> te := solve({eq1=0,eq2=0},{X,Y});

te := {Y = 1.000195635, X = 9.925065384}

> coexx := rhs(te[2]); coexy := rhs(te[1]);

coexx := 9.925065384

coexy := 1.000195635

Above is the coexistence equilibrium.

Next we define the right hand sides of the differential equations.

> f1 := (X,Y) -> 0.2586*X - 0.0203*X^2 - 0.05711*X*Y;

f1 := proc (X, Y) options operator, arrow; .2586*X-...

> f2 := (X,Y) -> 0.05744*Y - 0.009768*Y^2 - 0.004803*X*Y;

f2 := proc (X, Y) options operator, arrow; .5744e-1...

As an example, we perform a Taylor series expansion about each of these functions around the carrying capacity equilibrium for S.cerevisiae . This shows the local linearization.

> taylor(f1(X,0),X=xelog);

series(-.1e-8-.2586000002*(X-12.73891626)-.203e-1*(...

> taylor(f1(xelog,Y),Y=0);

series(-.1e-8-.7275195076*Y,Y)

> taylor(f2(X,0),X=xelog);

series(0.,X=-(-12.73891626))

> taylor(f2(xelog,Y),Y=0);

series(-.374501480e-2*Y-.9768e-2*Y^2,Y)

We want to compare the above computation with the one derived by computing the Jacobian matrix and evaluating at the equilibria. In addition, we find the eigenvalues and eigenvectors at all 4 equilibria.

> with(linalg):

Warning, the name adjoint has been redefined

Warning, the protected names norm and trace have been redefined and unprotected

> A := vector([f1(X,Y),f2(X,Y)]);

A := vector([.2586*X-.203e-1*X^2-.5711e-1*Y*X, .574...

> J := jacobian(A, [X,Y]);

J := matrix([[.2586-.406e-1*X-.5711e-1*Y, -.5711e-1...

> X := 0: Y := 0: J0 := J(0,0);

J0 := matrix([[.2586, -0.], [-0., .5744e-1]])

> eigenvects(J0);

[.2586, 1, {vector([1, 0])}], [.5744e-1, 1, {vector...

This gives an unstable node .

> X := xelog: Y := 0: J1 := J(xelog,0);

J1 := matrix([[-.2586000002, -.7275195076], [-0., -...

> eigenvects(J1);

[-.2586000002, 1, {vector([1, 0])}], [-.374501480e-...

This gives an stable node.

> X := 0: Y := yelog: J2 := J(0,yelog);

J2 := matrix([[-.772311220e-1, -0.], [-.2824368550e...

> eigenvects(J2);

[-.574400000e-1, 1, {vector([0, 1])}], [-.772311220...

This gives another stable node .

> X := coexx: Y := coexy: J3 := J(coexx,coexy);

J3 := matrix([[-.2014788273, -.5668204841], [-.4803...

> eigenvects(J3);

[-.2147621193, 1, {vector([-9.736222748, -.22816587...

This gives a saddle node .