Differential Equations Day 22 -- The Algebraic Theory of Systems of Differential Equations (Real Eigenvalues)
Overview
In the last lesson we saw how systems of first order differential equations can be used to model the rate of change of two species' populations can interact with the populations of the two species. This is a rich area of applications, but we will pause the applications for a moment.
In this lesson we will focus purely on the mathematical theory of systems of linear first order differential equations with constant coefficients. We'll focus on systems of two equations, but the theory applies to higher numbers of equations as well. In the steps where we deal with matrices, eigenvalues and eigenvectors, simply increase the dimensionality of each object appropriately.
There are gorgeous connections here with the eigenvalues and eigenvectors of a matrix from Linear Algebra. Even if you didn't fully grasp those concepts in Linear Algebra (or if you haven't seen them yet): don't worry! We'll use GeoGebra to skip the tedious by-hand calculations of finding eigenvalues and eigenvectors, and instead will focus on the differential equations.
Definition
A system of first order linear differential equations with constant coefficients is a relationship of two functions, and , and their first derivatives by two first order differential equations of the form
You'll often see a system such as this written more efficiently by dropping the s:
Note that , and are constants, but and are functions. This is sometimes called the standard form of systems of first order linear equations with constant coefficients.
Constructing Algebraic Solutions (in the case of Real Eigenvalues)
- Be sure the system is in standard form. Be sure you can easily identify the constants and
- In row 1 of the GeoGebra CAS enter the matrix representation of the coefficients as
{{a,b},{c,d}}
- In row 2, find the eigenvalues of the matrix in row 1 with
Eigenvalues($1)
. We will refer to the eigenvalues as and *. - In row 3, find the eigenvectors of the matrix in row 1 with
Eigenvectors($1)
. The result will be a matrix, the columns of which are the the eigenvectors. We will refer to the eigenvectors as and **. - Use the template below to construct the general solutions of the system making use of the eigenvalues and the eigenvectors.
- If present, use initial conditions on and to find the coefficients
c_1
andc_2
that yield the specific solution. This will involve solving a system of linear algebraic equations inc_1
andc_2
. - Check your work by verifying that your results both solve the system of equations and the match the initial conditions (if present). I strongly recommend using the GeoGebra Algebra Pane.
Example of Constructing Algebraic Solutions (a case of Real Eigenvalues)
Let's use this method to solve this system of equations
with initial conditions and .
1.
The coefficients of the system are , and
2. and 3. and 4.
We've done steps 2, 3, and 4 in the GeoGebra CAS window below. Note that the eigenvalues, 3 and 2, are both real numbers in row 1 of the GeoGebra CAS. Had these been complex numbers, a different template is needed (covered in a later lesson).
5.
From the GeoGebra CAS, we can see that the eigenvalues are , , and the eigenvectors are , and .
Using these pieces of information, we can assemble the solutions with the template. Be careful; it's easy to get crossed up:
6.
The initial conditions we were provided at the outset are and . Plugging 0 in for t in the general solution, and setting the result equal to these initial conditions yields
In particular we must solve this system for
c_1
and c_2
:
This can be done by hand by either substitution, or applying a method from linear algebra. We'll use GeoGebra's CAS however. See below.7.
Let us check to be sure these functions we've produced solve the system of differential equations and the initial conditions.
We had to call the functions
f_x
and f_y
in GeoGebra because x
and y
are not allowable names for functions in GeoGebra.
Note that--as always--the code for the checks comes from the original system of equations. The code is:
simplify(f_x'-12*f_x+6*f_y)
and
simplify(f_y'-15*f_x+7*f_y)
Scroll to the bottom of the Algebra Pane to verify that these both return 0. Also, the initial conditions are checked with f_x(0)
and f_y(0)
both producing the intended values of 13 and 21, respectively.A Word About Eigenvalues and Eigenvectors (i.e. Linear Algebra Crash Course)
You may be wondering: what the heck are these things--eigenvectors and eigenvalues--that feature so prominently in the process?
In a word, they're special values where multiplication of a matrix and a vector end up being simply scalar multiplication. If you're not familiar with matrix multiplication, you can review that here. If you understand matrix multiplication, then here's the definition:
Definition: A vector is called an eigenvector of a matrix if times is a scalar multiple of ; in other words, if . Note that is a scalar. Such a scalar is said to be an eigenvalue of the eigenvector of matrix .
Eigenvalues and eigenvectors are monumentally important in any application of linear algebra because they represent special cases where linear transformations (i.e. matrices acting on vectors) act like the much simpler scalar multiplication. There is an absolutely lovely process in Linear Algebra for finding eigenvalues and eigenvectors by hand, but we'll just use GeoGebra in this course. For now, to build some intuition, you can engage with the applet below which lets you explore the concept. On the left you can change the coefficients of a 2X2 matrix. As you do so, the eigenvalues and eigenvectors are automatically calculated and displayed numerically on the left. On the right, the eigenvectors are displayed graphically. You can move the blue input vector, , and the resulting output vector, , is automatically calculated and displayed in red.
Note how when the input is parallel to either eigenvector, its output is simply a stretch (i.e. a scalar multiple) of the input; the stretch factor is exactly equal to the eigenvalue. This is the defining fact about eigenvalues and eigenvectors.
Phase Portraits and Phase Space Analysis
A common task one does with a system of linear first order differential equations with constant coefficients is to construct a phase portrait or phase space analysis or phase plane summary of the system. You can read more about this task here.
What this means is we overlay a slopefield of the system with a plot of solutions of the system. It’s customary to call the solutions phase curves, and to plot them with arrows to indicate directionality. This sounds complicated, but it's actually a pretty routine task that we'll take step by step.
To construct the phase portrait of a system of first order linear differential equations with constant coefficients
- Use the above steps to find the eigenvalues, eigenvectors and general solution of the system.
- Plot the slope field in GeoGebra with
slopefield((c*x+d*y)/(a*x+b*y))
- Plot the eigenvectors in GeoGebra with
Vector((v_11,v_12))
andVector((v_21,v_22))
- Plot the general solution in the context of the slope field as a parametric curve
a
using thecurve()
command. - Create an auxiliary variable
T
, and a slider for it. - Plot a point
a(T)
- Record a trace of
a(T)
for each of the following 8 pairs ofc_1
andc_2
. Be sure to mark the directionality of each instance with an arrow mark on your trace. It's sometime nice to change the color of the traces from black.
c_1 | c_2 |
1 | 0 |
-1 | 0 |
0 | 1 |
0 | -1 |
1 | 1 |
1 | -1 |
-1 | 1 |
-1 | -1 |
Example Phase Portrait
Let's follow these steps to construct the phase portrait of the system
Use the process from above to obtain the general solution
and eigenvalues and eigenvectors , , , and .
The resulting phase portrait is below.
A phase portrait gives a somewhat complete picture of all 8 different types of solutions of the system, and can be used as a quick way to understand how the functions and interact with each other.
Note how 4 of the 8 solutions you traced are parallel to the eigenvectors. This is normal in the case of real eigenvalues. The situation is a bit more...well..complex when we encounter complex eigenvalues.
An automated phase plane sketcher can be found on the next page. We'll use this to prepare for complex eigenvalues next lesson.