Unit 8, lesson 47

Nonhomogeneous and Time-Dependent Linear Systems

How variation of constants and the inverse fundamental matrix solve a nonhomogeneous linear system, why a time-dependent coefficient matrix needs its own fundamental matrix, and why non-elementary integrals give exact answers.

  • Video 47
  • Matrix Exponentials and Forced Systems

With tt as the independent variable and a prime meaning d/dtd/dt, a homogeneous system X′=A(t)XX' = A(t)X describes how states evolve on their own, and a fundamental matrix carries every initial state forward. Most models also have a prescribed input, such as a steady inflow or an applied force, which adds a term b(t)b(t) to the right side. This lesson lets the constants in X=Φ(t)cX = \Phi(t)c vary with time and derives the variation of constants formula for systems. It then solves a forced system whose coefficient matrix depends on tt and whose answer contains an integral with no elementary antiderivative.

Key terms

Nonhomogeneous linear system

Definition A linear system of first-order equations has the form

X′=A(t)X+b(t),X' = A(t)X + b(t),

where the state X(t)X(t) has nn components, A(t)A(t) is an n×nn \times n coefficient matrix and b(t)b(t) is a column with nn entries, called the forcing or input. All entries are assumed continuous on an open interval II. The system is nonhomogeneous when bb is not identically zero, and X′=A(t)XX' = A(t)X is the associated homogeneous system. For every t0t_0 in II and every initial state X0X_0 there is exactly one solution with X(t0)=X0X(t_0) = X_0, and it exists on all of II. If XpX_p is one solution and Φ\Phi is a fundamental matrix of the homogeneous system, then every solution on II is X=Φ(t)c+XpX = \Phi(t)c + X_p for exactly one constant vector cc.

In plain words The matrix term says how the components act on one another, and the forcing is an input that does not depend on the state. A linear system cannot blow up while its coefficients and forcing stay continuous, so its solutions last as long as the interval does. Two solutions differ by a solution of the homogeneous system. The sum of two solutions is not a solution, because it satisfies the system with the forcing 2b(t)2b(t) in place of b(t)b(t).

Example For the state X=(x1,x2)TX = (x_1, x_2)^{T}, the equations x1′=tx1+1x_1' = tx_1 + 1 and x2′=−x2+2x_2' = -x_2 + 2 form the system with b=(1,2)Tb = (1, 2)^{T} and

A(t)=(t00−1).A(t) = \begin{pmatrix} t & 0 \\ 0 & -1 \end{pmatrix}.

Both are continuous on R\mathbb{R}, so every initial state at any time t0t_0 gives a solution on all of R\mathbb{R}. The constant x2=2x_2 = 2 and the function x2=2−e−tx_2 = 2 - e^{-t} both solve the second equation, and their difference e−te^{-t} solves the homogeneous equation x2′=−x2x_2' = -x_2.

Time-dependent coefficient matrix

Definition A coefficient matrix A(t)A(t) is time dependent when its entries change with tt. If AA is continuous on an open interval II, the homogeneous system X′=A(t)XX' = A(t)X still has fundamental matrices on II and a principal fundamental matrix U(t,t0)U(t, t_0), but there is no general formula for them. The matrix etA(t)e^{tA(t)} is not a solution in general. The exponential of ∫t0tA(τ) dτ\int_{t_0}^{t} A(\tau)\,d\tau is the principal fundamental matrix when A(t)A(s)=A(s)A(t)A(t)A(s) = A(s)A(t) for all tt and ss in II, but not in general. The eigenvalues of A(t)A(t) at each fixed tt do not determine how the solutions behave. In practice a fundamental matrix is found from special structure, such as a diagonal or triangular matrix, or it is computed numerically.

In plain words With a changing matrix, the shortcuts for constant matrices stop working. A fundamental matrix still exists and still carries every initial state forward, but finding it takes the structure of the particular system or a numerical method.

Example For A(t)=diag⁡(t,−1)A(t) = \operatorname{diag}(t, -1) the equations separate. The solution of x1′=tx1x_1' = tx_1 with x1(0)=1x_1(0) = 1 is et2/2e^{t^2/2}, and the solution of x2′=−x2x_2' = -x_2 with x2(0)=1x_2(0) = 1 is e−te^{-t}, so

Φ(t)=(et2/200e−t)\Phi(t) = \begin{pmatrix} e^{t^2/2} & 0 \\ 0 & e^{-t} \end{pmatrix}

is the principal fundamental matrix at 00. Diagonal matrices commute, and Φ(t)\Phi(t) is indeed the exponential of the integral diag⁡(t2/2,−t)\operatorname{diag}(t^2/2, -t). A second example shows that eigenvalues at frozen times do not decide whether solutions decay. For

A(t)=(−1e2t0−1),A(t) = \begin{pmatrix} -1 & e^{2t} \\ 0 & -1 \end{pmatrix},

each matrix A(t)A(t) has the single eigenvalue −1-1. Yet X(t)=(12et,e−t)TX(t) = (\tfrac12e^t, e^{-t})^{T} is a solution, because the second component satisfies x2′=−x2x_2' = -x_2 and the derivative of the first component is 12et=−12et+e2te−t\tfrac12e^t = -\tfrac12e^t + e^{2t}e^{-t}. Its first component grows without bound.

Inverse fundamental matrix

Definition Let Φ\Phi be a fundamental matrix of X′=A(t)XX' = A(t)X on II. By Liouville’s formula det⁡Φ(t)≠0\det\Phi(t) \ne 0 at every point of II, so the inverse fundamental matrix Φ(t)−1\Phi(t)^{-1} exists for every tt in II. It is differentiable, and differentiating ΦΦ−1=I\Phi\Phi^{-1} = I gives (Φ−1)′=−Φ−1A(t)(\Phi^{-1})' = -\Phi^{-1}A(t). For each tt it converts a state into coordinates with respect to the columns of Φ(t)\Phi(t), by c=Φ(t)−1Xc = \Phi(t)^{-1}X. In particular c0=Φ(t0)−1X0c_0 = \Phi(t_0)^{-1}X_0 gives the constants of the homogeneous solution with X(t0)=X0X(t_0) = X_0. For a constant matrix and Φ=etA\Phi = e^{tA} the inverse is e−tAe^{-tA}, but for a time-dependent matrix Φ(t)−1\Phi(t)^{-1} is generally not Φ(−t)\Phi(-t). For a 2×22 \times 2 matrix MM with rows (α,β)(\alpha, \beta) and (γ,δ)(\gamma, \delta) and nonzero determinant det⁡M=αδ−βγ\det M = \alpha\delta - \beta\gamma, the inverse M−1M^{-1} is the matrix with rows (δ,−β)(\delta, -\beta) and (−γ,α)(-\gamma, \alpha) divided by det⁡M\det M.

In plain words The inverse fundamental matrix reads off how much of each basis solution a state contains at a given time. It undoes Φ(t)\Phi(t) at the same time tt, which is not the same as running time backward to −t-t.

Example For Φ(t)=diag⁡(et2/2,e−t)\Phi(t) = \operatorname{diag}(e^{t^2/2}, e^{-t}) the inverse is diag⁡(e−t2/2,et)\operatorname{diag}(e^{-t^2/2}, e^t), while Φ(−t)=diag⁡(et2/2,et)\Phi(-t) = \operatorname{diag}(e^{t^2/2}, e^t) has the wrong first entry for every t≠0t \ne 0. For the oscillator matrix AA with rows (0,1)(0, 1) and (−4,0)(-4, 0), the principal fundamental matrix etAe^{tA} has rows (cos⁡2t,12sin⁡2t)(\cos 2t, \tfrac12\sin 2t) and (−2sin⁡2t,cos⁡2t)(-2\sin 2t, \cos 2t) and determinant 11. The formula above keeps the equal diagonal entries and changes the signs of the other two, so e−tAe^{-tA} has rows (cos⁡2t,−12sin⁡2t)(\cos 2t, -\tfrac12\sin 2t) and (2sin⁡2t,cos⁡2t)(2\sin 2t, \cos 2t). This is etAe^{tA} with tt replaced by −t-t, as it must be for a constant matrix.

Variation of constants for systems

Definition Let A(t)A(t) and b(t)b(t) be continuous on an open interval II, let Φ\Phi be a fundamental matrix of X′=A(t)XX' = A(t)X on II, and let t0t_0 be a point of II. The unique solution of X′=A(t)X+b(t)X' = A(t)X + b(t) with X(t0)=X0X(t_0) = X_0 is X(t)=Φ(t)c(t)X(t) = \Phi(t)c(t) for every tt in II, where

c(t)=Φ(t0)−1X0+∫t0tΦ(τ)−1b(τ) dτ.\begin{aligned} c(t) &= \Phi(t_0)^{-1}X_0 \\[0.4em] &\quad + \int_{t_0}^{t} \Phi(\tau)^{-1}b(\tau)\,d\tau. \end{aligned}

To derive it, substitute X=Φ(t)c(t)X = \Phi(t)c(t). The product rule gives X′=Φ′c+Φc′=A(t)Φc+Φc′X' = \Phi'c + \Phi c' = A(t)\Phi c + \Phi c', and the term A(t)ΦcA(t)\Phi c matches the homogeneous part of the equation, which leaves Φ(t)c′(t)=b(t)\Phi(t)c'(t) = b(t). Hence c′=Φ−1bc' = \Phi^{-1}b, and integrating from t0t_0 with c(t0)=Φ(t0)−1X0c(t_0) = \Phi(t_0)^{-1}X_0 gives the formula for c(t)c(t). For a constant matrix with Φ=etA\Phi = e^{tA} it reads

X(t)=e(t−t0)AX0+∫t0te(t−τ)Ab(τ) dτ.\begin{aligned} X(t) &= e^{(t - t_0)A}X_0 \\[0.4em] &\quad + \int_{t_0}^{t} e^{(t - \tau)A}b(\tau)\,d\tau. \end{aligned}

The order of the factors matters. The inverse Φ(τ)−1\Phi(\tau)^{-1} acts on the input b(τ)b(\tau) at the time τ\tau when it arrives, and Φ(t)\Phi(t) stands to the left of the integral. Variation of parameters for y′′+p(t)y′+q(t)y=g(t)y'' + p(t)y' + q(t)y = g(t) is the special case of the first-order form with state (y,y′)T(y, y')^{T} and forcing (0,g)T(0, g)^{T}.

In plain words The homogeneous solutions form a moving basis, and the forcing is absorbed by letting the coordinates in that basis drift. The rate of drift is the input expressed in the basis at the moment it arrives, and the final state is rebuilt from the accumulated coordinates with the basis at the time of observation.

Example Solve x1′=tx1+1x_1' = tx_1 + 1 and x2′=−x2+2x_2' = -x_2 + 2 with X(0)=(1,1)TX(0) = (1, 1)^{T}, using Φ(t)=diag⁡(et2/2,e−t)\Phi(t) = \operatorname{diag}(e^{t^2/2}, e^{-t}), whose value at 00 is II. The integrand is

Φ(τ)−1b=(e−τ2/22eτ).\Phi(\tau)^{-1}b = \begin{pmatrix} e^{-\tau^2/2} \\ 2e^{\tau} \end{pmatrix}.

The second entry integrates to 2et−22e^t - 2, so x2=e−t(1+2et−2)=2−e−tx_2 = e^{-t}(1 + 2e^t - 2) = 2 - e^{-t}. The first entry has no elementary antiderivative and stays as an integral,

x1(t)=et2/2(1+G(t)),G(t)=∫0te−τ2/2 dτ.\begin{aligned} x_1(t) &= e^{t^2/2}\big(1 + G(t)\big), \\[0.4em] G(t) &= \int_0^t e^{-\tau^2/2}\,d\tau. \end{aligned}

The formula holds for every real tt, since AA and bb are continuous on R\mathbb{R}. As tt grows, x2x_2 approaches 22 while x1x_1 grows without bound.

Non-elementary integrals

Definition An elementary function is built from constants, powers, roots, exponentials, logarithms, trigonometric functions and their inverses by finitely many arithmetic operations and compositions. An integral is non-elementary when its integrand has no elementary antiderivative, as for e−τ2/2e^{-\tau^2/2}, eτ2e^{\tau^2} and sin⁡τ/τ\sin\tau/\tau. For ff continuous on an interval II and t0t_0 in II, the function

F(t)=∫t0tf(τ) dτF(t) = \int_{t_0}^{t} f(\tau)\,d\tau

is still defined and differentiable on II, with F′=fF' = f by the fundamental theorem of calculus. A solution formula that contains such an integral is exact. Its values can be computed to any accuracy by numerical quadrature or through a named function such as the error function

erf⁡(x)=2π∫0xe−s2 ds.\operatorname{erf}(x) = \frac{2}{\sqrt{\pi}}\int_0^x e^{-s^2}\,ds.

In plain words An integral that cannot be written with familiar functions is still a perfectly good function. It can be differentiated, checked and evaluated, and a name such as erf only abbreviates the integral.

Example The first component x1=et2/2(1+G)x_1 = e^{t^2/2}(1 + G) of the example above satisfies its equation, since G′(t)=e−t2/2G'(t) = e^{-t^2/2} and the product rule gives

x1′=t x1+et2/2e−t2/2=t x1+1.\begin{aligned} x_1' &= t\,x_1 + e^{t^2/2}e^{-t^2/2} \\[0.4em] &= t\,x_1 + 1. \end{aligned}

Also x1(0)=1x_1(0) = 1, because G(0)=0G(0) = 0. The substitution τ=2 s\tau = \sqrt{2}\,s gives

G(t)=π/2 erf⁡ ⁣(t/2),G(t) = \sqrt{\pi/2}\,\operatorname{erf}\!\left(t/\sqrt{2}\right),

which is about 0.85560.8556 at t=1t = 1, so x1(1)≈3.0594x_1(1) \approx 3.0594. The improper integral of e−τ2/2e^{-\tau^2/2} over [0,∞)[0, \infty) has the closed-form value π/2\sqrt{\pi/2}, so e−t2/2x1(t)→1+π/2≈2.2533e^{-t^2/2}x_1(t) \to 1 + \sqrt{\pi/2} \approx 2.2533 as t→∞t \to \infty. The exact formula shows how fast x1x_1 grows, even though x1x_1 itself is not an elementary function.

Check yourself

  1. Let AA have rows (0,1)(0, 1) and (0,0)(0, 0) and let b(t)=(0,6t)Tb(t) = (0, 6t)^{T}. Solve X′=AX+b(t)X' = AX + b(t) with X(0)=(0,0)TX(0) = (0, 0)^{T}, and compare the result with the equation y′′=6ty'' = 6t.
Show the answer

Since A2=0A^2 = 0, the exponential is etA=I+tAe^{tA} = I + tA, and its inverse at time τ\tau is e−τA=I−τAe^{-\tau A} = I - \tau A. The integrand e−τAb(τ)=(−6τ2,6τ)Te^{-\tau A}b(\tau) = (-6\tau^2, 6\tau)^{T} integrates from 00 to tt to (−2t3,3t2)T(-2t^3, 3t^2)^{T}. Multiplying by etAe^{tA} gives

X(t)=(1t01)(−2t33t2)=(t33t2).\begin{aligned} X(t) &= \begin{pmatrix} 1 & t \\ 0 & 1 \end{pmatrix}\begin{pmatrix} -2t^3 \\ 3t^2 \end{pmatrix} \\[0.4em] &= \begin{pmatrix} t^3 \\ 3t^2 \end{pmatrix}. \end{aligned}

The system is the first-order form of y′′=6ty'' = 6t with state (y,y′)T(y, y')^{T} and y(0)=y′(0)=0y(0) = y'(0) = 0. Its solution y=t3y = t^3 has y′=3t2y' = 3t^2, which matches both components.

  1. Let BB have rows (0,1)(0, 1) and (1,0)(1, 0). The matrix Φ(t)\Phi(t) with rows (t,1/t)(t, 1/t) and (t,−1/t)(t, -1/t) is a fundamental matrix of tX′=BXtX' = BX on (0,∞)(0, \infty). Solve tX′=BX+(2t2,0)TtX' = BX + (2t^2, 0)^{T} with X(1)=(0,0)TX(1) = (0, 0)^{T}, and explain what goes wrong if the forcing (2t2,0)T(2t^2, 0)^{T} is used in the formula without first dividing by tt.
Show the answer

The formula needs the form X′=A(t)X+b(t)X' = A(t)X + b(t). Dividing by tt gives A(t)=B/tA(t) = B/t and b(t)=(2t,0)Tb(t) = (2t, 0)^{T}, which are continuous on (0,∞)(0, \infty), while A(t)A(t) is not defined at t=0t = 0. So the solution lives on (0,∞)(0, \infty). The determinant of Φ(t)\Phi(t) is −1−1=−2-1 - 1 = -2, and the 2×22 \times 2 inverse formula gives

Φ(t)−1=(12t12tt2−t2),\Phi(t)^{-1} = \begin{pmatrix} \tfrac{1}{2t} & \tfrac{1}{2t} \\[0.2em] \tfrac{t}{2} & -\tfrac{t}{2} \end{pmatrix},

so Φ(τ)−1b(τ)=(1,τ2)T\Phi(\tau)^{-1}b(\tau) = (1, \tau^2)^{T}. Since X(1)=0X(1) = 0, only the integral term remains. The integral from 11 to tt is (t−1,(t3−1)/3)T(t - 1, (t^3 - 1)/3)^{T}, and multiplying by Φ(t)\Phi(t) gives

X(t)=(43t2−t−13t23t2−t+13t).X(t) = \begin{pmatrix} \tfrac43t^2 - t - \tfrac{1}{3t} \\[0.2em] \tfrac23t^2 - t + \tfrac{1}{3t} \end{pmatrix}.

To check, tt times the derivative of the first component is 83t2−t+13t\tfrac83t^2 - t + \tfrac{1}{3t}, which equals the second component plus 2t22t^2. Also tt times the derivative of the second component is 43t2−t−13t\tfrac43t^2 - t - \tfrac{1}{3t}, which is the first component, and both components vanish at t=1t = 1. With the forcing (2t2,0)T(2t^2, 0)^{T} left undivided, the formula solves X′=(B/t)X+(2t2,0)TX' = (B/t)X + (2t^2, 0)^{T} instead. That is the equation tX′=BX+(2t3,0)TtX' = BX + (2t^3, 0)^{T}, not the one we were given.

  1. Solve X′=A(t)X+bX' = A(t)X + b with A(t)=diag⁡(−2t,−1)A(t) = \operatorname{diag}(-2t, -1), b=(1,1)Tb = (1, 1)^{T} and X(0)=(0,0)TX(0) = (0, 0)^{T}. Explain why the answer is exact although one of its integrals is non-elementary, and find the limit of each component as t→∞t \to \infty.
Show the answer

The principal fundamental matrix at 00 is Φ(t)=diag⁡(e−t2,e−t)\Phi(t) = \operatorname{diag}(e^{-t^2}, e^{-t}), and Φ(τ)−1b=(eτ2,eτ)T\Phi(\tau)^{-1}b = (e^{\tau^2}, e^{\tau})^{T}. With X(0)=0X(0) = 0 the formula gives x2(t)=e−t(et−1)x_2(t) = e^{-t}(e^t - 1) and

x1(t)=e−t2∫0teτ2 dτ,x2(t)=1−e−t.\begin{gathered} x_1(t) = e^{-t^2}\int_0^t e^{\tau^2}\,d\tau, \\[0.4em] x_2(t) = 1 - e^{-t}. \end{gathered}

The integrand eτ2e^{\tau^2} has no elementary antiderivative, but it is continuous, so the integral is a differentiable function of tt with derivative et2e^{t^2}. The product rule then confirms x1′=−2tx1+1x_1' = -2tx_1 + 1, and x1(0)=0x_1(0) = 0. The second component tends to 11. For the first, the numerator ∫0teτ2 dτ\int_0^t e^{\tau^2}\,d\tau and the denominator et2e^{t^2} of the quotient both tend to infinity, and L’Hôpital’s rule gives

lim⁡t→∞x1(t)=lim⁡t→∞et22tet2=0.\lim_{t \to \infty} x_1(t) = \lim_{t \to \infty} \frac{e^{t^2}}{2te^{t^2}} = 0.

In fact x1(t)x_1(t) is close to 1/(2t)1/(2t) for large tt, and x1(10)≈0.0503x_1(10) \approx 0.0503.

How this lesson connects