Solving Linear ODEs using Real and Complex Eigenbasis Theorem

Haiyan Tian, University of Southern Mississippi, Mathematics and Natural Sciences

Author Profile

Summary

The activity is for students to solve three homogeneous linear systems of ordinary differential equations (ODEs) using the Real and Complex Eigenbasis Theorem. As a result of the activity, students will be able to quickly recognize a homogeneous linear system through the form x' = A(t) x. For the systems with constant coefficients, students will use the eigenvalues and eigenvectors of A to represent the integral curves and visualize solution behaviors corresponding to different cases of eigenvalues.

Share your modifications and improvements to this activity through the Community Contribution Tool »

Learning Goals

This activity makes students exercise critical thinking and synthesis of ideas. It helps students learn theory as well as numerical implementation through MATLAB computations. From the activity,

(1) Students should learn concepts of linear vs. nonlinear, homogeneous vs. non-homogeneous systems. The matrix form x' = A(t) x + b(t) defines a linear problem. It becomes a homogeneous linear system when b(t) is a zero vector.

(2) Students should make sense of the important Real and Complex Eigenbasis Theorem. They should recognize when the theorem is applicable, and if applicable, how to use it to represent integral curves.

(3) Students discover the connection between differential equations and linear algebra. The eigenvalues and eigenvectors of a real-valued matrix A in x'=Ax make the representation of the integral curves possible.

(4) Students develop insight on solution techniques by solving systems with constant coefficients and visualizing their integral curves.

(5) Students develop their problem-solving skills using MATLAB for the purpose of computation and visualization.

Context for Use

This activity is appropriate for senior undergraduate or first-year graduate students enrolled in Ordinary Differential Equations (ODEs) class. It is a lab activity for a class of 10–20 students. The time needed is approximately 75 minutes. During this activity, students need to have access to the Real and Complex Eigenbasis Theorem for ODEs and the MATLAB program. It is an activity to be done at the beginning stage of introducing the theorem.

The students are in STEM areas, and they have already taken their first course in Ordinary Differential Equations and Linear Algebra. Prior to the activity, students should have already mastered the concepts and skills related to:

(i) the normal form of a system of first-order differential equations;

(ii) the matrix equation form of a linear system of differential equations;

(iii) eigenvalues and eigenvectors of a matrix.

This activity helps students make sense of the notations and meaning in the Real and Complex Eigenbasis Theorem and be able to apply it to large systems with a real-valued coefficient matrix. It can easily be adapted for use in other settings (online/in-person and group/individual explorations).

Description and Teaching Materials

Preparation Step

Notes for instructors:The first step is for students to recognize characteristics of a linear system of equations.

Warm-up exercise for students:

  • Decide if each given system of two ordinary differential equations is linear or nonlinear. For the system you think is linear, decide if it is homogeneous or non-homogeneous.

    (a)

    x' = 2t x + y - 5

    y' = x - t y + sint

    (b)

    x' = 2t x + y 

    y' = x - t y

Notes for instructors: Based on the different responses from students, the instructor can quickly review the matrix form x' = A(t) x + b(t) for a linear system and encourage students to double check their answers. A homogeneous linear system has the matrix form  x' = A(t) x.

 Specification of the Activity

Notes for instructors: Each system is given as two differential equations of first order with real-valued constant coefficients. Students are first asked to rewrite the system in the form x' = A x, with A being a 2 by 2 matrix. Next, they should compute the eigenvalues and eigenvectors of A using MATLAB, and then make use of the results to provide the mathematical representation of a general integral curve of the system. To plot a particular integral curve, students should recognize the necessity of providing an initial condition for a system. They should explore trajectories with varying initial conditions, and they will learn how the behaviors of solutions are related to eigenvalues and eigenvectors of the matrix A. The different patterns of trajectories are to be predicted by the Real and Complex Eigenbasis Theorem (theory) and visualized (practice) by MATLAB program for different cases of eigenvalues.

Students are given three ODE problems, and they are asked to rewrite each system in the form of V' = AV, where A is a matrix and V is a vector. This way, students recognize the matrix A for each given system. The students should have access to the Real and Complex Eigenbasis Theorem and MATLAB program.

Real and Complex Eigenbasis Theorem

Suppose A is an n by n real matrix with real eigenvalues rj, j = 1, 2, ..., q and complex eigenvalues aj + bji, j = 1, 2, ..., p. Suppose further that n = q + 2p. Assume that there are corresponding real eigenvectors vj, j = 1, 2, ..., q and complex eigenvectors uj + iwj, j = 1, 2, ..., p, that are linearly independent over R and C, respectively. Then {v1, ..., vq, u1, w1, ..., up, wp } is a basis for Rn and for any c in Rn , the integral curve of the system V' = AV that passes through c at time t=0 is given by

m1er1tv1 + ... + mqerqtvq + ea1t [cos(b1t)(k1u1+h1w1) + sin(b1t)(h1u1-k1w1)] + ... + eapt [cos(bpt)(kpup+hpwp) + sin(bpt)(hpup-kpwp)],

where the real numbers mj, kj, hj are the components of c with respect to the basis, i.e.,

c = m1v1 + ... + mqvq + (k1u1+h1w1) + ... + (kpup+hpwp).

 

Real and Complex Eigenbasis Theorem When A is a 2 by 2 Real Matrix

Case I. Suppose A is a 2 by 2 real matrix with real eigenvalues r1 and r2. Assume that there are corresponding real eigenvectors v1 and v2 that are linearly independent over R. Then {v1, v2 } is a basis for R2 and for any c in R2 , the integral curve of the system V' = AV that passes through c at time t=0 is given by

V(t)= m1er1tv1 + m2er2tv2

where the real numbers m1 and m2 are the components of c with respect to the basis, i.e.,

c = m1v1 + m2v2.

Case II. Suppose A is a 2 by 2 real matrix with complex eigenvalues a1 + b1i and a1 - b1i. Assume that there are corresponding complex eigenvectors u1 + iw1 and u1 - iw1 that are linearly independent over C. Then {u1, w1 } is a basis for R2 and for any c in R2 , the integral curve of the system V' = AV that passes through c at time t=0 is given by

ea1t [cos(b1t)(k1u1+h1w1) + sin(b1t)(h1u1-k1w1)]

where the real numbers k1 and h1 are the components of c with respect to the basis, i.e.,

c = k1u1+h1w1.

 

Activ]ity for students:

  1. A substance X decays into substance Y at rate 04 and Y in turn decays into another substance at rate 0.2. The following system describes the process, where x(t) and y(t) represent the amount of X and Y at time t, respectively.

         x' = -0.4 x

         y' = 0.4 x - 0.2 y

    (a) Write the system into the matrix equation form V' = AV.

    (b) For the matrix A, find the eigenvalues and their corresponding eigenvectors using MATLAB.

    (c) Solve the system for x(t) and y(t) using the Real and Complex Eigenbasis Theorem, i.e., you should provide the mathematical representation of a general integral curve of the system using the results found for the part (b).(d) Predict the end behavior of a general solution (x(t), y(t)) as t approaches infinity and interpret your answers in the context of the decaying process of the substances X and Y.
  2. For the system

         x' = -2 x - y

         y' = - x + 2 y

    (a) Write the system into the matrix equation form V' = AV. 

    (b) For the matrix A, find the eigenvalues and their corresponding eigenvectors using MATLAB.

    (c) Solve the system for x(t) and y(t) using the Real and Complex Eigenbasis Theorem, i.e., you should provide the mathematical representation of a general integral curve of the system. 

    (d) Use MATLAB to plot a few trajectories for differential initial conditions, and show the positions of eigenvectors of A if they do not have complex entries.
  3. For the system

         x' = 3 x - 2 y

         y' = 2 x + 3 y

    (a) Write the system into the matrix equation form V' = AV. 

    (b) For the matrix A, find the eigenvalues and their corresponding eigenvectors.

    (c) Solve the system for x(t) and y(t) using the Real and Complex Eigenbasis Theorem, i.e., you should provide the mathematical representation of a general integral curve of the system. 

    (d) Use MATLAB to plot a few trajectories for differential initial conditions, and show the positions of eigenvectors of A if they do not have complex entries.

Teaching Notes and Tips

The students do not have to finish all three problems during the class period. With assistance from the instructor, they start to tackle and develop the approach technique, and they are very likely to solve more than one problem during the lab hours. Before submission, they are allowed to finish the remaining problems at home. The integral curves with different behaviors governed by eigenvalues and eigenvectors are to be discovered.

Each problem has 4 questions.

Part (a) is for students to represent a problem using the matrix form V' = AV;

Part (b) is to find eigenvalues and eigenvectors of the matrix A.

The relevant MATLAB commands:

A=[a11, a12; a21, a22] % returns a square matrix A.

eigenvaluesA=eig(A) % returns a column vector eigenvaluesA containing the eigenvalues of square matrix A.

[Va Da]=eig(A);   %  returns diagonal matrix Da of eigenvalues and matrix Va whose columns are the corresponding right eigenvectors, so that A * Va = Va * Da.

Part (c) is for students to express a general solution of the system using the Real and Complex Eigenbasis Theorem. Then, students should be able to predict a general solution's behaviors based on the representation formula.

Part (d) is to sketch a few trajectories using ode45 solver in MATLAB. Now, students are trying to plot particular solution curves. Hence, they should recognize that they need to provide an initial condition to obtain a particular solution curve. Students are encouraged to plot a few trajectories using various initial conditions.

[t, y] = ode45 (vector field, tspan, y0), with tspan = [t0 tf], integrates the system of differential equations of the form y' = f(t, y) over the time interval t0 to tf with initial conditions y0. Each row in the solution array y corresponds to a value returned in column vector t.


Assessment

A student receives one of the four rankings for a problem (Excellent, Satisfactory, Needs Improvement, Unsatisfactory) depending on the number of correct answers (4, 3, 2, 1) for the problem. A student receives one of the four rankings for the project (Excellent, Satisfactory, Needs Improvement, Unsatisfactory) depending on the total number n of correct answers (9≤n≤12, 6≤n<9, 3≤n<6, 0≤n<3) for all problems in the project.

References and Resources

  • David Betounes. Differential Equations—Theory and Applications. Springer, 2009.
  • Robert L. Borrelli, Courtney S. Coleman. Differential Equations : A Modeling Perspective. John Wiley & Sons, Inc., 2004.
  • MATLAB Help Center