DifferentialEquations
Chapter 9 · Section 9.5

9.5 Solving Linear Systems

Many engineering problems involve two or more unknown functions that influence each other: the temperatures of two rooms that exchange heat, the currents in two loops of a circuit, the positions of two masses joined by springs. In Chapter 7 such systems were solved with operators and with eigenvalues. The Laplace transform offers a third way, and it is often the most direct one when initial conditions are given: each differential equation turns into a linear algebraic equation, and we are left with an ordinary linear system for the transforms.

The method

Consider the system

with constant coefficients and forcing functions that are piecewise continuous and of exponential order. Write , , , .

Transform each equation. With and :

Collect and on the left.

This is a linear system of two equations in two unknowns, and , whose coefficients happen to depend on . Any method from algebra will do. For systems, Cramer's rule is the cleanest.

Cramer's rule for two equations

The system with determinant has the unique solution

To get the numerator for , replace the -column of the coefficient matrix by the right-hand sides; for , replace the -column.

In our case the coefficient determinant is

This is exactly , the characteristic polynomial of the coefficient matrix . Its roots are the eigenvalues of from Chapter 7. So, once again, the poles of the transforms are the characteristic roots, and they decide whether the solution decays, grows or oscillates. Since is a nonzero polynomial, it vanishes only at finitely many , so Cramer's rule applies for all large .

Method in a nutshell
  1. Transform each equation of the system, inserting the initial values: , (and for second-order equations).
  2. Arrange the result as two linear equations: the and terms on the left, everything else on the right.
  3. Solve for and by Cramer's rule. Factor the determinant .
  4. Invert and by partial fractions to get and .
  5. Check the initial values (and, ideally, substitute into both equations).
Example 9.5.1 (A homogeneous system with real eigenvalues)

Solve , , with , .

Solution
  1. Transform.
  2. Arrange.
  3. Determinant.
  4. Cramer's rule.
  5. Partial fractions (cover-up). For : at , ; at , . For : at , ; at , .
  6. Invert.
  7. Check. , . And , .

Compare with Chapter 7: the eigenvalues of are and , and the vectors multiplying and , namely and , are eigenvectors. The Laplace method found them without computing any eigenvectors and fitted the initial conditions automatically.

A forced system: two rooms and a heater

Two adjacent rooms exchange heat with each other and with the outdoors. Let and be their temperatures measured above the outdoor temperature. With suitable time units, each room loses heat to the outdoors at a rate proportional to its own temperature and exchanges heat with the other room at a rate proportional to the difference. A heater in room 2 supplies heat at a constant rate. A simple model is

Example 9.5.2 (Heating two rooms)

Solve the system above with both rooms initially at the outdoor temperature: , .

Solution
  1. Transform. :
  2. Arrange.
  3. Determinant. .
  4. Cramer's rule.
  5. Partial fractions for . Cover-up at : So .
  6. Partial fractions for . Cover-up at : So .
  7. Invert.
  8. Interpretation. Both initial values are . As , the heated room approaches degrees above outdoors and the neighbouring room degrees (Figure 9.5.1). You can confirm these steady values directly by setting : and give , .
Figure 9.5.1. Example 9.5.2. The heated room warms up quickly; its neighbour starts with zero slope and follows, settling at half the temperature rise.

Try the system solver on your own problems. Enter the matrix row by row (rows separated by a semicolon), the two forcing functions and the initial values. It shows the transformed equations, the determinant, Cramer's rule and the inverse transforms. The first preset is Example 9.5.1, the second is Example 9.5.2. Change the heater input from to (a heater that fades out) and predict the long-term temperatures before you run it.

Complex eigenvalues

Example 9.5.3 (A spiral)

Solve , , with , .

Solution
  1. Transform and arrange.
  2. Determinant. . No real roots: the eigenvalues are .
  3. Cramer's rule.
  4. Invert with rows 10 and 9 of Table 9.1.1 (, ; note ):
  5. Interpretation. The point moves on a spiral toward the origin: the distance from the origin is , and the angle is (Figure 9.5.2). In the language of Chapter 7, the origin is a stable spiral point.
Figure 9.5.2. Example 9.5.3. Left: and are decaying oscillations, a quarter period apart. Right: together they trace a spiral that winds counterclockwise into the origin.

Systems not in normal form

The method does not need the equations to be solved for and . If both derivatives appear in both equations, we still transform term by term and get two linear equations for and . Only the determinant changes.

Example 9.5.4 (Derivatives in both equations)

Solve

Solution
  1. Transform. With (since ) and :
  2. Arrange.
  3. Determinant.
  4. Cramer's rule.
  5. Invert with rows 6 and 7 ():
  6. Check. , . First equation: . The second is checked the same way.
Watch the determinant

For a system not in normal form, the determinant can have degree less than , and in degenerate cases it can be identically zero. A lower degree means fewer independent constants in the solution, so the initial values can no longer all be chosen freely: they must be compatible with the equations. If , the system does not determine and uniquely, and the method, correctly, fails.

Second-order systems: coupled oscillators

Newton's law for several masses gives systems of second-order equations. The method is the same; we use .

Two equal masses slide without friction between two walls, connected to the walls and to each other by three equal springs with (Figure 9.5.3). Let and be the displacements of the masses from equilibrium (positive to the right). The left mass feels the left spring, , and the middle spring, which is stretched by , so the force is . The right mass feels . Therefore

Example 9.5.5 (Two masses, three springs)

The left mass is pulled units to the right while the right mass is held at equilibrium; both are released from rest. So , , , . Find the motion.

Solution
  1. Transform. and :
  2. Determinant. A difference of squares:
  3. Cramer's rule.
  4. Partial fractions. Treat as one variable. For : gives . Setting : , . Setting : , . For , in the same way, gives , :
  5. Invert. With and in row 5:
  6. Interpretation. The motion is a combination of two normal modes. In the slow mode (frequency ) the masses move together, ; in the fast mode (frequency ) they move in opposite directions, . Indeed and . Because is irrational, the motion never repeats exactly; energy passes back and forth between the masses (Figure 9.5.3).
Figure 9.5.3. Two masses and three springs (Example 9.5.5). The left mass starts displaced, the right one at rest; the motion mixes the frequencies and , and the two masses take turns carrying the larger oscillation.

Laplace transform or eigenvalues?

For a system with constant coefficients you now have three methods: the operator method, the matrix (eigenvalue) method of Chapter 7, and the Laplace transform. They always give the same answer, so choose by convenience.

  • The Laplace transform is most efficient when initial values are given and the forcing is an exponential, a polynomial, a sinusoid, a step or an impulse. The initial values are built in, nonhomogeneous terms need no extra method, and systems not in normal form or with second derivatives are handled in the same way.
  • The eigenvalue method is better when you want the general solution with arbitrary constants, or when you want to understand the geometry of all solutions at once (the phase portrait).
  • For larger systems the Laplace method still works, but Cramer's rule becomes heavy; then one solves the -domain linear system by elimination, and the determinant still gives the poles.

Exercises

In Exercises 1–7 solve the system with the Laplace transform.

  1. , ; , .
    Answer ; ,
  2. , ; , .
    Answer , ; ,
  3. , ; , .
    Answer ,
  4. , ; , .
    Answer ; ,
  5. , ; , .
    Answer (repeated eigenvalue); ,
  6. , ; , . (Two tanks in a cascade: the first feeds the second.)
    Answer ,
  7. , ; , .
    Answer ; , (resonance)
  8. Solve , , with , . What is the degree of ?
    Answer has the full degree , so both initial values may be prescribed; ,
  9. Solve , , with , , .
    Answer ; ,
  10. Show that for the normal system , the determinant in Cramer's rule is , and explain why its roots are the eigenvalues of the coefficient matrix.
    Answer Expand . It equals , whose zeros are by definition the eigenvalues of .