2.2.49 Problem 49

Solution using Matrix exponential method
Solution using explicit Eigenvalue and Eigenvector method
Maple
Mathematica
Sympy

Internal problem ID [9172]
Book : Second order enumerated odes
Section : section 2
Problem number : 49
Date solved : Wednesday, March 05, 2025 at 07:37:21 AM
CAS classification : system_of_ODEs

x=3x+yy=x+y

Solution using Matrix exponential method

In this method, we will assume we have found the matrix exponential eAt allready. There are different methods to determine this but will not be shown here. This is a system of linear ODE’s given as

x(t)=Ax(t)

Or

[xy]=[3111][xy]

For the above matrix A, the matrix exponential can be found to be

eAt=[e2t(1+t)te2tte2te2t(1t)]

Therefore the homogeneous solution is

xh(t)=eAtc=[e2t(1+t)te2tte2te2t(1t)][c1c2]=[e2t(1+t)c1+te2tc2te2tc1+e2t(1t)c2]=[e2t(tc1+c2t+c1)((1+t)c2+tc1)e2t]

Since no forcing function is given, then the final solution is xh(t) above.

Solution using explicit Eigenvalue and Eigenvector method

This is a system of linear ODE’s given as

x(t)=Ax(t)

Or

[xy]=[3111][xy]

The first step is find the homogeneous solution. We start by finding the eigenvalues of A. This is done by solving the following equation for the eigenvalues λ

det(AλI)=0

Expanding gives

det([3111]λ[1001])=0

Therefore

det([3λ111λ])=0

Which gives the characteristic equation

λ24λ+4=0

The roots of the above are the eigenvalues.

λ1=2

This table summarises the above result

eigenvalue algebraic multiplicity type of eigenvalue
2 1 real eigenvalue

Now the eigenvector for each eigenvalue are found.

Considering the eigenvalue λ1=2

We need to solve Av=λv or (AλI)v=0 which becomes

([3111](2)[1001])[v1v2]=[00][1111][v1v2]=[00]

Now forward elimination is applied to solve for the eigenvector v. The augmented matrix is

[110110]
R2=R2+R1[110000]

Therefore the system in Echelon form is

[1100][v1v2]=[00]

The free variables are {v2} and the leading variables are {v1}. Let v2=t. Now we start back substitution. Solving the above equation for the leading variables in terms of free variables gives equation {v1=t}

Hence the solution is

[v1t]=[tt]

Since there is one free Variable, we have found one eigenvector associated with this eigenvalue. The above can be written as

[v1t]=t[11]

Let t=1 the eigenvector becomes

[v1t]=[11]

The following table gives a summary of this result. It shows for each eigenvalue the algebraic multiplicity m, and its geometric multiplicity k and the eigenvectors associated with the eigenvalue. If m>k then the eigenvalue is defective which means the number of normal linearly independent eigenvectors associated with this eigenvalue (called the geometric multiplicity k) does not equal the algebraic multiplicity m, and we need to determine an additional mk generalized eigenvectors for this eigenvalue.

multiplicity
eigenvalue algebraic m geometric k defective? eigenvectors
2 2 1 Yes [11]

Now that we found the eigenvalues and associated eigenvectors, we will go over each eigenvalue and generate the solution basis. The only problem we need to take care of is if the eigenvalue is defective. eigenvalue 2 is real and repated eigenvalue of multiplicity 2.There are two possible cases that can happen. This is illustrated in this diagram

This eigenvalue has algebraic multiplicity of 2, and geometric multiplicity 1, therefore this is defective eigenvalue. The defect is 1. This falls into case 2 shown above. We need to generate the missing additonal generalized eigevector v2 by solving

(AλI)v2=v1

Where v1 is the normal (rank 1) eigenvector found above. Hence we need to solve

([3111](2)[1001])[v1v2]=[11][1111][v1v2]=[11]

Solving for v2 gives

v2=[21]

We have found two generalized eigenvectors for eigenvalue 2. Therefore the two basis solution associated with this eigenvalue are

x1(t)=v1eλt=[11]e2t=[e2te2t]

And

x2(t)=(v1t+v2)eλt=([11]t+[21])e2t=[e2t(t+2)e2t(1+t)]

Therefore the final solution is

xh(t)=c1x1(t)+c2x2(t)

Which is written as

[xy]=c1[e2te2t]+c2[e2t(t2)e2t(1+t)]

Which becomes

[xy]=[((t+2)c2+c1)e2te2t(c2t+c1+c2)]
Figure 2.166: Phase plot
Maple. Time used: 0.023 (sec). Leaf size: 31
ode:=[diff(x(t),t) = 3*x(t)+y(t), diff(y(t),t) = y(t)-x(t)]; 
dsolve(ode);
 
x(t)=e2t(c2t+c1)y(t)=e2t(c2t+c1c2)

Maple step by step

Let’s solve[ddtx(t)=3x(t)+y(t),ddty(t)=x(t)+y(t)]Define vectorx(t)=[x(t)y(t)]Convert system into a vector equationddtx(t)=[3111]x(t)+[00]System to solveddtx(t)=[3111]x(t)Define the coefficient matrixA=[3111]Rewrite the system asddtx(t)=Ax(t)To solve the system, find the eigenvalues and eigenvectors ofAEigenpairs ofA[[2,[11]],[2,[00]]]Consider eigenpair, with eigenvalue of algebraic multiplicity 2[2,[11]]First solution from eigenvalue2x1(t)=e2t[11]Form of the 2nd homogeneous solution wherepis to be solved for,λ=2is the eigenvalue, andvis the eigenvectorx2(t)=eλt(tv+p)Note that thetmultiplyingvmakes this solution linearly independent to the 1st solution obtained fromλ=2Substitutex2(t)into the homogeneous systemλeλt(tv+p)+eλtv=(eλtA)(tv+p)Use the fact thatvis an eigenvector ofAλeλt(tv+p)+eλtv=eλt(λtv+Ap)Simplify equationλp+v=ApMake use of the identity matrixI(λI)p+v=ApConditionpmust meet forx2(t)to be a solution to the homogeneous system(AλI)p=vChoosepto use in the second solution to the homogeneous system from eigenvalue2([3111]2[1001])p=[11]Choice ofpp=[10]Second solution from eigenvalue2x2(t)=e2t(t[11]+[10])General solution to the system of ODEsx=C1x1(t)+C2x2(t)Substitute solutions into the general solutionx=C1e2t[11]+C2e2t(t[11]+[10])Substitute in vector of dependent variables[x(t)y(t)]=[e2t(C2tC1C2)e2t(C2t+C1)]Solution to the system of ODEs{x(t)=e2t(C2tC1C2),y(t)=e2t(C2t+C1)}
Mathematica. Time used: 0.002 (sec). Leaf size: 42
ode={D[x[t],t]==3*x[t]+y[t],D[y[t],t]==-x[t]+y[t]}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
x(t)e2t(c1(t+1)+c2t)y(t)e2t(c2(c1+c2)t)
Sympy. Time used: 0.100 (sec). Leaf size: 37
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-3*x(t) - y(t) + Derivative(x(t), t),0),Eq(x(t) - y(t) + Derivative(y(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
[x(t)=C2te2t+(C1+C2)e2t, y(t)=C1e2tC2te2t]