Differential Equations Day 22 -- The Algebraic Theory of Systems of Differential Equations (Real Eigenvalues)
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. [br][br]In this lesson we will focus purely on the mathematical theory of [b]systems of linear first order differential equations with constant coefficients[/b]. 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.[br][br]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.
A system of first order linear differential equations with constant coefficients is a relationship of two functions, [math]x(t)[/math] and [math]y(t)[/math], and their first derivatives by two first order differential equations of the form[br][br][math]\frac{d}{dt}x\left(t\right)=a\cdot x\left(t\right)+b\cdot y\left(t\right)[/math][br][math]\frac{d}{dt}y\left(t\right)=c\cdot x\left(t\right)+d\cdot y\left(t\right)[/math][br][br]You'll often see a system such as this written more efficiently by dropping the [math](t)[/math]s:[br][br][math]x'=ax+by[/math][br][math]y'=cx+dy[/math][br][br]Note that [math]a,b,c[/math], and [math]d[/math] are constants, but [math]x[/math] and [math]y[/math] are functions. This is sometimes called the [b]standard form [/b]of systems of first order linear equations with constant coefficients.
[list=1][*]Be sure the system is in standard form. Be sure you can easily identify the constants [math]a,b,c[/math] and [math]d[/math][/*][*]In row 1 of the GeoGebra CAS enter the matrix representation of the coefficients as [code]{{a,b},{c,d}}[/code][/*][*]In row 2, find the eigenvalues of the matrix in row 1 with [code]Eigenvalues($1)[/code]. We will refer to the eigenvalues as [math]\lambda_1[/math] and [math]\lambda_2[/math]*.[/*][*]In row 3, find the eigenvectors of the matrix in row 1 with [code]Eigenvectors($1)[/code]. The result will be a matrix, the columns of which are the the eigenvectors. We will refer to the eigenvectors as [math]v_1=\binom{v_{11}}{v_{12}}[/math] and [math]v_2=\binom{v_{21}}{v_{22}}[/math]**.[/*][*]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 [math]x[/math] and [math]y[/math] to find the coefficients [code]c_1[/code] and [code]c_2[/code] that yield the specific solution. This will involve solving a system of linear algebraic equations in [code]c_1[/code] and [code]c_2[/code].[/*][*]Check your work by verifying that your results both solve the system of equations [i]and [/i]the match the initial conditions (if present). I strongly recommend using the GeoGebra Algebra Pane.[/*][/list]Here's the template for step 5:[br][br][math]x\left(t\right)=c_1\cdot v_{11}\cdot e^{\lambda_1\cdot t}+c_2\cdot v_{21}\cdot e^{\lambda_2\cdot t}[/math][br][math]y\left(t\right)=c_1\cdot v_{12}\cdot e^{\lambda_1\cdot t}+c_2\cdot v_{22}\cdot e^{\lambda_2\cdot t}[/math][br][br][i]Note *[/i]: If the eigenvalues are complex numbers, then a different template is needed. We'll cover this in the next lesson. Also, if the eigenvalues are the same, then again, a different template is needed. We will not cover repeated eigenvalues in this book. You can read more about them [url=https://tutorial.math.lamar.edu/Classes/DE/RepeatedEigenvalues.aspx]here[/url]. [br][br][i]Note **[/i]: If you are familiar with the Linear Algebraic process of finding eigenvalues and eigenvectors of a matrix by hand, then feel free to do so. In this book and this course however we'll always use GeoGebra.
Let's use this method to solve this system of equations[br][br][math]x'=12x-6y[/math][br][math]y'=15x-7y[/math][br][br]with initial conditions [math]x(0)=13[/math] and [math]y(0)=21[/math].[br][br][b]1.[/b] [br][br]The coefficients of the system are [math]a=12,b=-6,c=15[/math], and [math]d=-7[/math][br][br][b]2.[/b] and [b]3. [/b]and [b]4. [br][br][/b]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).
[b]5.[br][br][/b]From the GeoGebra CAS, we can see that the eigenvalues are [math]\lambda_1=3[/math], [math]\lambda_2=2[/math], and the eigenvectors are [math]v_1=\binom{2}{3}[/math], and [math]v_2=\binom{3}{5}[/math]. [br][br]Using these pieces of information, we can assemble the solutions with the template. Be careful; it's easy to get crossed up:[br][br][math]x\left(t\right)=c_1\cdot2\cdot e^{3\cdot t}+c_2\cdot3\cdot e^{2\cdot t}[/math][br][math]y\left(t\right)=c_1\cdot3\cdot e^{3\cdot t}+c_2\cdot5\cdot e^{2\cdot t}[/math][br][br][b]6.[br][/b][br]The initial conditions we were provided at the outset are [math]x(0)=13[/math] and [math]y(0)=21[/math]. Plugging 0 in for t in the general solution, and setting the result equal to these initial conditions yields[br][br][math]x\left(0\right)=c_1\cdot2\cdot e^{3\cdot0}+c_2\cdot3\cdot e^{2\cdot0}=2c_1+3c_2=13[/math][br][math]y\left(0\right)=c_1\cdot3\cdot e^{3\cdot0}+c_2\cdot5\cdot e^{2\cdot0}=3c_1+5c_2=21[/math][br][br]In particular we must solve this system for [code]c_1[/code] and [code]c_2[/code]:[br][br][br][math]2c_1+3c_2=13[/math][br][math]3c_1+5c_2=21[/math][br][br]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.
[b]7.[/b] [br][br]Let us check to be sure these functions we've produced solve the system of differential equations and the initial conditions. [br][br]We had to call the functions [code]f_x[/code] and [code]f_y [/code]in GeoGebra because [code]x [/code]and [code]y[/code] are not allowable names for functions in GeoGebra.[br][br]Note that--as always--the code for the checks comes from the original system of equations. The code is:[br][br][code]simplify(f_x'-12*f_x+6*f_y)[/code][br][br]and[br][br][code]simplify(f_y'-15*f_x+7*f_y)[br][/code][br]Scroll to the bottom of the Algebra Pane to verify that these both return 0. Also, the initial conditions are checked with [code]f_x(0)[/code] and [code]f_y(0)[/code] both producing the intended values of 13 and 21, respectively.
You may be wondering: what the heck are these things--eigenvectors and eigenvalues--that feature so prominently in the process? [br][br]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 [url=https://www.youtube.com/watch?v=2spTnAiQg4M]review that here[/url]. If you understand matrix multiplication, then here's the definition:[br][br][b]Definition[/b]: A vector [math]v[/math] is called an [b]eigenvector[/b] of a matrix [math]A[/math] if [math]A[/math] times [math]v[/math] is a scalar multiple of [math]v[/math]; in other words, if [math]A\cdot v=\lambda\cdot v[/math]. Note that [math]\lambda[/math] is a scalar. Such a scalar [math]\lambda[/math] is said to be an [b]eigenvalue[/b] of the eigenvector [math]v[/math] of matrix [math]A[/math].[br][br]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, [math]v[/math], and the resulting output vector, [math]A\cdot v[/math], is automatically calculated and displayed in red.[br][br]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.
A common task one does with a system of linear first order differential equations with constant coefficients is to construct a [b]phase portrait[/b] or [b]phase space analysis[/b] or [b]phase plane summary [/b]of the system. You can read more about this task [url=https://tutorial.math.lamar.edu/classes/de/phaseplane.aspx]here[/url].[br][br]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 [b]phase curves[/b], 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. [br][br]To construct the phase portrait of a system of first order linear differential equations with constant coefficients[br][br][math]x'=ax+by[/math][br][math]y'=cx+dy[/math][br][br][list=1][*]Use the above steps to find the eigenvalues, eigenvectors and general solution of the system.[/*][*]Plot the slope field in GeoGebra with [code]slopefield((c*x+d*y)/(a*x+b*y))[/code][/*][*]Plot the eigenvectors in GeoGebra with [code]Vector((v_11,v_12))[/code] and [code]Vector((v_21,v_22))[/code][/*][*]Plot the general solution in the context of the slope field as a parametric curve [code]a[/code] using the [code]curve()[/code] command. [/*][*]Create an auxiliary variable [code]T[/code], and a slider for it.[/*][*]Plot a point [code]a(T)[/code][/*][*]Record a trace of [code]a(T)[/code] for each of the following 8 pairs of [code]c_1[/code] and [code]c_2[/code]. 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.[/*][/list][br][left][/left][table][tr][td][b][code]c_1[/code][/b][/td][td][b][code]c_2[/code][/b][/td][/tr][tr][td]1[/td][td]0[/td][/tr][tr][td]-1[/td][td]0[/td][/tr][tr][td]0[/td][td]1[/td][/tr][tr][td]0[/td][td]-1[/td][/tr][tr][td]1[/td][td]1[/td][/tr][tr][td]1[/td][td]-1[/td][/tr][tr][td]-1[/td][td]1[/td][/tr][tr][td]-1[/td][td]-1[/td][/tr][tr][td][br][/td][td] [/td][/tr][/table][center][/center]
Let's follow these steps to construct the phase portrait of the system [br][br][math]x'=1x+1y[/math][br][math]y'=4x+1y[/math][br][br]Use the process from above to obtain the general solution[br][br][math]x\left(t\right)=c_1\cdot1\cdot e^{3\cdot t}+c_2\cdot\left(-1\right)\cdot e^{\left(-1\right)\cdot t}[/math][br][math]y\left(t\right)=c_1\cdot2\cdot e^{3\cdot t}+c_2\cdot2\cdot e^{\left(-1\right)\cdot t}[/math][br][br]and eigenvalues and eigenvectors [math]\lambda_1=3[/math], [math]\lambda_2=\left(-1\right)[/math], [math]v_1=\binom{1}{2}[/math], and [math]v_2=\binom{-1}{2}[/math].[br][br]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 [math]x(t)[/math] and [math]y(t)[/math] interact with each other. [br][br]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.[br][br]An automated phase plane sketcher can be found on the next page. We'll use this to prepare for complex eigenvalues next lesson.