Login
📚 Differential Equations for Engineers
Chapters ▾
⇩ Download ▾

3.9 Nonhomogeneous systems

First Order Constant Coefficient

Integrating factor

Let us first focus on the nonhomogeneous first order equation

x ( t ) = A x ( t ) + f ( t ) ,

where A is a constant matrix. The first method we will look at is the integrating factor method. For simplicity we rewrite the equation as

x ( t ) + P x ( t ) = f ( t ) ,

where P=A. We multiply both sides of the equation by etP (being mindful that we are dealing with matrices that may not commute) to obtain

e t P x ( t ) + e t P P x ( t ) = e t P f ( t ) .

We notice that PetP=etPP. This fact follows by writing down the series definition of etP,

P e t P = P ( 𝐼 + 𝐼 + t P + 1 2 ( t P ) 2 + ) = P + t P 2 + 1 2 t 2 P 3 + = ( 𝐼 + 𝐼 + t P + 1 2 ( t P ) 2 + ) P = P e t P

We have already seen that ddx(etP)=PetP=etPP. The product rule says,

d d t ( e t P x ( t ) ) = e t P x ( t ) + e t P P x ( t ) ,

and so

d d t ( e t P x ( t ) ) = e t P f ( t ) .

We can now integrate. That is, we integrate each component of the vector separately

e t P x ( t ) = e t P f ( t ) d t + c .

Recall from Exercise 3.8.6 that (etP)1=etP. Therefore, we obtain

x ( t ) = e t P e t P f ( t ) d t + e t P c .

Perhaps it is better understood as a definite integral. In this case it will be easy to also solve for the initial conditions as well. Suppose we have the equation with initial conditions

x ( t ) + P x ( t ) = f ( t ) , x ( 0 ) = b .

The solution can then be written as

x ( t ) = e t P 0 t e s P f ( s ) d s + e t P b .

(3.9.1)

Again, the integration means that each component of the vector esPf(s) is integrated separately. It is not hard to see that (3.9.1) really does satisfy the initial condition x(0)=b

x ( 0 ) = e 0 P 0 0 e s P f d s + e 0 P b = 𝐼 b = b .

For systems, the integrating factor method only works if P does not depend on t, that is, P is constant. The problem is that in general

d d t [ e P ( t ) d t ] P ( t ) e P ( t ) d t ,

because matrix multiplication is not commutative.

Eigenvector Decomposition

For the next method, we note that eigenvectors of a matrix give the directions in which the matrix acts like a scalar. If we solve our system along these directions these solutions would be simpler as we can treat the matrix as a scalar. We can put those solutions together to get the general solution.

Take the equation

x ( t ) = A x ( t ) + f ( t )

(3.9.2)

Assume that A has n linearly independent eigenvectors x1,,xn. Let us write

x ( t ) = v 1 ξ 1 ( t ) + v 2 ξ 2 t + + v n ξ n ( t )

(3.9.3)

That is, we wish to write our solution as a linear combination of eigenvectors of A. If we can solve for the scalar functions ξ1through ξn we have our solution x. Let us decompose f in terms of the eigenvectors as well. We wish to write

f ( t ) = v 1 g 1 ( t ) + v 2 g 2 t + + v n g n ( t )

(3.9.4)

That is, we wish to find g1 through gn that satisfy (3.9.4). We note that since all the eigenvectors are independent, the matrix E=[v1v2vn] is invertible. We see that (3.9.4) can be written as f=Eg, where the components of gare the functions g1 through gn. Then g=E1f. Hence it is always possible to find g when there are n linearly independent eigenvectors.

We plug (3.9.3) into (3.9.2), and note that Avk=λkvk.

v 1 ξ 1 + v 2 ξ 2 + + v n ξ n x = A ( v 1 ξ 1 + v 2 ξ 2 + + v n ξ n ) A x + v 1 g 1 + v 2 g 2 + + v n g n f = A v 1 ξ 1 + A v 2 ξ 2 + + A v n ξ n + v 1 g 1 + v 2 g 2 + + v n g n = v 1 λ 1 ξ 1 + v 2 λ 2 ξ 2 + + v n λ n ξ n + v 1 g 1 + v 2 g 2 + + v n g n = v 1 ( λ 1 ξ 1 + g 1 ) + v 2 ( λ 2 ξ 2 + g 2 ) + + v n ( λ n ξ n + g n ) .

If we identify the coefficients of the vectors v1 through vn we get the equations

ξ 1 = λ 1 ξ 1 + g 1 , ξ 2 = λ 2 ξ 2 + g 2 , ξ n = λ n ξ n + g n .

Each one of these equations is independent of the others. They are all linear first order equations and can easily be solved by the standard integrating factor method for single equations. That is, for example for the kthequation we write

ξ k ( t ) λ k ξ k ( t ) = g k ( t ) .

We use the integrating factor eλkt to find that

d d x [ ξ k ( t ) e λ k t ] = e λ k t g k ( t ) .

Now we integrate and solve for ξk to get

ξ k ( t ) = e λ k t e λ k t g k ( t ) d t + C k e λ k t .

If we are looking for just any particular solution, we can set Ck to be zero. If we leave these constants in, we get the general solution. Write x(t)=v1ξ1(t)+v2ξ2(t)++vnξn(t), and we are done.

Again, as always, it is perhaps better to write these integrals as definite integrals. Suppose that we have an initial condition x(0)=b. We take c=E1b and note b=v1a1++vnan, just like before. Then if we write

ξ k ( t ) = e λ k ( t ) 0 t e λ k s g k ( s ) d t + a k e λ k t ,

we will actually get the particular solution x(t)=v1ξ1+x2ξ2++vnξn satisfying x(0)=b, because ξk(0)=ak.

Let us remark that the technique we just outlined is the eigenvalue method applied to nonhomogeneous systems. If a system is homogeneous, that is, if f=0, then the equations we get are ξk=λkξk, and so ξk=Ckeλkt are the solutions and that’s precisely what we got in Section 3.4.

Undetermined Coefficients

We also have the method of undetermined coefficients for systems. The only difference here is that we will have to take unknown vectors rather than just numbers. Same caveats apply to undetermined coefficients for systems as for single equations. This method does not always work. Furthermore if the right hand side is complicated, we will have to solve for lots of variables. Each element of an unknown vector is an unknown number. So in system of 3 equations if we have say 4 unknown vectors (this would not be uncommon), then we already have 12 unknown numbers that we need to solve for. The method can turn into a lot of tedious work. As this method is essentially the same as it is for single equations, let us just do an example.

As you can see, other than the handling of conflicts, undetermined coefficients works exactly the same as it did for single equations. However, the computations can get out of hand pretty quickly for systems. The equation we had done was very simple.

First Order Variable Coefficient

Variation of Parameters

Just as for a single equation, there is the method of variation of parameters. In fact for constant coefficient systems, this is essentially the same thing as the integrating factor method we discussed earlier. However, this method will work for any linear system, even if it is not constant coefficient, provided we can somehow solve the associated homogeneous problem.

Suppose we have the equation

x = A ( t ) x + f ( t ) .

(3.9.5)

Further, suppose we have solved the associated homogeneous equation x=A(t)x and found the fundamental matrix solution X(t). The general solution to the associated homogeneous equation is X(t)c for a constant vector c. Just like for variation of parameters for single equation we try the solution to the nonhomogeneous equation of the form

x p = X ( t ) u ( t ) ,

where u(t) is a vector valued function instead of a constant. Now we substitute into (3.9.5) to obtain

xp(t)=X(t)u(t)+X(t)u(t)xp(t)=A(t)X(t)u(t)A(t)xp(t)+f(t).

But X(t) is a fundamental matrix solution to the homogeneous problem. So X(t)=A(t)X(t), and

X(t)u(t)+X(t)u(t)=X(t)u(t)+f(t).

Hence X(t)u(t)=f(t). If we compute [X(t)]1, then u(t)=[X(t)]1f(t). We integrate to obtain u and we have the particular solution xp=X(t)u(t). Let us write this as a formula

x p = X ( t ) [ X ( t ) ] 1 f ( t ) d t .

Note that if A is constant and we let X(t)=etA, then [X(t)]1=etA and hence we get a solution xp=etAetAf(t)dt, which is precisely what we got using the integrating factor method.

In the variation of parameters, just like in the integrating factor method we can obtain the general solution by adding in constants of integration. That is, we will add X(t)c for a vector of arbitrary constants. But that is precisely the complementary solution.

Second Order Constant Coefficients

Undetermined Coefficients

We have already seen a simple example of the method of undetermined coefficients for second order systems in Section 3.6. This method is essentially the same as undetermined coefficients for first order systems. There are some simplifications that we can make, as we did in Section 3.6. Let the equation be

x = A x + f ( t ) ,

where A is a constant matrix. If F(t) is of the form F0cos(ωt), then as two derivatives of cosine is again cosine we can try a solution of the form

x p = c cos ( ω t ) ,

and we do not need to introduce sines.

If the F is a sum of cosines, note that we still have the superposition principle. If F(t)=F0cos(ω0t)+F1cos(ω1t), then we would try acos(ω0t) for the problem x=Ax+F0cos(ω0t), and we would try bcos(ω1t) for the problem x=Ax+F0cos(ω1t). Then we sum the solutions.

However, if there is duplication with the complementary solution, or the equation is of the form x=Ax+Bx+F(t), then we need to do the same thing as we do for first order systems.

You will never go wrong with putting in more terms than needed into your guess. You will find that the extra coefficients will turn out to be zero. But it is useful to save some time and effort.

Eigenvector Decomposition

If we have the system

x = A x + F ( t , )

we can do eigenvector decomposition, just like for first order systems.

Let λ1,,λn be the eigenvalues and v1,,vn be eigenvectors. Again form the matrix E=[v1vn]. We write

x ( t ) = v 1 ξ 1 ( t ) + v 2 ξ 2 ( t ) + + v n ξ n ( t ) .

We decompose F in terms of the eigenvectors

f ( t ) = v 1 g 1 ( t ) + v 2 g 2 ( t ) + + v n g n ( t ) .

And again g=E1F.

Now we plug in and doing the same thing as before we obtain

v 1 ξ 1 + v 2 ξ 2 + v n ξ n x = A ( v 1 ξ 1 + v 2 ξ 2 + v n ξ n ) A x + v 1 g 1 + v 2 g 2 + + v n g n f = A v 1 ξ 1 + A v 2 ξ 2 + A v n ξ n + v 1 g 1 + v 2 g 2 + + v n g n = v 1 λ 1 ξ 1 + v 2 λ 2 ξ 2 + v n λ n ξ n + v 1 g 1 + v 2 g 2 + + v n g n = v 1 ( λ 1 ξ 1 + g 1 ) + v 2 ( λ 2 ξ 2 + g 2 ) + + v n ( λ n ξ n + g n ) .

We identify the coefficients of the eigenvectors to get the equations

ξ 1 = λ 1 ξ 1 + g 1 , ξ 2 = λ 2 ξ 2 + g 2 , ξ n = λ n ξ n + g n .

Each one of these equations is independent of the others. We solve each equation using the methods of Chapter 2. We write x(t)=v1ξ1(t)++vnξn(t), and we are done; we have a particular solution. If we have found the general solution for ξ1 through ξ2, then again x(t)=v1ξ1(t)++vnξn(t) is the general solution (and not just a particular solution).

Adapted from Differential Equations for Engineers by Jiří Lebl (Oklahoma State University), hosted on LibreTexts (math.libretexts.org) and licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.