DifferentialEquations
Chapter 7 · Section 7.6

7.6 The Matrix Method: Two Equations

In Section 7.4 we solved homogeneous systems by substituting , and working out the algebra each time. Now we redo the same thing in the language of Section 7.5. Nothing new is assumed, but the matrix notation does three things for us: it turns the algebra into a standard eigenvalue problem, it makes the three cases (distinct real, complex, repeated eigenvalues) look clean, and it prepares the ground for equations in Section 7.7.

Throughout this section we study

with real constants . In the notation of Section 7.4, and . In the second half of the section we look at the solutions as curves in the plane and classify the possible pictures.

Exponential solutions and the eigenvalue problem

Look for a solution of the form , where is a number and is a constant vector. Then

These are equal for all exactly when . So we have proved:

Theorem 7.6.1 (Eigenvector solutions)

If is an eigenvalue of and a corresponding eigenvector, then is a solution of on .

To build the general solution we need two solutions that are linearly independent. Section 7.3 gave the test for systems, and Section 7.8 proves it for any size: two solutions of are independent if and only if their Wronskian

is nonzero, and it is enough to check this at one single point, say . Then every solution can be written as . The eigenvalues are the roots of

and, as for the characteristic equation in Chapter 4, there are three cases.

Case 1: two distinct real eigenvalues

Theorem 7.6.2 (Distinct real eigenvalues)

If has real eigenvalues with eigenvectors and , the general solution of is

Why. Both terms are solutions by Theorem 7.6.1. At the Wronskian is , which is nonzero because eigenvectors of distinct eigenvalues are independent (Theorem 7.5.4).

Example 7.6.1

Solve , , with , .

Solution
  1. Matrix form. with . (The second equation has no term, so .)
  2. Eigenvalues. , :
  3. Eigenvectors. gives , so . gives , so .
  4. General solution.
  5. Initial condition. At : , i.e. Subtracting, , so and .
  6. Answer. For large the term dominates and the solution grows along the direction (Figure 7.6.1).
Figure 7.6.1. Solutions of Example 7.6.1 drawn in the -plane. Along the line of () points move toward the origin; along the line of () they move away. The highlighted curve is the solution with : it comes in near the first line and leaves along the second.

Our second example has an engineering origin. Two connected compartments (two tanks, two rooms, or two organs exchanging a drug) are often modeled by where is the amount in compartment . The off-diagonal entry () is the rate at which material moves from compartment into compartment ; the diagonal entry is minus the total rate at which material leaves compartment .

Example 7.6.2 (Two compartments)

Compartment 1 loses material at the total rate : the part flows into compartment 2 and the rest leaves the system. Compartment 2 loses material at the rate : the part flows into compartment 1 and the rest leaves. Initially compartment 1 holds units and compartment 2 is empty. Find and .

Solution
  1. Model. Balance = inflow − outflow for each compartment:
  2. Eigenvalues. , :
  3. Eigenvectors. gives : . gives : .
  4. General solution. .
  5. Initial condition. and . Adding: , so , .
  6. Answer.
  7. Interpretation. Both amounts tend to , since material keeps leaving the system. Compartment 2 first fills up, then empties. Its maximum is where , i.e. , , and the maximum value is (Figure 7.6.2).
Figure 7.6.2. The amounts in Example 7.6.2. After the fast mode has died out, both compartments decay like with the fixed ratio , the ratio of the components of .

Case 2: complex eigenvalues

Let the eigenvalues be with . Theorem 7.6.1 works just as well with complex numbers, so for an eigenvector of the function is a solution. It is complex-valued, while we want real solutions. The way out is the same as in Chapter 4: take real and imaginary parts.

Theorem 7.6.3 (Real and imaginary parts)

Let be a real matrix. If , with and real, is a solution of , then and are both real solutions.

Proof. reads . Since is real, and are real vectors. Two complex vectors are equal only if their real parts and their imaginary parts agree, so and .

Now split the eigenvector into real and imaginary parts, , and expand with Euler's formula :

Theorem 7.6.4 (Complex eigenvalues)

If has eigenvalues () and is an eigenvector for , the general solution of is

Both functions are solutions by Theorem 7.6.3. At they equal and , and these are independent: and are eigenvectors of the distinct eigenvalues , hence independent, and , . (If and were dependent, then and , being combinations of them, would be too.) The conjugate eigenvalue gives nothing new, so we never need to compute its eigenvector.

Example 7.6.3

Solve with .

Solution
  1. Eigenvalues. , : So , .
  2. Eigenvector for . The first row says . Choose , : . Check with row 2: .
  3. Split. , so , .
  4. Real solutions. With ,
  5. Initial condition. , so and .
  6. Answer. Both components oscillate with angular frequency inside the decaying envelope .

A second-order equation becomes a system if we take the unknown and its derivative as the two components. So the matrix method also re-derives the results of Chapters 4 and 5.

Example 7.6.4 (A damped spring as a system)

The free motion of a damped spring satisfies . Write it as a system for (position) and (velocity) and solve it by the matrix method.

Solution
  1. System. and :
  2. Eigenvalues. , the characteristic equation of the original ODE; .
  3. Eigenvector for . The first row of is . By the shortcut of Section 7.5, , so and .
  4. General solution. With , :
  5. Compare. The first component is , exactly what Section 4.2 gives, and the second component is its derivative, as it must be.

Case 3: a repeated eigenvalue

Suppose has a double root . There are two very different situations.

(a) Two independent eigenvectors. For a matrix this happens only when (if every vector is an eigenvector, then and , which fixes both columns of ). The system is then uncoupled, , , and the general solution is simply .

(b) Only one independent eigenvector . This is the typical case (Example 7.5.8). We get one solution and need a second. Remembering from Chapter 4, one might try . But

and the term on the left has nothing to cancel against. So we add a correction and try

with an unknown constant vector . Compute both sides:

The terms with cancel. What remains is , that is

Definition 7.6.1 (Generalized eigenvector)

A vector with , where is an eigenvector for , is called a generalized eigenvector of for .

Theorem 7.6.5 (Repeated eigenvalue, one eigenvector)

Let be a double eigenvalue of the matrix with only one independent eigenvector , and let solve . Then the general solution of is

Two questions remain. Does exist? The matrix is singular, so the system could, in principle, be inconsistent. It never is here. A matrix satisfies its own characteristic equation (this is the Cayley–Hamilton theorem; for you can check by multiplying out). With a double root that equation is . Now take any vector that is not an eigenvector. Then , and , so is an eigenvector, hence for some . Then works. In practice you just solve the system: its two equations are proportional, and any solution will do.

Are the two solutions independent? At the Wronskian is . If were a multiple of , then would be , not . So are independent and the Wronskian is nonzero.

Common mistake

The second solution is , not . And solves with the same that appears in . If you rescale , rescale too.

Example 7.6.5

Solve with .

Solution
  1. Eigenvalues. , : . Double eigenvalue .
  2. Eigenvectors. . Both rows say , so there is only one independent eigenvector, .
  3. Generalized eigenvector. Solve : The first equation is twice the second. Take : .
  4. General solution.
  5. Initial condition. At : and , so .
  6. Answer. Check: and .
Method in a nutshell
  1. Write the system as . Compute , and solve .
  2. Distinct real : find eigenvectors ; .
  3. Complex : find one eigenvector for ; .
  4. Double : if , . Otherwise find , solve ; .
  5. For an initial-value problem, set and solve the linear system for .

Practice with the solver below. Type any real matrix (rows separated by a semicolon) and, if you like, an initial vector. It shows the eigenvalues and eigenvectors, the general solution, the solution of the initial-value problem and the phase portrait with its classification. Compare each step with your hand computation.

The phase plane

A solution can be drawn in two ways: as two graphs against (Figure 7.6.2), or as one curve in the -plane, traced as increases (Figure 7.6.1). The plane is called the phase plane, the curves are trajectories (or orbits), and a picture showing a representative set of them, with arrows for the direction of motion, is a phase portrait. The phase portrait shows at a glance how all solutions behave, which is what an engineer usually wants to know: does the system return to rest, oscillate, or run away?

Some general facts hold for every :

  • The constant function is a solution. A point where the system is at rest is an equilibrium (or critical point). If , the origin is the only equilibrium, because then forces . We assume from now on.
  • Trajectories never cross. Through each point passes exactly one trajectory, because of the uniqueness theorem (Section 7.8). In particular, no trajectory reaches the origin in finite time.
  • For a real eigenvalue with eigenvector , the solutions move along the straight line through the origin in the direction of : toward the origin if , away from it if . These straight-line solutions are the skeleton of the portrait (compare Figure 7.5.2).

The possible pictures

Saddle (). Solutions come in along the eigenline of and leave along the eigenline of . Every other trajectory approaches the origin for a while and then turns away, as in Figure 7.6.1. Only the solutions that start exactly on the "incoming" line tend to .

Node ( real, distinct, same sign). Suppose both are negative, . Every solution tends to . As , the term with the less negative eigenvalue decays more slowly and dominates, so trajectories enter the origin tangent to (the "slow" eigenvector). As the fast term dominates, so far from the origin trajectories run parallel to . In Example 7.6.2 the slow eigenvector is . If both eigenvalues are positive, the picture is the same with the arrows reversed.

Spiral or focus ( with ). The factors , make the trajectories wind around the origin, and makes them shrink () or grow (). To find the sense of rotation, compute the velocity at one point, for example at , where : if the motion there is upward, so the rotation is counterclockwise; if it is clockwise. In Example 7.6.3, .

Center (, i.e. ). All solutions are periodic with period ; the trajectories are closed curves (in fact ellipses) around the origin. The motion neither decays nor grows: an undamped oscillator.

Degenerate (improper) node (double , one eigenvector). There is only one eigenline. From the general solution, , so for the direction of approaches that of as . All trajectories become tangent to the single eigenline at the origin, and they look like a node "squeezed" from two lines into one.

Star (proper) node (). Every solution is , a straight ray into the origin () or out of it ().

Figure 7.6.3. The main types of phase portraits. Thick straight lines are eigenlines. Matrices used: saddle (Example 7.6.1); stable node (Example 7.6.2); unstable node ; stable spiral ; center ; degenerate node (Example 7.6.5). Note how the trajectories of the two nodes enter or leave the origin tangent to the slow eigenline.

Stability

Definition 7.6.2 (Stability of the origin)

The equilibrium of is

  • stable if every solution that starts close enough to stays close to for all (precisely: for every there is such that implies for all );
  • asymptotically stable if it is stable and, in addition, every solution starting close enough to tends to as ;
  • unstable if it is not stable.

For linear systems, "close enough" does not matter: if solutions near tend to , then all solutions do, because any solution is a constant multiple of one that starts near . Reading off the general solutions found above gives:

Theorem 7.6.6 (Stability from the eigenvalues)

Let be a real matrix with .

  1. If both eigenvalues have negative real parts, is asymptotically stable.
  2. If the eigenvalues are purely imaginary (), is stable but not asymptotically stable.
  3. If at least one eigenvalue has a positive real part, is unstable.

Everything is summarized in Table 7.6.1. Write and (the numbers called and in Section 7.4); the eigenvalues are , so the signs of , and decide the type without computing any eigenvector.

Table 7.6.1: Classification of the origin for ,
EigenvaluesType of the originStabilityTest with ,
real, saddleunstable
real, nodeasymptotically stable, ,
real, nodeunstable, ,
, spiral (focus)asymptotically stable,
, spiral (focus)unstable,
centerstable, not asymptotically,
, one eigenvectordegenerate nodeasympt. stable if , unstable if ,
, star nodeasympt. stable if , unstable if
Figure 7.6.4. The trace–determinant plane. Each matrix is a point . Lower half-plane: saddles (unstable). Upper half-plane: stable to the left of the -axis, unstable to the right. Centers sit exactly on the positive -axis and repeated eigenvalues exactly on the parabola, so a tiny change in can turn them into spirals or nodes.

When one eigenvalue is zero and every point of the corresponding eigenline is an equilibrium. This borderline case is not in the table; you can still solve the system with the methods above (Theorem 7.6.2 applies if the other eigenvalue is nonzero).

Example 7.6.6

Classify the origin for and decide its stability, for (a) , (b) , (c) , (d) .

Solution
  1. (a) , , : complex eigenvalues () with positive real part. Unstable spiral; since it turns counterclockwise.
  2. (b) , , : real eigenvalues and . Stable node (asymptotically stable).
  3. (c) , : eigenvalues . Center, stable but not asymptotically stable; all solutions are periodic with period .
  4. (d) : saddle, unstable (the eigenvalues are and ).

Exercises

In Exercises 1–8 find the general solution of .

  1. Answer
  2. Answer
  3. Answer , eigenvector ;
  4. Answer , eigenvector ;
  5. Answer , eigenvector ;
  6. Answer (double), , ;
  7. Answer (double), , ;
  8. . What do the trajectories look like?
    Answer ; every trajectory is a straight ray into the origin (stable star node).
  9. Solve , .
    Answer , i.e. ,
  10. Solve , .
    Answer ,
  11. Classify the origin and state its stability: (a) , (b) , (c) , (d) , (e) .
    Answer (a) : stable spiral; (b) : saddle, unstable; (c) double, : unstable degenerate node; (d) : center, stable; (e) : stable node.
  12. The overdamped oscillator is written as a system with , . Find the matrix, the general solution of the system and the type of the origin.
    Answer ; ; stable node.