43
An introduction to linear ordinary differential equations with constant coefficients using the impulsive response method and factorization. Roberto Camporesi Dipartimento di Scienze Matematiche, Politecnico di Torino Corso Duca degli Abruzzi 24, 10129 Torino Italy e-mail: [email protected] September 16, 2015 Abstract We present an approach to the impulsive response method for solving linear constant-coefficient ordinary differential equations of any order based on the fac- torization of the differential operator. The approach is elementary, we only assume a basic knowledge of calculus and linear algebra. In particular, we avoid the use of distribution theory, as well as of the other more advanced approaches: Laplace transform, linear systems, the general theory of linear equations with variable co- efficients and variation of parameters. The approach presented here can be used in a first course on differential equations for science and engineering majors. Contents 1 Introduction 2 2 The case n =1 5 3 The case n =2 7 4 The general case 20 5 Explicit formulas for the impulsive response 27 6 The method of undetermined coefficients 39 1

An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

An introduction to linear ordinary

differential equations with constant

coefficients using the impulsive response

method and factorization.

Roberto CamporesiDipartimento di Scienze Matematiche, Politecnico di Torino

Corso Duca degli Abruzzi 24, 10129 Torino Italye-mail: [email protected]

September 16, 2015

Abstract

We present an approach to the impulsive response method for solving linearconstant-coefficient ordinary differential equations of any order based on the fac-torization of the differential operator. The approach is elementary, we only assumea basic knowledge of calculus and linear algebra. In particular, we avoid the useof distribution theory, as well as of the other more advanced approaches: Laplacetransform, linear systems, the general theory of linear equations with variable co-efficients and variation of parameters. The approach presented here can be used ina first course on differential equations for science and engineering majors.

Contents

1 Introduction 2

2 The case n = 1 5

3 The case n = 2 7

4 The general case 20

5 Explicit formulas for the impulsive response 27

6 The method of undetermined coefficients 39

1

Page 2: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

1 Introduction

In view of their many applications in various fields of science and engineering, linearconstant-coefficient differential equations constitute an important chapter in the theoryand application of ordinary differential equations.

In introductory courses on differential equations, the treatment of second or higherorder non-homogeneous equations is usually limited to illustrating the method of unde-termined coefficients. Using this, one finds a particular solution when the forcing termis a polynomial, an exponential, a sine or a cosine, or a product of terms of this kind.

It is well known that the impulsive response method gives an explict formula for aparticular solution in the more general case in which the forcing term is an arbitrarycontinuous function. This method is generally regarded as too difficult to implement ina first course on differential equations. Students become aware of it only later, as anapplication of the theory of the Laplace transform [5] or of distribution theory [6].

An alternative approach which is sometimes used consists in developing the theoryof linear systems first, considering then linear equations of order n as a particular caseof this theory. The problem with this approach is that one needs to “digest” the theoryof linear systems, with all the issues related to the diagonalization of matrices and theJordan form ([3], chapter 3).

Another approach is by the general theory of linear equations with variable coeffi-cients, with the notion of Wronskian and the method of the variation of constants. Thisapproach can be implemented also in the case of constant coefficients ([4], chapter 2).However in introductory courses, the variation of constants method is often limited tofirst-order equations. Moreover, this method may be very long to implement in specificcalculations, even for rather simple equations. Finally, within this approach, the occur-rence of the particular solution as a convolution integral is rather indirect, and appearsonly at the end of the theory (see, for example, [4], exercise 4 p. 89).

The purpose of these notes is to give an elementary presentation of the impulsiveresponse method using only very basic results from linear algebra and calculus in one ormany variables.

We write the n-th order equation in the form

y(n) + a1 y(n−1) + a2 y(n−2) + · · ·+ an−1 y′ + an y = f(x), (1.1)

where we use the notation y(x) in place of x(t) or y(t), y(k) denotes as usual the derivativeof order k of y, a1, a2, . . . , an are complex constants, and the forcing term f is a complex-valued continuous function in an interval I. When f 6= 0 the equation is called non-homogeneous. When f = 0 we get the associated homogeneous equation

y(n) + a1 y(n−1) + a2 y(n−2) + · · ·+ an−1 y′ + an y = 0. (1.2)

The basic tool of our investigation is the so called impulsive response. This is thefunction defined as follows. Let p(λ) = λn + a1λ

n−1 + · · · + an−1λ + an (λ ∈ C) be thecharacteristic polynomial, and let λ1, . . . , λn ∈ C be the roots of p(λ) (not necessarilydistinct, each counted with its multiplicity). We define the impulsive response g = gλ1···λn

2

Page 3: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

recursively by the following formulas: for n = 1 we set gλ1(x) = eλ1x, for n ≥ 2 we set

gλ1···λn(x) = eλnx

∫ x

0

e−λntgλ1···λn−1(t) dt (x ∈ R). (1.3)

It turns out that g solves the homogeneous equation (1.2) with the initial conditions

y(0) = y′(0) = · · · = y(n−2)(0) = 0, y(n−1)(0) = 1.

Moreover, the impulsive response allows one to solve the non-homogeneous equation withan arbitrary continuous forcing term and with arbitrary initial conditions. Indeed, if gdenotes the impulsive response of order n and if 0 ∈ I, we shall see that the generalsolution of (1.1) in the interval I can be written as

y = yp + yh,

where the function yp is given by the convolution integral

yp(x) =

∫ x

0

g(x − t)f(t) dt, (1.4)

and solves (1.1) with trivial initial conditions at the point x = 0 (i.e., y(k)p (0) = 0 for

k = 0, 1, . . . , n − 1), whereas the function

yh(x) =n−1∑

k=0

ck g(k)(x) (1.5)

gives the general solution of the associated homogeneous equation (1.2) as the coefficientsck vary in C. In other words, the n functions g, g′, g′′, . . . , g(n−1) are linearly independentsolutions of this equation and form a basis of the vector space of its solutions.

We will begin with the case of first-order equations, in which (1.4) and (1.5) are easilyproved, proceed with the basic case of second-order equations, and treat finally the caseof arbitrary n. For simplicity, we start our discussion for n = 1, 2 with the case of realcoefficients (i.e., a1, . . . , an ∈ R in (1.1) and (1.2)), and real-valued forcing terms. Thesame techniques and proofs apply to the case of complex coefficients and complex-valuedforcing terms. The complex notation will be useful to treat the case n > 2 by induction onn. For n ≥ 2 we will not assume, a priori, existence, uniqueness, and extendability of thesolutions of a linear initial value problem (homogeneous or not). We shall rather provethese facts directly, in the case of constant coefficients, by obtaining explicit formulas forthe solutions.

The proof of (1.4) that we give is by induction on n and is based on the factorizationof the differential operator acting on y in (1.1) into first-order factors, along with theformula for solving first-order linear equations. It requires, moreover, the interchangeof the order of integration in a double integral, that is, the Fubini theorem. The proofis constructive in that it directly produces the particular solution yp as a convolutionintegral between the impulsive response g and the forcing term f . In particular if wetake f = 0, we get that the unique solution of the homogeneous initial value problem with

3

Page 4: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

all vanishing initial data is the zero function. This implies immediately the uniquenessof the initial value problem (homogeneous or not) with arbitrary initial data.

We remark that in the usual approach to linear equations with constant coefficients,the proof of uniqueness relies on an estimate for the rate of growth of any solution y ofthe homogeneous equation, together with its derivatives y′, y′′, . . . , y(n−1), in terms of thecoefficients a1, a2, . . . , an in (1.2) (see, e.g., [4], chapter 2, Theorems 13 and 14).

As regards (1.5), one can give a similar proof by induction on n using factorization.We shall rather prove (1.5) by computing the linear relationship between the coefficients

ck and the initial data bk = y(k)(0) = y(k)h (0) for any given n. If x0 is any point of I, we

can just replace∫ x

0with

∫ x

x0in (1.4), and g(k)(x) with g(k)(x− x0) in (1.5). The function

yp satisfies then y(k)p (x0) = 0 for 0 ≤ k ≤ n − 1, and the relationship between ck and

bk = y(k)(x0) = y(k)h (x0) remains the same as before.

We will then look for explicit formulas for the impulsive response g. For n = 1 g isan exponential, for n = 2 it is easily computed. For generic n one can use the recursiveformula (1.3) to compute g at any prescribed order. A simple formula is obtained forn = 3, or, for generic n, in the case when the roots of p(λ) are all equal or all different.In the general case we prove by induction on k that if λ1, . . . , λk are the distinct rootsof p(λ), of multiplicities m1, . . . , mk, then there exist polynomials G1, . . . , Gk, of degreesm1 − 1, . . . , mk − 1, such that

g(x) =

k∑

j=1

Gj(x)eλjx. (1.6)

An explicit formula for the polynomials Gj is obtained. To this end, we first rewritethe impulsive response g from formula (1.3) as a convolution between the functionsxm1−1eλ1x, . . . , xmk−1eλkx (using commutativity and associativity of convolution). Thenwe prove a formula for the convolution of xpebx and xqecx (with p, q ∈ N and b 6= c)by elementary calculus. Using this formula in the previously mentioned formula for gand iterating gives the result (1.6). The polynomial G1 is expressed as a (k − 1)-timesiterated sum of monomials whose coefficients are ratios of binomial coefficients and powersof (λ1 − λj), j 6= 1. The polynomials Gj for j ≥ 2 are obtained by exchanging λ1 ↔ λj

and m1 ↔ mj in this formula.We will ultimately give the formula for the polynomials Gj based on the partial

fraction expansion of 1/p(λ). This formula can be proved by induction, but it is mosteasily proved using the Laplace transform or distribution theory.

Using (1.6) in (1.5) gives the well known formula for the general solution of (1.2)in terms of the complex exponentials eλjx. The case of real coefficients follows easilyfrom this result (see section 5). Using (1.6) in (1.4) gives a simple proof of the methodof undetermined coefficients in the case when f(x) = P (x)eλ0x, where P is a complexpolynomial and λ0 ∈ C (see section 6).

Several examples with worked-out solutions are given throughout the paper. We alsopropose some exercises to complement the main text and to get acquainted with theimpulsive response method.

This paper is an outgrowth of [1, 2]. In [1] the method of factorization was illustratedfor second-order equations, but the general case only outlined. In [2] we treated equations

4

Page 5: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

of arbitrary order n, but we avoided the extensive use of convolution in order to makethe paper as readable as possible. Thus we could not prove formula (1.6) and the relatedformulas for the polynomials Gj. This is remedied in the present paper.

2 The case n = 1

Consider the linear first-order differential equation

y′ + ay = f(x), (2.1)

where y′ = dy

dx, a is a real constant, and the forcing term f is a real-valued continuous

function in an interval I ⊂ R. It is well known that the general solution of (2.1) is givenby

y(x) = e−ax

eaxf(x) dx, (2.2)

where∫

eaxf(x) dx denotes the set of all primitives of the function eaxf(x) in the intervalI (i.e., its indefinite integral). Suppose that 0 ∈ I, and consider the integral function∫ x

0eatf(t) dt. By the Fundamental Theorem of Calculus, this is the primitive of eaxf(x)

that vanishes at 0. The theorem of the additive constant for primitives implies that

eaxf(x) dx =

∫ x

0

eatf(t) dt + k (k ∈ R),

and we can rewrite (2.2) in the form

y(x) = e−ax

∫ x

0

eatf(t) dt + ke−ax

=

∫ x

0

e−a(x−t)f(t) dt + ke−ax

=

∫ x

0

g(x − t)f(t) dt + kg(x), (2.3)

where g(x) = e−ax. The function g is called the impulsive response of the differentialequation y′ + ay = 0. It is the unique solution of the initial value problem

{

y′ + ay = 0y(0) = 1.

Formula (2.3) illustrates a well known result in the theory of linear differential equa-tions. Namely, the general solution of (2.1) is the sum of the general solution of theassociated homogeneous equation y′ + ay = 0 and of any particular solution of (2.1). In(2.3) the function

yp(x) =

∫ x

0

g(x − t)f(t) dt (2.4)

is the particular solution of (2.1) that vanishes at x = 0.

5

Page 6: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

If x0 is any point of I, it is easy to verify that

y(x) =

∫ x

x0

g(x − t)f(t) dt + y0 g(x − x0) (x ∈ I)

is the unique solution of (2.1) in the interval I that satisfies y(x0) = y0 (y0 ∈ R).As we shall see, formula (2.4) gives a particular solution of the non-homogeneous

equation also in the case of higher-order linear constant-coefficient differential equations,by suitably defining the impulsive response g.

Remark 1: the convolution. To better understand the structure of the particularsolution (2.4), let us recall that if h1 and h2 are suitable functions (for example if h1 andh2 are piecewise continuous on R with h1 bounded and h2 absolutely integrable over R,or if h1 and h2 are two signals, that is, they are piecewise continuous on R and vanishfor x < 0), then their convolution h1 ∗ h2 is defined as

h1 ∗ h2 (x) =

∫ +∞

−∞

h1(x − t)h2(t) dt.

The change of variables x − t = s shows that convolution is commutative:

h1 ∗ h2 (x) = h2 ∗ h1 (x) =

∫ +∞

−∞

h1(s)h2(x − s) ds.

Moreover, one can show that convolution is associative: (h1 ∗ h2) ∗ h3 = h1 ∗ (h2 ∗ h3).If h1 and h2 are two signals, it is easy to verify that h1 ∗ h2 is also a signal and that

for any x ∈ R one has

h1 ∗ h2 (x) =

∫ x

0

h1(x − t)h2(t) dt.

In a similar way, if h1 and h2 vanish for x > 0, the same holds for h1 ∗ h2 and we have

h1 ∗ h2 (x) =

∫ 0

x

h1(x − t)h2(t) dt.

If θ denotes the Heaviside step function, given by

θ(x) =

{

1 if x ≥ 00 if x < 0,

and if we let

θ(x) = −θ(−x) =

{

0 if x > 0−1 if x ≤ 0,

then for any two functions g and f we have∫ x

0

g(x − t)f(t) dt =

{

θg ∗ θf (x) if x ≥ 0

−θg ∗ θf (x) if x ≤ 0.(2.5)

In other words, the integral∫ x

0g(x − t)f(t) dt is the convolution of θg and θf for

x ≥ 0, it is the opposite of the convolution of θg and θf for x ≤ 0.

6

Page 7: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

3 The case n = 2

Consider the second-order non-homogeneous linear differential equation

y′′ + ay′ + by = f(x), (3.1)

where y′′ = d2y

dx2 , a, b are real constants, and the forcing term f is a real-valued contin-uous function in an interval I ⊂ R, i.e., f ∈ C0(I). For f = 0 we get the associatedhomogeneous equation

y′′ + ay′ + by = 0. (3.2)

We will write (3.1) and (3.2) in operator form as Ly = f(x) and Ly = 0, where L is thelinear second-order differential operator with constant coefficients defined by

Ly = y′′ + ay′ + by,

for any function y at least twice differentiable. Denoting by ddx

the differentiation opera-tor, we have

L =(

ddx

)2+ a d

dx+ b. (3.3)

L defines a map C2(R) → C0(R) that to each real-valued function y at least twicedifferentiable over R with continuous second derivative associates the continuous functionLy. The fundamental property of L is its linearity, that is,

L(c1y1 + c2y2) = c1Ly1 + c2Ly2, (3.4)

∀c1, c2 ∈ R, ∀y1, y2 ∈ C2(R). This formula implies some important facts. First, if y1 andy2 are any two solutions of the homogeneous equation on R, then any linear combinationc1y1 + c2y2 is also a solution of this equation on R. In other words, the set

V = {y ∈ C2(R) : Ly = 0}

is a real vector space. We will prove that dim V = 2. Note that if y ∈ V , then y ∈ C∞(R),as follows from (3.2) by isolating y′′ and differentiating any number of times.

Secondly, if y1 and y2 are two solutions of (3.1) on a given interval I ′ ⊂ I, then theirdifference y1 − y2 solves (3.2). It follows that if we know a particular solution yp of thenon-homogeneous equation on an interval I ′, then any other solution of (3.1) on I ′ isgiven by yp + yh, where yh is a solution of the associated homogeneous equation. Weshall see that the solutions of (3.1) are defined on the whole of the interval I on which fis continuous (and are of course of class C2 there).

The fact that L has constant coefficients (i.e., a and b in (3.3) are constants) allowsone to find explicit formulas for the solutions of (3.1) and (3.2). To this end, it is usefulto consider complex-valued functions, y : R → C. If y = y1 + iy2 (with y1, y2 : R → R) issuch a function, the derivative y′ may be defined by linearity as y′ = y′

1 + iy′2. It follows

that L(y1 + iy2) = Ly1 + iLy2. In a similar way one defines the integral of y:

y(x) dx =

y1(x) dx + i

y2(x) dx,

∫ d

c

y(x) dx =

∫ d

c

y1(x) dx + i

∫ d

c

y2(x) dx.

7

Page 8: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

The theorem of the additive constant for primitives and the Fundamental Theorem ofCalculus extend to complex-valued functions.

It is then easy to verify, using either Euler’s formula or the series expansion of theexponential function and differentiation term by term, that

ddx

eλx = λeλx, ∀λ ∈ C.

It follows that Leλx = (λ2 + aλ + b)eλx, and the complex exponential eλx is a solution of(3.2) if and only if λ is a root of the characteristic polynomial p(λ) = λ2 + aλ + b. Letλ1, λ2 ∈ C be the roots of p(λ), so that

p(λ) = (λ − λ1)(λ − λ2).

The operator L factors in a similar way as a product (composition) of first-order differ-ential operators:

L =(

ddx

− λ1

) (

ddx

− λ2

)

. (3.5)

Indeed we have

(

ddx

− λ1

) (

ddx

− λ2

)

y =(

ddx

− λ1

)

(y′ − λ2y)

= y′′ − (λ1 + λ2)y′ + λ1λ2y,

which coincides with Ly since λ1 + λ2 = −a, and λ1λ2 = b. Note that in (3.5) theorder with which the two factors are composed is unimportant. In other words, the twooperators ( d

dx− λ1) and ( d

dx− λ2) commute:

(

ddx

− λ1

) (

ddx

− λ2

)

=(

ddx

− λ2

) (

ddx

− λ1

)

.

The idea is now to use (3.5) to reduce the problem to first-order differential equa-tions. It is useful to consider linear differential equations with complex coefficients, whosesolutions will be, in general, complex-valued. For example the first-order homogeneousequation y′ − λy = 0 with λ ∈ C has the general solution

y(x) = k eλx (k ∈ C).

(Indeed if y′ = λy, then ddx

(

y(x)e−λx)

= 0, whence y(x)e−λx = k.) The first-ordernon-homogeneous equation

y′ − λy =(

ddx

− λ)

y = f(x) (λ ∈ C),

with complex-valued forcing term f : I ⊂ R → C continuous in I ∋ 0, has the generalsolution

y(x) = eλx

e−λxf(x)dx

= eλx

∫ x

0

e−λtf(t)dt + k eλx

=

∫ x

0

gλ(x − t)f(t) dt + k gλ(x) (x ∈ I, k = y(0) ∈ C). (3.6)

8

Page 9: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

Here gλ(x) = eλx is the impulsive response of the differential operator ( ddx

− λ). It is the(unique) solution of y′ − λy = 0, y(0) = 1. Formula (3.6) can be proved as (2.3) in thereal case. In particular, the solution of the first-order problem

{

y′ − λy = f(x)y(0) = 0

(λ ∈ C) is unique and is given by

y(x) =

∫ x

0

eλ(x−t)f(t) dt. (3.7)

The following result gives a particular solution of (3.1) as a convolution integral.

Theorem 3.1. Let f ∈ C0(I), and suppose that 0 ∈ I. Then the initial value problem

{

y′′ + ay′ + by = f(x)y(0) = 0, y′(0) = 0

(3.8)

has a unique solution, defined on the whole of I, and given by the formula

y(x) =

∫ x

0

g(x − t)f(t) dt (x ∈ I), (3.9)

where g is the function defined by

g(x) =

∫ x

0

eλ2(x−t)eλ1t dt (x ∈ R). (3.10)

In particular if we take f = 0, we get that the only solution of the homogeneous problem

{

y′′ + ay′ + by = 0y(0) = 0, y′(0) = 0

(3.11)

is the zero function y = 0.

Proof. We rewrite the differential equation (3.1) in the form

(

ddx

− λ1

) (

ddx

− λ2

)

y = f(x).

Lettingh =

(

ddx

− λ2

)

y = y′ − λ2y,

we see that y solves the problem (3.8) if and only if

h solves

{

h′ − λ1h = f(x)h(0) = 0

and y solves

{

y′ − λ2y = h(x)y(0) = 0.

From (3.7) we have

h(x) =

∫ x

0

eλ1(x−t)f(t) dt,

9

Page 10: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

y(x) =

∫ x

0

eλ2(x−t)h(t) dt.

Substituting h from the first formula into the second, we obtain y(x) as a repeatedintegral (for any x ∈ I):

y(x) =

∫ x

0

eλ2(x−t)

(∫ t

0

eλ1(t−s)f(s) ds

)

dt. (3.12)

To fix ideas, let us suppose that x > 0. Then in the integral with respect to t we have0 ≤ t ≤ x, whereas in the integral with respect to s we have 0 ≤ s ≤ t. We can thenrewrite y(x) as a double integral:

y(x) = eλ2x

Tx

e(λ1−λ2)t e−λ1s f(s) ds dt,

where Tx is the triangle in the (s, t) plane defined by 0 ≤ s ≤ t ≤ x, with vertices at thepoints (0, 0), (0, x), (x, x). In (3.12) we first integrate with respect to s and then withrespect to t. Since the triangle Tx is convex both horizontally and vertically, and sincethe integrand function

F (s, t) = e(λ1−λ2)t e−λ1s f(s)

is continuous in Tx, we can interchange the order of integration and integrate with respectto t first. Given s (between 0 and x) the variable t in Tx varies between s and x, see thepicture below.

x

x

0

s = t

s

t

sbtbx

We thus obtain

y(x) =

∫ x

0

(∫ x

s

eλ2(x−t)eλ1(t−s) dt

)

f(s) ds.

10

Page 11: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

By substituting t with t + s in the integral with respect to t we finally get

y(x) =

∫ x

0

(∫ x−s

0

eλ2(x−s−t)eλ1t dt

)

f(s) ds (3.13)

=

∫ x

0

g(x− s)f(s) ds,

which is (3.9). For x < 0 we can reason in a similar way and we get the same result.

The integral in formula (3.10) can be computed exactly as in the real field. We obtainthe following expression of the function g:

1) if λ1 6= λ2 (⇔ ∆ = a2 − 4b 6= 0) then

g(x) = 1λ1−λ2

(

eλ1x − eλ2x)

; (3.14)

2) if λ1 = λ2 (⇔ ∆ = 0) then

g(x) = x eλ1x. (3.15)

Note that g is always a real function. Letting α = −a/2 and

β =

{ √−∆/2 if ∆ < 0√∆/2 if ∆ > 0,

so that λ1,2 =

{

α ± iβ if ∆ < 0α ± β if ∆ > 0,

we have

g(x) =

{

12iβ

(

e(α+iβ)x − e(α−iβ)x)

= 1β

eαx sin(βx) if ∆ < 012β

(

e(α+β)x − e(α−β)x)

= 1β

eαx sh(βx) if ∆ > 0.(3.16)

Also notice that g ∈ C∞(R).It is easy to check that g solves the following homogeneous initial value problem:

{

y′′ + ay′ + by = 0y(0) = 0, y′(0) = 1.

(3.17)

Conversely, if y solves (3.17) then y = g given by (3.10). This is proved using (3.5)-(3.6)and reasoning as in the proof of Theorem 3.1. The function g is called the impulsiveresponse of the differential operator L. The name comes from the initial conditions in(3.17), namely g(0) = 0, g′(0) = 1.

Remark 2: the impulsive response as a convolution. Denoting g by gλ1λ2 andrecalling (2.5), we can rewrite (3.10) in the suggestive form

gλ1λ2(x) =

∫ x

0

gλ2(x − t)gλ1(t) dt =

{

θgλ2 ∗ θgλ1 (x) if x ≥ 0

−θgλ2 ∗ θgλ1 (x) if x ≤ 0,(3.18)

showing that g is symmetric in λ1 ↔ λ2. This formula relates the (complex) first-orderimpulsive responses to the impulsive response of order 2, and will be generalized, insection 5, to linear equations of order n (cf. (5.2)). We also observe that the proof of

11

Page 12: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

Theorem 3.1 can be simplified, at least at a formal level, by rewriting (3.12) in convolutionform (for example for x ≥ 0) and then using the associativity of this:

y(x) = θgλ2 ∗ (θgλ1 ∗ θf ) (x) = (θgλ2 ∗ θgλ1 ) ∗ θf (x). (3.19)

This is just the equality (3.12)=(3.13) for x ≥ 0. The interchange of the order of integra-tion in the double integral considered above is then equivalent to the associative propertyof convolution for signals. Now (3.19) and (3.18) imply (3.9) for x ≥ 0.

It is interesting to verify directly that the function y given by (3.9) solves (3.1). Firstlet us prove the following formula for the derivative y′:

y′(x) =d

dx

∫ x

0

g(x− t)f(t) dt

= g(0)f(x) +

∫ x

0

g′(x − t)f(t) dt (x ∈ I). (3.20)

Indeed, given h such that x + h ∈ I, we have

y(x + h) − y(x)

h=

1

h

(∫ x+h

0

g(x + h − t)f(t) dt −∫ x

0

g(x − t)f(t) dt

)

. (3.21)

As g ∈ C2(R), we can apply Taylor’s formula with the Lagrange remainder

g(x0 + h) = g(x0) + g′(x0)h + 12g′′(ξ)h2

at the point x0 = x − t, where ξ is some point between x0 and x0 + h. Substituting thisin (3.21) and using

∫ x+h

0

g(x − t)f(t) dt =

∫ x

0

g(x− t)f(t) dt +

∫ x+h

x

g(x − t)f(t) dt,

gives

1

h(y(x + h) − y(x)) =

1

h

∫ x+h

x

g(x − t)f(t) dt +

∫ x+h

0

g′(x − t)f(t) dt

+1

2h

∫ x+h

0

g′′(ξ)f(t) dt, (3.22)

for some ξ between x − t and x − t + h. When h tends to zero, the first term in theright-hand side of (3.22) tends to g(0)f(x), by the Fundamental Theorem of Calculus.The second term in (3.22) tends to

∫ x

0g′(x − t)f(t) dt, by the continuity of the integral

function. Finally, the third term tends to zero, since the integral that occurs in it is abounded function of h in a neighborhood of h = 0. (This is easy to prove.) We thusobtain formula (3.20). Recalling that g(0) = 0, we finally get

y′(x) =

∫ x

0

g′(x − t)f(t) dt (x ∈ I).

12

Page 13: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

In the same way we compute the second derivative:

y′′(x) =

(

d

dx

)2 ∫ x

0

g(x − t)f(t) dt

=d

dx

∫ x

0

g′(x − t)f(t) dt

= g′(0)f(x) +

∫ x

0

g′′(x − t)f(t) dt

= f(x) +

∫ x

0

g′′(x − t)f(t) dt,

where we used g′(0) = 1. It follows that

y′′(x) + ay′(x) + by(x) = f(x) +

∫ x

0

(g′′ + ag′ + bg)(x − t) f(t) dt

= f(x), ∀x ∈ I,

g being a solution of the homogeneous equation. Therefore the function y given by (3.9)solves (3.1) in the interval I. The initial conditions y(0) = 0 = y′(0) are immediatelyverified.

We now come to the solution of the initial value problem with arbitrary initial dataat the point x = 0.

Theorem 3.2. Let f ∈ C0(I), 0 ∈ I, and let y0, y′0 be two arbitrary real numbers. Then

the initial value problem{

y′′ + ay′ + by = f(x)y(0) = y0, y′(0) = y′

0

(3.23)

has a unique solution, defined on the whole of I, and given by

y(x) =

∫ x

0

g(x − t)f(t) dt + (y′0 + ay0) g(x) + y0 g′(x) (x ∈ I). (3.24)

In particular (taking f = 0), the solution of the homogeneous problem{

y′′ + ay′ + by = 0y(0) = y0, y′(0) = y′

0

(3.25)

is unique, of class C∞ on the whole of R, and is given by

yh(x) = (y′0 + ay0) g(x) + y0 g′(x) (x ∈ R). (3.26)

Proof. The uniqueness of the solutions of the problem (3.23) follows from the fact thatif y1 and y2 both solve (3.23), then their difference y = y1 − y2 solves the problem (3.11),whence y = 0 by Theorem 3.1. Now notice that the function g′ satisfies the homogeneousequation (like g). Indeed, since L has constant coefficients, we have

Lg′ = L ddx

g =[

(

ddx

)2+ a d

dx+ b]

ddx

g = ddx

Lg = 0.

13

Page 14: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

By the linearity of L and by Theorem 3.1 it follows that the function y given by (3.24)satisfies (Ly)(x) = f(x), ∀x ∈ I. It is immediate that y(0) = y0. Finally, since

y′(x) =

∫ x

0

g′(x − t)f(t) dt + (y′0 + ay0) g′(x) + y0 g′′(x),

we have

y′(0) = y′0 + ay0 + y0 g′′(0)

= y′0 + ay0 + y0(−a g′(0) − b g(0))

= y′0.

It is also possible to give a constructive proof, analogous to that of Theorem 3.1. Indeed,by proceeding as in the proof of this theorem and using (3.6), we find that y solves theproblem (3.23) if and only if y is given by

y(x) =

∫ x

0

g(x − s)f(s) ds + (y′0 − λ2 y0) g(x) + y0e

λ2x.

This formula agrees with (3.24) in view of the equality eλ2x = g′(x) − λ1g(x), whichfollows from (3.17) and (3.5) by observing that the function h(x) = g′(x)−λ1g(x) solves(

ddx

− λ2

)

h = 0, h(0) = 1.

By imposing the initial conditions at an arbitrary point of the interval I, we get thefollowing result.

Theorem 3.3. Let f ∈ C0(I), x0 ∈ I, y0, y′0 ∈ R. The solution of the initial value

problem{

y′′ + ay′ + by = f(x)y(x0) = y0, y′(x0) = y′

0

(3.27)

is unique, it is defined on the whole of I, and is given by

y(x) =

∫ x

x0

g(x− t)f(t) dt + (y′0 + ay0) g(x − x0) + y0 g′(x − x0) (x ∈ I). (3.28)

In particular (taking f = 0), the solution of the homogeneous problem

{

y′′ + ay′ + by = 0y(x0) = y0, y′(x0) = y′

0,(3.29)

with x0 ∈ R arbitrary, is unique, of class C∞ on the whole of R, and is given by

yh(x) = (y′0 + ay0) g(x − x0) + y0 g′(x − x0) (x ∈ R). (3.30)

Proof. Let y be a solution of the problem (3.27), and let τx0 denote the translation mapdefined by τx0(x) = x + x0. Set

y(x) = y ◦ τx0(x) = y(x + x0).

14

Page 15: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

Since the differential operator L has constant coefficients, it is invariant under transla-tions, that is,

L(y ◦ τx0) = (Ly) ◦ τx0.

It follows that(Ly)(x) = (Ly)(x + x0) = f(x + x0).

Since moreover y(0) = y(x0) = y0, y′(0) = y′(x0) = y′0, we see that y solves the problem

(3.27) in the interval I if and only if y solves the initial value problem

{

y′′ + ay′ + by = f(x)y(0) = y0, y′(0) = y′

0

in the translated interval I − x0 = {t− x0 : t ∈ I} and with the translated forcing termf(x) = f(x + x0). By Theorem 3.2 we have that y is unique and is given by

y(x) =

∫ x

0

g(x− s)f(s) ds + (y′0 + ay0) g(x) + y0 g′(x).

Therefore y is also unique and is given by

y(x) = y(x− x0) =

∫ x−x0

0

g(x− x0 − s)f(s + x0) ds + (y′0 + ay0) g(x− x0) + y0 g′(x− x0).

Formula (3.28) follows immediately from this by making the change of variable s+x0 = tin the integral with respect to s.

Substitution of (3.15) and (3.16) in (3.30) yields the following formula for the solutionof the homogeneous problem (3.29):

yh(x) =

y0eα(x−x0) cos β(x − x0) + 1

β(y′

0 − αy0)eα(x−x0) sin β(x − x0) if ∆ < 0

y0eα(x−x0)ch β(x − x0) + 1

β(y′

0 − αy0)eα(x−x0)sh β(x − x0) if ∆ > 0

eα(x−x0)[

y0 + (y′0 − αy0)(x − x0)

]

if ∆ = 0,(3.31)

where for ∆ = 0 we let α = λ1 (so that, in all cases, α = −a/2). Note the similaritybetween the solutions with ∆ 6= 0, where the trigonometric functions for ∆ < 0 arereplaced by the hyperbolic ones for ∆ > 0. Also note that for β → 0, both solutions with∆ 6= 0 go over to the solution with ∆ = 0.

Remark 3: existence, uniqueness and extendability of the solutions. It is wellknown that a linear initial value problem with variable coefficients (homogeneous or not)has a unique solution defined on the entire interval I in which the coefficients and theforcing term are continuous (on the whole of R in the homogeneous constant-coefficientcase). (See, e.g., [4], Theorems 1 and 3 pp. 104-105, for the homogeneous variable-coefficient case.) Now theorems 3.1, 3.2 and 3.3 give an elementary proof of this fact(together with an explicit formula for the solution) for a linear second-order problemwith constant coefficients.

15

Page 16: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

Corollary 3.4. Let f ∈ C0(I) and let x0 ∈ I be fixed. Every solution y of Ly = f(x) inthe interval I can be written as y = yp + yh, where

yp(x) =

∫ x

x0

g(x − t)f(t) dt (3.32)

solves (3.1) with the initial conditions yp(x0) = y′p(x0) = 0, and yh is the solution of the

homogeneous equation (3.2) such that yh(x0) = y(x0), y′h(x0) = y′(x0).

Proof. Let y be any solution of (3.1) in I, and let y0 = y(x0), y′0 = y′(x0). Then y

solves the problem (3.27), so by uniqueness y is given by (3.28). Thus y = yp + yh, whereyp, given by (3.32), solves (3.1) with trivial initial conditions at x0, and yh, given by(3.30)-(3.31), solves (3.2) with the same initial conditions as y at x0.

Corollary 3.5. The set V of real solutions of the homogeneous equation (3.2) on R is areal vector space of dimension 2, and the two functions g, g′ form a basis of V .

Proof. Let y be a real solution of (3.2) on R. Let y0 = y(0), y′0 = y′(0), and define yh

by formula (3.26). Then y and yh both satisfy (3.25), whence y = yh by Theorem 3.2.Note that y ∈ C∞(R). We conclude by (3.26) that every element of the vector space Vcan be written as a linear combination of g and g′ in a unique way. (The coefficientsin this combination are uniquely determined by the initial data at the point x = 0.) Inparticular, this holds for the trivial solution y(x) = 0 ∀x, i.e., cg(x) + dg′(x) = 0 forc, d ∈ R and ∀x, implies c = d = 0. Thus g and g′ are linearly independent and form abasis of V .

Another basis of V can be obtained from the following result and its corollary.

Theorem 3.6. Every complex solution of the homogeneous equation Ly = 0 can bewritten in the form y = c1y1 + c2y2 (c1, c2 ∈ C), where y1 and y2 are given by

(y1(x), y2(x)) =

{ (

eλ1x, eλ2x)

if λ1 6= λ2(

eλ1x, xeλ1x)

if λ1 = λ2.

Conversely, any function of this form is a solution of Ly = 0.

Proof 1. This proof does not use the impulsive response but only factorization. Itcan be used to give an independent proof of existence and uniqueness for the solutionsof the homogeneous initial value problem (3.29). (The constants c1, c2 can be uniquelydetermined in terms of y0, y

′0.)

By (3.5), we rewrite the homogeneous differential equation (3.2) in the form

Ly =(

ddx

− λ1

) (

ddx

− λ2

)

y = 0.

We now argue as in the proof of Theorem 3.1. Letting h =(

ddx

− λ2

)

y = y′ − λ2y, wesee that y solves Ly = 0 if and only if

{

h′ − λ1h = 0y′ − λ2y = h(x)

⇐⇒{

h(x) = keλ1x (k ∈ C)y′ − λ2y = keλ1x.

16

Page 17: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

By formula (2.2) (which gives the general solution of (2.1) also for a ∈ C, cf. (3.6)), weget that y solves Ly = 0 if and only if y is given by

y(x) = eλ2x

e−λ2x keλ1x dx

= keλ2x

e(λ1−λ2)x dx

=

{

keλ2x(x + k′) if λ1 = λ2

keλ2x(

e(λ1−λ2)x

λ1−λ2+ k′

)

if λ1 6= λ2

=

{

c1eλ1x + c2xeλ1x if λ1 = λ2

c1eλ1x + c2e

λ2x if λ1 6= λ2,

where k′ ∈ C, and we have set c1 = kk′, c2 = k for λ1 = λ2, and c1 = kλ1−λ2

, c2 = kk′ forλ1 6= λ2. This proves the first part of the Theorem. The converse part also follows fromthis. Indeed for λ1 6= λ2 we already know that y1 and y2 solve Ly = 0 so by (complex)linearity, any linear combination c1y1 + c2y2 with c1, c2 ∈ C is a solution of Ly = 0. Forλ1 = λ2 we know that y1(x) = eλ1x is a solution of Ly = 0. Taking k = 1, k′ = 0 in theprevious formulae, we see that y2(x) = xeλ1x is also a solution of Ly = 0, so the resultfollows by linearity.

Proof 2. This proof uses the impulsive response and is well suited for generalization tohigher-order equations.

We observe that any complex solution of Ly = 0 on R can be written as a complexlinear combination of g and g′ in a unique way. Indeed if y = Re y + iIm y solvesLy = 0, then L(Re y) = 0 = L(Im y), since L has real coefficients. By Corollary 3.5,Re y and Im y are unique real linear combinations of g and g′, so y is a unique complexlinear combination of g and g′. In particular, the set VC of complex solutions of thehomogeneous equation Ly = 0 on R is a complex vector space of dimension 2, with abasis given by {g, g′}. Now by (3.14) and (3.15) we see that any linear combination of gand g′ can be rewritten as a linear combination of y1 and y2. Indeed if y = cg + dg′ withc, d ∈ C, then y = c1y1 + c2y2, where

{

c1 = c+dλ1

λ1−λ2, c2 = c+dλ2

λ2−λ1for λ1 6= λ2

c1 = d, c2 = c + dλ1 for λ1 = λ2.

The converse part follows by verifying that y1 and y2 solve Ly = 0. The case λ1 6= λ2

is clear. If λ1 = λ2 then L =(

ddx

− λ1

)2by (3.5), and not only Ly1 = 0, but also

Ly2(x) =(

ddx

− λ1

) [(

ddx

− λ1

) (

xeλ1x)]

=(

ddx

− λ1

)

eλ1x = 0.

Note that in this case, y2 is just the impulsive response g.

Corollary 3.7. If λ1 and λ2 are real, then the functions y1 and y2 form a basis of V . Ifλ1,2 = α ± iβ with β 6= 0, then a basis of V is given by the functions

y1(x) = Re y1(x) = eαxcos βx, y2(x) = Im y1(x) = eαxsin βx.

17

Page 18: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

Proof. By Theorem 3.6 the functions y1 and y2 form a basis of VC. Indeed they belongto VC and every element of VC is a linear combination of them. Since dim VC = 2, y1 andy2 must be linearly independent. If λ1 and λ2 are real, then y1 and y2 are real-valuedfunctions and form a basis of V as well. Indeed they are linearly independent in VC, thusalso in V , and dim V = 2. On the other hand, if λ1,2 = α ± iβ with β 6= 0, then usingy1 = 1

2(y1 + y2), y2 = 1

2i(y1 − y2), we see that the functions y1 and y2 solve Ly = 0 and

are linearly independent in VC (and thus also in V ). Indeed if cy1 + dy2 = 0 for c, d ∈ C,then we get 1

2(c− id)y1 + 1

2(c + id)y2 = 0, whence c ± id = 0 by the linear independence

of y1 and y2, and finally c = d = 0. Since y1 and y2 are linearly independent in V anddim V = 2, y1 and y2 form a basis of V .

Remark 4: complex coefficients. Theorems 3.1, 3.2, 3.3, 3.6 and Corollary 3.4 remainvalid if L is a linear second-order differential operator with constant complex coefficients,i.e., if a, b ∈ C in (3.3), and f is a complex-valued function. In this case λ1 and λ2 in(3.5) are arbitrary complex numbers. The impulsive response g of L is defined againby (3.10)-(3.18), it is given explicitly by formulas (3.14)-(3.15), and solves (3.17). Thesolution of the initial value problem (3.27), with a, b, y0, y

′0 ∈ C and f : I ⊂ R → C

continuous in I ∋ x0, is given again by (3.28). Finally, the set of solutions of (3.2) on R

is a complex vector space of dimension 2, with a basis given by {g, g′} or by {y1, y2}. Inthe next section the results obtained here for n = 2 will be generalized to linear equationsof order n, by working directly with complex coefficients and using induction on n.

Remark 5: the approach by distributions. The meaning of formulas (3.9)-(2.5),or (3.24)-(2.5), is best appreciated in the context of distribution theory. Given a linearconstant-coefficient differential equation, written in the symbolic form Ly = f(x), we canstudy the equation LT = S for T and S in a suitable convolution algebra, for examplethe algebra D′

+ of distributions with support in [0, +∞), which generalizes the algebraof signals. One can show that the elementary solution in D′

+, that is, the solution ofLT = δ, or equivalently, the inverse of Lδ (δ the Dirac distribution), is given precisely byθg, where g is the impulsive response of the differential operator L. If y solves Ly = f(x)with trivial initial conditions at x = 0, then L(θy) = θf , whence θy = θg ∗ θf . This is

just (3.9) for x ≥ 0 and L =(

ddx

)2+ a d

dx+ b. On the other hand, if y solves Ly = f(x)

with L given by (3.3) and with initial conditions y(0) = y0, y′(0) = y′0, then one computes

L(θy) = θf + (y′0 + ay0)δ + y0δ

′,

whenceθy = θg ∗ θf + (y′

0 + ay0) θg + y0 θg′.

This is just (3.24) for x ≥ 0. This approach requires, however, a basic knowledge ofdistribution theory, which goes far beyond our goals and will not be used here. (See [6],chapters II and III, for a nice presentation.)

We now look at some examples.Example 1. Solve the initial value problem

{

y′′ − 2y′ + y = ex

x+2

y(0) = 0, y′(0) = 0.

18

Page 19: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

Solution. The characteristic polynomial is p(λ) = λ2 − 2λ + 1 = (λ − 1)2, so that λ1 = λ2 = 1, andthe impulsive response is

g(x) = x ex.

The forcing term f(x) = ex

x+2 is continuous for x > −2 and for x < −2. Since the initial conditionsare posed at x = 0, we can work in the interval I = (−2, +∞). By Theorem 3.1 we get the followingsolution of the proposed problem in I:

y(x) =

∫ x

0

(x − t) ex−t et

t + 2dt = ex

∫ x

0

x − t

t + 2dt

= ex

∫ x

0

(

x + 2

t + 2− 1

)

dt = ex[ (x + 2) log(t + 2) − t]x

0

= ex[ (x + 2) log(x + 2) − x − (x + 2) log 2 ]

= ex(x + 2) log(

x+22

)

− x ex.

Example 2. Solve the initial value problem{

y′′ + y = 1cos x

y(0) = 0, y′(0) = 0.

Solution. We have p(λ) = λ2 + 1, whence λ1 = λ2 = i, and the impulsive response is

g(x) = sinx.

The initial data are given at x = 0 and we can work in the interval I = (−π/2, π/2), where the forcingterm f(x) = 1

cos xis continuous. By formula (3.9) we get

y(x) =

∫ x

0

sin(x − t)1

cos tdt =

∫ x

0

(sin x cos t − cosx sin t)1

cos tdt

= sinx

∫ x

0

dt − cosx

∫ x

0

sin t

cos tdt = x sin x + cosx log(cosx).

Example 3. Solve the initial value problem{

y′′ − y′ = 1ch x

y(0) = 0, y′(0) = 0.

Solution. We have p(λ) = λ2 − λ = λ(λ − 1), thus λ1 = 1, λ2 = 0, and the impulsive response is

g(x) = ex − 1.

The forcing term f(x) = 1ch x

is continuous on the whole of R. Formula (3.9) gives

y(x) =

∫ x

0

(

ex−t − 1) 1

ch tdt = ex

∫ x

0

e−t

ch tdt −

∫ x

0

1

ch tdt.

The two integrals are easily computed:∫

1

ch tdt = 2

1

et + e−tdt = 2

et

e2t + 1dt = 2 arctan

(

et)

+ C,

e−t

ch tdt = 2

1

e2t + 1dt = 2

1 + e2t − e2t

1 + e2tdt = 2t − log

(

1 + e2t)

+ C′.

We finally get

y(x) = ex[2t− log(

1 + e2t)]

x

0− 2[ arctan

(

et)]

x

0

= ex[2x − log(

1 + e2x)

] + ex log 2 − 2 arctan (ex) + π2 .

Exercises

19

Page 20: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

1. Solve the following initial value problems:

(a)

{

y′′ + 2y′ + y = e−x

x2+1

y(0) = 0, y′(0) = 0.

(b)

{

y′′ − 2y′ + 2y = ex

1+cos x

y(0) = 0, y′(0) = 0.

(c)

{

y′′ − 3y′ + 2y = e2x

(ex+1)2

y(0) = 0, y′(0) = 0.

(d)

{

y′′ + 4y = 1sin 2x

y(π4 ) = 0, y′(π

4 ) = 0.

(e)

{

y′′ − y = 1sh x

y(1) = 0, y′(1) = 0.

(f)

{

y′′ − 2y′ = ex

ch 2x

y(0) = 0, y′(0) = 0.

4 The general case

Consider the linear constant-coefficient non-homogeneous differential equation of order n

y(n) + a1 y(n−1) + a2 y(n−2) + · · ·+ an−1 y′ + an y = f(x), (4.1)

where y(k) = dky

dxk =(

ddx

)ky, a1, a2, . . . , an ∈ C, and the forcing term f : I → C is a

complex-valued continuous function in an interval I ⊂ R, i.e., f ∈ C0(I). When f = 0we obtain the associated homogeneous equation

y(n) + a1 y(n−1) + a2 y(n−2) + · · ·+ an−1 y′ + an y = 0. (4.2)

We will write (4.1) and (4.2) in operator form as Ly = f(x) and Ly = 0, where L is thelinear differential operator of order n with constant coefficients defined by

Ly = y(n) + a1 y(n−1) + a2 y(n−2) + · · ·+ an−1 y′ + an y

for any function y at least n times differentiable. Denoting by ddx

the differentiationoperator, we have

L =(

ddx

)n+ a1

(

ddx

)n−1+ · · ·+ an−1

ddx

+ an. (4.3)

L defines a map Cn(R) → C0(R) that to each complex-valued function y at least n-timesdifferentiable over R with continuous nth derivative associates the continuous functionLy. The fundamental property of L is its linearity, i.e., (3.4) holds, ∀c1, c2 ∈ C, ∀y1, y2 ∈Cn(R). Again this implies that if y1 and y2 are any two solutions of (4.2) on R, then anylinear combination of them is again a solution of (4.2) on R. It follows that the set

V = {y ∈ Cn(R) : Ly = 0}

20

Page 21: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

is a complex vector space. We will prove that dim V = n, and will see how to get a basisof V . Note that if y ∈ V , then y ∈ C∞(R), as follows from (4.2) by isolating y(n) anddifferentiating any number of times.

The linearity of L also implies, as in the case of n = 1, 2, that the general solution of(4.1) on some interval I ′ ⊂ I is the sum of the general solution of (4.2) on I ′ plus anyparticular solution of (4.1) on I ′. We will prove that the solutions of the initial valueproblem for the differential equation (4.1) at any point x0 ∈ I and with any initial dataare defined on the entire interval I on which f is continuous (and are of course of classCn there).

The fact that L has constant coefficients allows one to find explicit formulas for thesolutions of (4.1)-(4.2). We first observe that the complex exponential eλx, λ ∈ C, is asolution of (4.2) if and only if λ is a root of the characteristic polynomial

p(λ) = λn + a1λn−1 + · · · + an−1λ + an. (4.4)

Let λ1, λ2, . . . , λn ∈ C be the roots of p(λ), not necessarily all distinct, each countedwith its multiplicity. The polynomial p(λ) factors as

p(λ) = (λ − λ1)(λ − λ2) · · · (λ − λn).

The differential operator L can be factored in a similar way as

L =(

ddx

− λ1

) (

ddx

− λ2

)

· · ·(

ddx

− λn

)

, (4.5)

where the order of composition of the factors is unimportant as they all commute.The idea is now to use (4.5) to reduce the problem to first-order differential equations.The following result gives a particular solution of (4.1) as a convolution integral, and

generalizes Theorem 3.1.

Theorem 4.1. Let f ∈ C0(I), and suppose that 0 ∈ I. Let λ1, λ2, . . . , λn be n complexnumbers (not necessarily all distinct), and let L be the differential operator (4.5). Thenthe initial value problem

{

Ly = f(x)y(0) = y′(0) = · · · = y(n−1)(0) = 0

(4.6)

has a unique solution, defined on the whole of I, and given by the formula

y(x) =

∫ x

0

g(x − t)f(t) dt (x ∈ I), (4.7)

where g = gλ1···λnis the function defined recursively as follows: for n = 1 we set gλ(x) =

eλx (λ ∈ C), for n ≥ 2 we set

gλ1···λn(x) =

∫ x

0

gλn(x − t) gλ1···λn−1(t) dt (x ∈ R). (4.8)

The function gλ1···λnis of class C∞ on the whole of R. In particular if we take f = 0, we

get that the unique solution of the homogeneous problem{

Ly = 0y(0) = y′(0) = · · · = y(n−1)(0) = 0

(4.9)

is the zero function y = 0.

21

Page 22: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

Proof. We proceed by induction on n. First we prove that gλ1···λn∈ C∞(R). Indeed this

holds for n = 1. Suppose it holds for n − 1. Then it holds also for n, since by (4.8)

gλ1···λn(x) = eλnx

∫ x

0

e−λnt gλ1···λn−1(t) dt,

so gλ1···λnis the product of two functions of class C∞ on R. (The integral function of a

C∞ function is C∞.)We now prove (4.7). The theorem holds for n = 1, 2. Assuming it holds for n− 1, let

us prove it for n. Consider then the problem (4.6) with L given by (4.5):

{ (

ddx

− λ1

) (

ddx

− λ2

)

· · ·(

ddx

− λn

)

y = f(x)y(0) = y′(0) = · · · = y(n−1)(0) = 0.

Letting h =(

ddx

− λn

)

y, we see that y solves the problem (4.6) if and only if h solves

{ (

ddx

− λ1

) (

ddx

− λ2

)

· · ·(

ddx

− λn−1

)

h = f(x)h(0) = h′(0) = · · · = h(n−2)(0) = 0,

and y solves{

y′ − λny = h(x)y(0) = 0.

(The initial conditions for h = y′−λny follow by computing h′, h′′, . . . , h(n−2) and settingx = 0.) By the inductive hypothesis and by (3.7), we have

h(x) =

∫ x

0

gλ1···λn−1(x − t)f(t) dt,

y(x) =

∫ x

0

eλn(x−t)h(t) dt.

Substituting h from the first formula into the second, we obtain ∀x ∈ I:

y(x) =

∫ x

0

gλn(x − t)

(∫ t

0

gλ1···λn−1(t − s)f(s) ds

)

dt

=

∫ x

0

(∫ x

s

gλn(x − t)gλ1···λn−1(t − s) dt

)

f(s) ds

=

∫ x

0

(∫ x−s

0

gλn(x − s − t)gλ1···λn−1(t) dt

)

f(s) ds

=

∫ x

0

gλ1···λn(x − s)f(s) ds.

We have interchanged the order of integration in the second line, substituted t with t+ sin the third, and used (4.8) in the last.

22

Page 23: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

By induction one can also verify that the function gλ1···λnsolves the following homo-

geneous initial value problem:{

Ly = 0y(0) = y′(0) = · · · = y(n−2)(0) = 0, y(n−1)(0) = 1.

(4.10)

Conversely, if y solves (4.10) then y is given by (4.8). In other words, the solution of theinitial value problem (4.10) is unique and is calculable for n ≥ 2 by the recursive formula(4.8). This is proved by induction, reasoning as in the proof of Theorem 4.1.

For example take n = 3 and suppose y solves the problem{ (

ddx

− λ1

) (

ddx

− λ2

) (

ddx

− λ3

)

y = 0y(0) = y′(0) = 0, y′′(0) = 1.

Letting h =(

ddx

− λ3

)

y, the function h solves{ (

ddx

− λ1

) (

ddx

− λ2

)

h = 0h(0) = 0, h′(0) = 1,

whence h = gλ1λ2 . Therefore y solves{

y′ − λ3y = gλ1λ2(x)y(0) = 0,

and from (3.7) we get

y(x) =

∫ x

0

gλ3(x − t) gλ1λ2(t) dt = gλ1λ2λ3(x).

The function g = gλ1···λnis called the impulsive response of the differential operator L.

We will see later how to compute it explicitly using (4.8). Note that as a function ofλ1, . . . , λn, gλ1···λn

is symmetric in the interchange λi ↔ λj , ∀i, j = 1, . . . , n. This followsfrom the fact that gλ1···λn

solves the problem (4.10) with L symmetric in λi ↔ λj, ∀i, j.

Remark 6. It is interesting to verify directly that the function y given by (4.7) solvesthe non-homogeneous equation Ly = f(x). Indeed, using repeatedly the formula

ddx

∫ x

0

F (x, t) dt = F (x, x) +

∫ x

0

∂F∂x

(x, t) dt,

we get from (4.7):

y′(x) = g(0)f(x) +

∫ x

0

g′(x − t)f(t) dt =

∫ x

0

g′(x − t)f(t) dt

y′′(x) = g′(0)f(x) +

∫ x

0

g′′(x − t)f(t) dt =

∫ x

0

g′′(x − t)f(t) dt

...

y(n−1)(x) = g(n−2)(0)f(x) +

∫ x

0

g(n−1)(x − t)f(t) dt =

∫ x

0

g(n−1)(x − t)f(t) dt

y(n)(x) = g(n−1)(0)f(x) +

∫ x

0

g(n)(x − t)f(t) dt = f(x) +

∫ x

0

g(n)(x − t)f(t) dt,

23

Page 24: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

where we used (4.10). It follows that

(Ly)(x) = f(x) +

∫ x

0

(Lg)(x − t)f(t) dt = f(x), ∀x ∈ I,

being Lg = 0. The initial conditions y(k)(0) = 0 for 0 ≤ k ≤ n − 1 are immediatelyverified from these formulas.

For the initial value problem with arbitrary (complex) initial data at x = 0, we havethe following result, that generalizes Theorem 3.2.

Theorem 4.2. Let f ∈ C0(I), 0 ∈ I, and let b0, b1, . . . , bn−1 be n complex numbers. LetL be the differential operator in (4.3) or (4.5), and let g be the impulsive response of L.Then the initial value problem

{

Ly = f(x)y(0) = b0, y′(0) = b1, . . . , y(n−1)(0) = bn−1

(4.11)

has a unique solution, defined on the whole of I, and given for any x ∈ I by

y(x) =

∫ x

0

g(x − t)f(t) dt + c0 g(x) + c1 g′(x) + · · ·+ cn−1 g(n−1)(x), (4.12)

where

c0 = bn−1 + a1bn−2 + · · · + an−2b1 + an−1b0

c1 = bn−2 + a1bn−3 + · · · + an−3b1 + an−2b0...cn−3 = b2 + a1b1 + a2b0

cn−2 = b1 + a1b0

cn−1 = b0.

(4.13)

In particular (taking f = 0), the solution of the homogeneous problem

{

Ly = 0y(0) = b0, y′(0) = b1, . . . , y(n−1)(0) = bn−1

is unique, of class C∞ on the whole of R, and is given by

yh(x) =

n−1∑

k=0

ck g(k)(x) (x ∈ R). (4.14)

Proof. The uniqueness follows from the fact that if y1, y2 both solve the problem (4.11),then their difference y = y1 − y2 solves the problem (4.9), whence y = 0 by Theorem 4.1.

To show that y(x) given by (4.12) satisfies Ly(x) = f(x), just observe that anyderivative g(k) of g satisfies the homogeneous equation, since

Lg(k) = L(

ddx

)kg =

(

ddx

)kLg = 0.

24

Page 25: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

By Theorem 4.1 and the linearity of L it follows that

(Ly)(x) = f(x) + L

(

n−1∑

k=0

ck g(k)

)

(x) = f(x) +n−1∑

k=0

ck (Lg(k))(x) = f(x).

There remain to prove the relations (4.13) between the coefficients ck and bk = y(k)(0)(0 ≤ k ≤ n − 1). By computing y′, y′′, . . . , y(n−1) from (4.12) and imposing the initialconditions (4.11), we obtain the linear system

cn−1 = b0

cn−2 + cn−1g(n)(0) = b1

cn−3 + cn−2g(n)(0) + cn−1g

(n+1)(0) = b2

cn−4 + cn−3g(n)(0) + cn−2g

(n+1)(0) + cn−1g(n+2)(0) = b3

...c0 + c1g

(n)(0) + c2g(n+1)(0) + · · · + cn−1g

(2n−2)(0) = bn−1,

(4.15)

where we used g(k)(0) = 0 for 0 ≤ k ≤ n − 2, g(n−1)(0) = 1. The derivatives g(k)(0)with k ≥ n can be computed from the differential equation Lg = 0 by isolating g(n)(x),differentiating and letting x = 0. One gets

g(n)(0) = −a1g(n−1)(0) = −a1

g(n+1)(0) = −a1g(n)(0) − a2g

(n−1)(0) = a21 − a2

g(n+2)(0) = −a1g(n+1)(0) − a2g

(n)(0) − a3g(n−1)(0) = −a3

1 + 2a1a2 − a3,

and so on. These relations, substituted in the system (4.15), allow one to solve it recur-sively and we get exactly the relations (4.13).

Remark 7. We can also proceed more sistematically as follows. We rewrite (4.13) inmatrix form as

c =

c0

c1...

cn−1

= Ab = A

b0

b1...

bn−1

,

where

A =

an−1 an−2 an−3 · · · · · · a2 a1 1an−2 an−3 · · · · · · a2 a1 1 0an−3 an−4 · · · · · · a1 1 0 0

......

......

a2 a1 1 0 · · · · · · 0 0a1 1 0 0 · · · · · · 0 01 0 0 0 · · · · · · 0 0

,

25

Page 26: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

and the system (4.15) as b = B c, where

B =

0 0 0 · · · · · · 0 10 0 · · · · · · 0 1 g(n)(0)0 0 · · · · · · 1 g(n)(0) g(n+1)(0)...

......

...0 1 g(n)(0) · · · · · · · · · g(2n−3)(0)1 g(n)(0) g(n+1)(0) · · · · · · g(2n−3)(0) g(2n−2)(0)

.

Using the equations

Lg = 0, Lg′ = 0, Lg′′ = 0, . . . , Lg(n−2) = 0

at x = 0, it is easily checked that the matrices A and B are the inverse of each other.Finally, let us mention that Theorem 4.2 can also be proved by induction on n, with aconstructive proof analogous to that of Theorem 4.1.

The proof of the following result is similar to that of Theorem 3.3.

Theorem 4.3. Let f ∈ C0(I), x0 ∈ I, b0, b1, . . . , bn−1 ∈ C, and let L and g be as inTheorem 4.2. The solution of the initial value problem

{

Ly = f(x)y(x0) = b0, y′(x0) = b1, . . . , y(n−1)(x0) = bn−1

(4.16)

is unique, it is defined on the whole of I, and is given ∀x ∈ I by

y(x) =

∫ x

x0

g(x − t)f(t) dt +

n−1∑

k=0

ck g(k)(x − x0), (4.17)

where the coefficients ck are given by (4.13). In particular (taking f = 0), the solutionof the homogeneous problem

{

Ly = 0y(x0) = b0, y′(x0) = b1, . . . , y(n−1)(x0) = bn−1,

with x0 ∈ R arbitrary, is unique, of class C∞ on the whole of R, and is given by

yh(x) =

n−1∑

k=0

ck g(k)(x − x0) (x ∈ R). (4.18)

Now let y be any solution of (4.1) in the interval I ∋ x0, and let bk = y(k)(x0)(0 ≤ k ≤ n−1). Then y solves the problem (4.16), so by uniqueness y is given by (4.17).We thus obtain the following analogue of Corollary 3.4.

Corollary 4.4. Let f ∈ C0(I) and let x0 ∈ I be fixed. Every solution y of Ly = f(x)in the interval I can be written as y = yp + yh, where yp(x) =

∫ x

x0g(x − t)f(t) dt solves

Ly = f(x) with the initial conditions y(k)p (x0) = 0 for 0 ≤ k ≤ n − 1, and yh solves

Lyh = 0 with the same initial conditions as y at x0. The function yh is given by (4.18),where the ck are given by (4.13) with bk = y(k)(x0) (0 ≤ k ≤ n − 1).

26

Page 27: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

The following result generalizes Corollary 3.5.

Corollary 4.5. The set V of solutions of the homogeneous equation Ly = 0 on R is acomplex vector space of dimension n, with a basis given by {g, g′, g′′, . . . , g(n−1)}. If Lhas real coefficients (i.e., a1, . . . , an in (4.3) are all real numbers), then the set VR of realsolutions of Ly = 0 on R is a real vector space of dimension n, with a basis given by{g, g′, g′′, . . . , g(n−1)}.

Proof. From (4.14) and the uniqueness of the homogeneous initial value problem, itfollows that every solution of Ly = 0 on R can be written as a linear combination ofg, g′, g′′, . . . , g(n−1) in a unique way. (The coefficients ck in this combination are uniquelydetermined by the initial data bk at x = 0 through (4.13).) In particular, this holds forthe trivial solution y(x) = 0 ∀x, i.e., c0g(x) + · · ·+ cn−1g

(n−1)(x) = 0 for c0, . . . , cn−1 ∈ C

and ∀x ∈ R, implies c0 = · · · = cn−1 = 0. Thus the n functions g, g′, g′′, . . . , g(n−1) arelinearly independent on R and form a basis of V .

If L has real coefficients, then the solutions of Ly = 0 with real initial data at x = 0(i.e., bk = y(k)(0) ∈ R for 0 ≤ k ≤ n − 1) are real-valued. Indeed by writing y =Re y + iIm y, one gets that Im y solves the problem (4.9), whence Im y = 0. In particular,the impulsive response g is real-valued. The set VR of real solutions of Ly = 0 on R isthen a real vector space of dimension n, with a basis given by {g, g′, g′′, . . . , g(n−1)}.Exercises

1. Verify that the matrices A and B in Remark 7 are the inverse of each other.

2. Prove Theorem 4.3 by imitating the proof of Theorem 3.3.

5 Explicit formulas for the impulsive response

To summarize our results so far, we have seen that the impulsive response g, i.e., thesolution of the homogeneous problem (4.10), allows one to solve the non-homogeneousequation (4.1) with an arbitrary forcing term and with arbitrary initial conditions.

We now consider the problem of explicitly computing g for an equation of order n.By iterating (4.8) we obtain the following formula for the impulsive response of order nas an (n − 1)-times repeated integral of exponential functions:

gλ1···λn(x) =

∫ x

0

eλn(x−tn−1)

(∫ tn−1

0

eλn−1(tn−1−tn−2) · · ·

· · ·(∫ t3

0

eλ3(t3−t2)

(∫ t2

0

eλ2(t2−t1)eλ1t1 dt1

)

dt2

)

· · · dtn−2

)

dtn−1. (5.1)

For x ≥ 0 this is just the convolution of the n functions θgλj(1 ≤ j ≤ n), whereas for

x ≤ 0 it is the opposite of the convolution of the functions θgλj(see (2.5)):

gλ1···λn(x) =

{

θgλn∗ θgλn−1 ∗ · · · ∗ θgλ2 ∗ θgλ1 (x) if x ≥ 0

− θgλn∗ θgλn−1 ∗ · · · ∗ θgλ2 ∗ θgλ1 (x) if x ≤ 0.

(5.2)

27

Page 28: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

We can also write the repeated integral in (5.1) as an (n − 1)-dimensional integral

gλ1···λn(x) = eλnx

Tx

etn−1(λn−1−λn) · · · et2(λ2−λ3) et1(λ1−λ2) dt1 dt2 · · · dtn−1,

where Tx is the (n − 1)-dimensional simplex of Rn−1 defined (for, e.g., x > 0) by

Tx = {(t1, t2, . . . , tn−1) ∈ Rn−1 : 0 ≤ t1 ≤ t2 ≤ · · · ≤ tn−1 ≤ x}.

For example for n = 3, (5.1) becomes

gλ1λ2λ3(x) =

∫ x

0

eλ3(x−t2)

(∫ t2

0

eλ2(t2−t1)eλ1t1 dt1

)

dt2,

and we easily obtain the following result.

Corollary 5.1. The impulsive response g of the differential operator

L =(

ddx

)3+ a1

(

ddx

)2+ a2

ddx

+ a3

is given as follows. Let λ1, λ2, λ3 be the roots of the characteristic polynomial

p(λ) = λ3 + a1λ2 + a2λ + a3.

1) If λ1 6= λ2 6= λ3 (all distinct roots), then

g(x) = eλ1x

(λ1−λ2)(λ1−λ3)+ eλ2x

(λ2−λ1)(λ2−λ3)+ eλ3x

(λ3−λ1)(λ3−λ2).

2) If λ1 = λ2 6= λ3, then

g(x) = 1(λ1−λ3)2

[

eλ3x − eλ1x + (λ1 − λ3) x eλ1x]

.

3) If λ1 = λ2 = λ3, theng(x) = 1

2x2 eλ1x.

Note that if a1, a2, a3 are all real, then g is real-valued (as it must be). Indeed in case1), if λ1 ∈ R and λ2,3 = α ± iβ with β 6= 0, one computes

g(x) = 1(λ1−α)2+β2

[

eλ1x + 1β(α − λ1) eαx sin βx − eαx cos βx

]

.

In all other cases λ1, λ2, λ3 are real if a1, a2, a3 ∈ R.

When the roots of p(λ) are all distinct or all equal, there is a fairly simple expressionfor g.

28

Page 29: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

Proposition 5.2. For generic n, let λ1, λ2, . . . , λn be the roots of the characteristic poly-nomial p(λ) in (4.4).

1) If λi 6= λj for i 6= j (all distinct roots), then the impulsive response is

g(x) = c1 eλ1x + c2 eλ2x + · · ·+ cn eλnx,

where

cj =1

i6=j(λj − λi)=

1

p′(λj)(1 ≤ j ≤ n).

2) If λ1 = λ2 = · · · = λn, then

g(x) =1

(n − 1)!xn−1 eλ1x. (5.3)

Proof. This is readily proved by induction on n using (4.8). For 1) it is useful toremind that the function g = gλ1···λn

is symmetric in the interchange λi ↔ λj , ∀i, j =1, . . . , n.

In the general case we can simplify formula (5.2) as follows. Let λ1, λ2, . . . , λk be thedistinct roots of p(λ), of multiplicities m1, m2, . . . , mk, with m1 + m2 + · · · + mk = n.Since convolution is commutative and associative, we can group in (5.2) the convolutionsrelative to each root λj (1 ≤ j ≤ k). We can then rewrite the impulsive response of ordern (for, say, x ≥ 0) as

g = (θgλk∗ · · · ∗ θgλk

) ∗(

θgλk−1∗ · · · ∗ θgλk−1

)

∗ · · · ∗ (θgλ1 ∗ · · · ∗ θgλ1) .

The term(

θgλj∗ · · · ∗ θgλj

)

in this formula contains mj factors and the convolution isrepeated mj − 1 times. This term gives (for x ≥ 0) the impulsive response gλj ···λj

of thedifferential operator ( d

dx− λj)

mj . By (5.2) and (5.3) we have

gλj ···λj(x) =

{

θgλj∗ · · · ∗ θgλj

(x) if x ≥ 0

− θgλj∗ · · · ∗ θgλj

(x) if x ≤ 0=

1

(mj − 1)!xmj−1 eλjx, ∀x ∈ R.

Defining for short

gλ,m(x) :=1

(m − 1)!xm−1 eλx (λ ∈ C, m ∈ N

+), (5.4)

we obtain

g(x) =

{

θgλk,mk∗ θgλk−1,mk−1

∗ · · · ∗ θgλ1,m1 (x) if x ≥ 0

− θgλk,mk∗ θgλk−1,mk−1

∗ · · · ∗ θgλ1,m1 (x) if x ≤ 0(5.5)

=

∫ x

0

gλk,mk(x − tk−1)

(∫ tk−1

0

gλk−1,mk−1(tk−1 − tk−2) · · ·

· · ·(∫ t3

0

gλ3,m3(t3 − t2)

(∫ t2

0

gλ2,m2(t2 − t1)gλ1,m1(t1) dt1

)

dt2

)

· · · dtk−2

)

dtk−1.

This formula is useful for computing g in the case of multiple roots. In fact, using (5.5),we can prove the following result.

29

Page 30: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

Theorem 5.3. There exist polynomials G1, G2, . . . , Gk, of degrees m1−1, m2−1, . . . , mk−1, respectively, such that

g(x) = G1(x)eλ1x + G2(x)eλ2x + · · ·+ Gk(x)eλkx. (5.6)

More precisely, the impulsive response g for k distinct roots is given by (5.6), where G1

is the polynomial of degree m1 − 1 given for k ≥ 2 by

G1(x) =

m1−1∑

r1=0

r1∑

r2=0

r2∑

r3=0

· · ·rk−2∑

rk−1=0

(−1)m1−1−rk−1

rk−1!xrk−1×

×(

m1+m2−2−r1

m2−1

)(

m3−1+r1−r2

m3−1

)(

m4−1+r2−r3

m4−1

)

· · ·(

mk−1+rk−2−rk−1

mk−1

)

(λ1 − λ2)m1+m2−r1−1(λ1 − λ3)m3+r1−r2(λ1 − λ4)m4+r2−r3 · · · (λ1 − λk)mk+rk−2−rk−1.

(5.7)

To get Gj, j ≥ 2, just exchange λ1 ↔ λj and m1 ↔ mj in this formula.

Proof. The proof of the first statement is by induction on the number k of distinct rootsof p(λ). The result holds for k = 1, with G1(x) = xm1−1

(m1−1)!by formula (5.3). For k = 2 we

have from (5.5)

g(x) =

∫ x

0

gλ2,m2(x − t)gλ1,m1(t) dt

=eλ2x

(m2 − 1)!(m1 − 1)!

∫ x

0

(x − t)m2−1tm1−1e(λ1−λ2)t dt. (5.8)

We need the following lemma, whose proof is postponed at the end.

Lemma 5.4. Let p, q ∈ N and b, c ∈ C, b 6= c. Then, ∀x ∈ R, we have

1

p!q!ebx

∫ x

0

(x − t)p tq e(c−b)t dt = P (x, p, q, b−c) ebx + P (x, q, p, c−b) ecx, (5.9)

where P (x, p, q, a), a ∈ C \ {0}, is the polynomial of degree p in x given by

P (x, p, q, a) =

p∑

r=0

(−1)p−r

r!

(

p + q − r

q

)

xr

ap+q+1−r. (5.10)

Suppose this is proved. From (5.8)-(5.10) we immediately get the following formula forthe impulsive response g in the case of two distinct roots λ1, λ2 of multiplicities m1, m2:

g(x) = G1(x)eλ1x + G2(x)eλ2x, (5.11)

G1(x) =

m1−1∑

r=0

(−1)m1−1−r

r!

(

m1 + m2 − r − 2

m2 − 1

)

xr

(λ1 − λ2)m1+m2−r−1, (5.12)

G2(x) =m2−1∑

r=0

(−1)m2−1−r

r!

(

m1 + m2 − r − 2

m1 − 1

)

xr

(λ2 − λ1)m1+m2−r−1. (5.13)

30

Page 31: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

Note that G1, G2 have degrees m1 − 1, m2 − 1, respectively, and that G2 is obtainedfrom G1 by interchanging λ1 ↔ λ2 and m1 ↔ m2, so that g is symmetric under thisinterchange (clear from (5.5)). Note also that (5.12) agrees with (5.7) for k = 2.

The step from k − 1 to k in the inductive proof is now similar. Suppose the resultholds for k − 1 roots, and let us prove it holds for k roots. The inductive hypothesis and(5.5) imply that for x ≥ 0

θgλk−1,mk−1∗ · · · ∗ θgλ1,m1 (x) = G1(x)eλ1x + · · ·+ Gk−1(x)eλk−1x,

for some polynomials G1, . . . , Gk−1, of degrees m1−1, . . . , mk−1−1, respectively. Addingthe root λk, of multiplicity mk, and using (5.5), gives the impulsive response

g(x) = θgλk,mk∗(

θgλk−1,mk−1∗ · · · ∗ θgλ1,m1

)

(x)

=eλkx

(mk − 1)!

∫ x

0

(x − t)mk−1[

G1(t)e(λ1−λk)t + · · ·+ Gk−1(t)e

(λk−1−λk)t]

dt. (5.14)

The final formula for g(x) holds for any x ∈ R. By expanding each polynomial Gj in (5.14)in powers of t, we obtain integrals of the form (5.9), with p = mk − 1, 0 ≤ q ≤ mj − 1,b = λk, and c = λj (1 ≤ j ≤ k − 1). Lemma 5.4 implies that g is of the form (5.6), withG1, . . . , Gk−1 of degrees m1 − 1, . . . , mk−1 − 1, respectively, and Gk of degree ≤ mk − 1.However, since g must be symmetric under λi ↔ λj and mi ↔ mj , ∀i, j = 1, . . . , k (thisfollows from (5.5)), the polynomial Gk must actually be of degree mk − 1.

In order to prove formula (5.7), we rewrite (5.9) in convolution form, by observingthat the left-hand side of (5.9) is just

∫ x

0

gb,p+1(x − t)gc,q+1(t) dt =

{

θgb,p+1 ∗ θgc,q+1(x) if x ≥ 0

−θgb,p+1 ∗ θgc,q+1(x) if x ≤ 0

(gλ,m given by (5.4)). Recalling (5.10), we obtain for x ≥ 0

θgb,p+1 ∗ θgc,q+1(x) =

p∑

r=0

(−1)p−r

(

p+q−r

q

)

(b − c)p+q+1−rgb,r+1(x)

+

q∑

r=0

(−1)q−r

(

p+q−r

p

)

(c − b)p+q+1−rgc,r+1(x). (5.15)

The same expression is obtained for −θgb,p+1 ∗ θgc,q+1(x) with x ≤ 0. Note that (5.15)holds only for b 6= c. For b = c we have the simpler formula (6.4) below.

Using (5.15) in (5.5) and iterating, it is possible to compute the polynomials Gj fork distinct roots. For example for k = 3, by computing g = (θgλ1,m1 ∗ θgλ2,m2) ∗ θgλ3,m3

for x ≥ 0, we get g = G1eλ1 + G2e

λ2 + G3eλ3 , where

G1(x) =

m1−1∑

r=0

r∑

s=0

(−1)m1−1−s

s!

(

m1+m2−2−r

m2−1

)(

m3−1+r−s

m3−1

)

(λ1 − λ2)m1+m2−r−1(λ1 − λ3)m3+r−sxs,

G2(x) =m2−1∑

r=0

r∑

s=0

(−1)m2−1−s

s!

(

m1+m2−2−r

m1−1

)(

m3−1+r−s

m3−1

)

(λ2 − λ1)m1+m2−r−1(λ2 − λ3)m3+r−sxs,

31

Page 32: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

G3(x) =

m1−1∑

r=0

m3−1∑

s=0

(−1)m1

s!

(

m1+m2−2−r

m2−1

)(

m3−1+r−s

r

)

(λ1 − λ2)m1+m2−r−1(λ1 − λ3)m3+r−sxs

+

m2−1∑

r=0

m3−1∑

s=0

(−1)m2

s!

(

m1+m2−2−r

m1−1

)(

m3−1+r−s

r

)

(λ2 − λ1)m1+m2−r−1(λ2 − λ3)m3+r−sxs.

This formula for g is clearly symmetric under λ1 ↔ λ2, m1 ↔ m2, since then G1 ↔G2 while G3 stays invariant. Although not immediately apparent, the formula is alsosymmetric under λ1 ↔ λ3, m1 ↔ m3 (and thus under λ2 ↔ λ3, m2 ↔ m3), as it shouldbe. The polynomial G3 can then be rewritten in a form similar to G1 and G2, by justletting λ1 ↔ λ3 and m1 ↔ m3 in G1. Note that the formula for G1 agrees with (5.7) fork = 3.

In general, using (5.15) in (5.5) k − 1 times, we obtain precisely formula (5.7) for thepolynomial G1. Note that the coefficient of xs in G1(x) =

∑m1−1s=0 cs xs is given for k ≥ 3

by

cs =

m1−1∑

r1=s

r1∑

r2=s

· · ·rk−3∑

rk−2=s

(−1)m1−1−s

s!×

×(

m1+m2−2−r1

m2−1

)(

m3−1+r1−r2

m3−1

)

· · ·(

mk−1−1+rk−3−rk−2

mk−1−1

)(

mk−1+rk−2−s

mk−1

)

(λ1 − λ2)m1+m2−r1−1(λ1 − λ3)m3+r1−r2 · · · (λ1 − λk−1)mk−1+rk−3−rk−2(λ1 − λk)mk+rk−2−s.

The last statement of the theorem follows from the symmetry of g under λi ↔ λj ,mi ↔ mj , ∀i, j.

Proof of Lemma 5.4. We shall prove that if p, q ∈ N and a ∈ C \ {0}, then

1

p!q!

∫ x

0

(x − t)ptqeat dt = P (x, p, q,−a) + P (x, q, p, a)eax. (5.16)

Lemma 5.4 follows immediately from this by letting a = c − b. Set

F (x, a, p, q) =

∫ x

0

(x − t)ptqeat dt.

To compute this observe that the powers of t in the integral can be traded by correspond-ing powers of the differential operator ∂

∂adifferentiating with respect to the parameter a.

Indeed by iterating the formula ∂∂a

eat = t eat, one easily gets the formulas

( ∂∂a

)qeat = tqeat, (x − ∂∂a

)peat = (x − t)peat,

(x − ∂∂a

)p( ∂∂a

)qeat = (x − t)ptqeat.

Using this in F and taking the derivatives with respect to a outside the integral, weobtain

F (x, a, p, q) = (x − ∂∂a

)p( ∂∂a

)q

∫ x

0

eat dt

= (x − ∂∂a

)p( ∂∂a

)q(

eax−1a

)

. (5.17)

32

Page 33: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

This formula holds for p = 0 or q = 0 as well, the zero power being the identity operator.To compute ( ∂

∂a)q(

eax−1a

)

use Leibniz rule

( ∂∂a

)q(fg) =

q∑

r=0

(

q

r

)

[

( ∂∂a

)rf][

( ∂∂a

)q−rg]

,

and the formulas

( ∂∂a

)r(eax − 1) =

{

eax − 1 if r = 0xreax if r ≥ 1,

( ∂∂a

)q−ra−1 = (−1)q−r(q − r)!a−1−(q−r),

to get

( ∂∂a

)q(

eax−1a

)

= (eax − 1)(−1)q q!aq+1 +

q∑

r=1

(

q

r

)

xreax(−1)q−r (q−r)!aq+1−r

= (−1)q+1 q!aq+1 + eax

q∑

r=0

(−1)q−r q!r!

xr

aq+1−r .

Using this in (5.17) gives

F (x, a, p, q) = (x − ∂∂a

)p

{

(−1)q+1 q!

aq+1+ eax

q∑

r=0

(−1)q−r q!

r!

xr

aq+1−r

}

= (−1)q+1q!(x − ∂∂a

)p a−(q+1) +

q∑

r=0

(−1)q−r q!r!xr(x − ∂

∂a)p(

eaxa−(q+1−r))

.

(5.18)

To compute the term (x − ∂∂a

)p a−(q+1) in this formula, use the binomial expansion

(x − ∂∂a

)p =

p∑

r=0

(

p

r

)

xr(− ∂∂a

)p−r,

and the general formula for the derivatives of inverse powers

(− ∂∂a

)pa−m = (p+m−1)!(m−1)!

a−m−p, (5.19)

to get

(x − ∂∂a

)p a−q−1 =

p∑

r=0

(

p

r

)

xr(− ∂∂a

)p−ra−(q+1)

=

p∑

r=0

(

p

r

)

(p+q−r)!q!

ar−p−q−1xr. (5.20)

To compute the term (x − ∂∂a

)p(

eaxa−(q+1−r))

in (5.18), observe that

(x − ∂∂a

)meax = 0, ∀m ≥ 1.

33

Page 34: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

It follows that for any function g:

(x − ∂∂a

)(eaxg) = [(x − ∂∂a

)eax]g − eax ∂∂a

g = −eax ∂∂a

g,

(x − ∂∂a

)2(eaxg) = (x − ∂∂a

)(−eax ∂∂a

g) = eax( ∂∂a

)2g

...

(x − ∂∂a

)p(eaxg) = eax(− ∂∂a

)pg.

Using this with g(a) = a−(q+1−r) and (5.19), we obtain

(x − ∂∂a

)p(

eaxa−(q+1−r))

= eax(− ∂∂a

)pa−(q+1−r)

= eax (p+q−r)!(q−r)!

ar−p−q−1.

Substituting this and (5.20) in (5.18) we finally get

F (x, a, p, q) = (−1)q+1

p∑

r=0

(

p

r

)

(p + q − r)!xr ar−p−q−1

+

q∑

r=0

(−1)q−r q!r!xreax (p+q−r)!

(q−r)!ar−p−q−1.

This yields precisely (5.16) with P given by (5.10), as easily seen.

Another way to compute the polynomials Gj is given by the following result.

Theorem 5.5. Let λ1, λ2, . . . , λk be the distinct roots of the characteristic polynomial(4.4), of multiplicities m1, m2, . . . , mk, and let

1∏k

j=1(λ − λj)mj

=

k∑

j=1

(

cj,1

λ − λj

+cj,2

(λ − λj)2+ · · · + cj,mj

(λ − λj)mj

)

(5.21)

be the partial fraction expansion of 1p(λ)

over C. Then the impulsive response of the

differential operator (4.3) is given by (5.6), where

Gj(x) = cj,1 + cj,2x + cj,3x2

2!+ · · ·+ cj,mj

xmj−1

(mj − 1)!(1 ≤ j ≤ k).

Proof. This theorem can be proved by induction, though it is most easily proved usingthe Laplace transform or distribution theory. Indeed, one can show that the Laplacetransform L of the impulsive response g is precisely the reciprocal of the characteristicpolynomial:

(Lg)(λ) =1

p(λ).

Decomposing 1/p(λ) according to (5.21) and taking the inverse Laplace transform givesthe result (see [5], eq. (21) p. 81). See also [6], pp. 141-142, for another proof usingdistribution theory in the convolution algebra D′

+.

34

Page 35: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

We now use the impulsive response to compute the general solution of the homoge-neous equation Ly = 0 in terms of the complex exponentials eλjx. The following resultgeneralizes Theorem 3.6.

Theorem 5.6. Every solution of Ly = 0 can be written in the form

yh(x) = P1(x)eλ1x + P2(x)eλ2x + · · ·+ Pk(x)eλkx, (5.22)

where Pj (1 ≤ j ≤ k) is a complex polynomial of degree ≤ mj − 1. Conversely, anyfunction of this form is a solution of Ly = 0.

Proof. Let yh be a solution of Ly = 0. By Corollary 4.4, yh can be written as alinear combination of g, g′, . . . , g(n−1), i.e., it is given by (4.14) for some complex numbersc0, c1, . . . , cn−1. Substituting (5.6) in (4.14) we get an expression of the form (5.22), wherethe degrees of the polynomials Pj can be less than or equal to mj − 1 (depending on thecoefficients c0, c1, . . . , cn−1).

For the converse, observe that since λ1, λ2, . . . , λk are the distinct roots of p(λ), ofmultiplicities m1, m2, . . . , mk, p(λ) can be factored according to the formula

p(λ) = (λ − λ1)m1(λ − λ2)

m2 · · · (λ − λk)mk .

Similarly, the differential operator L factors as

L =(

ddx

− λ1

)m1(

ddx

− λ2

)m2 · · ·(

ddx

− λk

)mk , (5.23)

where the order of composition of the various factors is irrelevant. We now observe thatif λ ∈ C and m ∈ N+, then

(

ddx

− λ)m

y = 0 ⇔ y(x) = P (x)eλx, (5.24)

where P is a complex polynomial of degree ≤ m − 1. Indeed given a function y andletting h(x) = y(x)e−λx, we compute

h′(x) = y′(x)e−λx − λy(x)e−λx =[(

ddx

− λ)

y]

(x) e−λx,

h′′(x) =(

y′′(x) − 2λy′(x) + λ2y(x))

e−λx =[

(

ddx

− λ)2

y]

(x) e−λx,

...

h(m)(x) =[(

ddx

− λ)m

y]

(x) e−λx.

It follows that

(

ddx

− λ)m

y = 0 ⇔ h(m) = 0 ⇔ h is a polynomial of degree ≤ m − 1,

as claimed. Note that the implication from left to right also follows by substituting (5.3)in (4.14), as already seen in the first part of the proof for the case of k distinct roots. Bywriting now L in the form (5.23) and using the commutativity of the various factors and(5.24), we see that any function of the form (5.22) satisfies Lyh = 0.

35

Page 36: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

Theorem 5.6 identifies another basis of the vector space V of solutions of Ly = 0 onR, namely the well-known basis given explicitly by the n functions

eλjx, x eλjx, x2 eλjx, . . . , xmj−1 eλjx (1 ≤ j ≤ k).

Indeed, these functions belong to V (by the converse part of the theorem), and everyelement of V is a linear combination of them (by (5.22)). Since V has dimension n (byCorollary 4.5), these functions must be linearly independent. As a corollary one gets thefollowing result, which gives a real basis of VR when L has real coefficients and generalizesCorollary 3.7.

Corollary 5.7. Let L have real coefficients, and let

λ1, λ2, . . . , λp, α1 ± iβ1, α2 ± iβ2, . . . , αq ± iβq

be the distinct roots of the characteristic polynomial p(λ), where λj (1 ≤ j ≤ p) is a realroot of multiplicity nj, and αj ± iβj (1 ≤ j ≤ q) is a pair of complex conjugate roots bothof multiplicity mj, with

n1 + n2 + · · · + np + 2m1 + 2m2 + · · · + 2mq = n.

Any real-valued solution of the homogeneous equation Ly = 0 can be written in the form

y(x) =

p∑

j=1

Pj(x)eλjx +

q∑

j=1

eαjx(Qj(x) cos βjx + Rj(x) sin βjx),

where Pj (1 ≤ j ≤ p) is a real polynomial of degree ≤ nj − 1, and Qj, Rj (1 ≤ j ≤ q)are real polynomials of degree ≤ mj − 1. Conversely, any function of this form is a realsolution of Ly = 0.

Proof. A basis of V is given by the n functions

eλjx, x eλjx, . . . , xnj−1 eλjx (1 ≤ j ≤ p),

e(αj±iβj)x, x e(αj±iβj)x, . . . , xmj−1 e(αj±iβj)x (1 ≤ j ≤ q).

Using

eαjx cos βjx = e(αj+iβj)x+e

(αj−iβj )x

2, eαjx sin βjx = e

(αj+iβj)x−e

(αj−iβj)x

2i,

it is easy to verify that the functions

xkeαjx cos βjx, xkeαjx sin βjx (0 ≤ k ≤ mj − 1, 1 ≤ j ≤ q)

solve Ly = 0 and are linearly independent in V . It follows easily that the n functions

eλjx, x eλjx, . . . , xnj−1 eλjx (1 ≤ j ≤ p),

eαjx cos βjx, xeαjx cos βjx, . . . , xmj−1eαjx cos βjx (1 ≤ j ≤ q),

eαjx sin βjx, xeαjx sin βjx, . . . , xmj−1eαjx sin βjx (1 ≤ j ≤ q)

36

Page 37: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

are linearly independent in V and thus form a real-valued basis of V . But then thesefunctions are linearly independent in VR, so since dim VR = n (by Corollary 4.5), theyform a basis of VR. We conclude that any real-valued solution of Ly = 0 is a linearcombination of these n functions with real coefficients, and conversely, any such linearcombination is in VR.

Example 4. Find the general real solution of the differential equation

y(4) − 2y′′ + y = 1ch3x

. (5.25)

Solution. The characteristic polynomial p(λ) = λ4−2λ2 +1 = (λ2−1)2 has the roots λ1 = 1, λ2 = −1,both of multiplicity m = 2. The general solution of the homogeneous equation is then

yh(x) = (ax + b) ex + (cx + d) e−x (a, b, c, d ∈ R).

To this we must add any particular solution of (5.25), for example the solution yp of the initial valueproblem

{

y(4) − 2y′′ + y = 1ch3x

y(0) = y′(0) = y′′(0) = y′′′(0) = 0.

From (5.11), (5.12) and (5.13) we find the impulsive response

g(x) = (− 14 + 1

4x)ex + (14 + 1

4x)e−x

= 12 x chx − 1

2 sh x.

Alternatively, use the partial fraction expansion of 1/p(λ)

1(λ2−1)2 = a

λ−1 + b(λ−1)2 + c

λ+1 + d(λ+1)2 ,

compute a = −1/4, b = c = d = 1/4, and use Theorem 5.5 to get the same result.The forcing term 1

ch3xis continuous on R. By (4.7) we get ∀x ∈ R

yp(x) =1

2

∫ x

0

(x − t) ch(x − t)

ch3tdt − 1

2

∫ x

0

sh(x − t)

ch3tdt.

Now use the formulas ch(x − t) = ch x ch t − sh x sh t, sh(x − t) = shx ch t − chx sh t. The followingintegrals are immediate:

1

ch2tdt = th t + c,

sh t

ch3tdt = − 1

2ch2t+ c.

Integrating by parts we compute

t1

ch2tdt = t th t − log(ch t) + c,

tsh t

ch3tdt = − t

2ch2t+

1

2th t + c.

Thusyp(x) = 1

2 ch x log(ch x) − 14 x sh x.

The final result can be written as

y(x) = yh(x) + 12 ch x log(ch x),

by noting that the term − 14 x sh x is a solution of the homogeneous equation.

Exercises

37

Page 38: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

1. Prove Corollary 5.1.

2. Prove Proposition 5.2.

3. Solve the following initial value problems:

(a)

{

y′′′ − 3y′′ + 3y′ − y = ex

x+1

y(0) = y′(0) = y′′(0) = 0.

(b)

{

y′′′ − 2y′′ − y′ + 2y = ex

ex+1

y(0) = y′(0) = y′′(0) = 0.

(c)

{

y′′′ + y′ = 1sin x

y(π2 ) = y′(π

2 ) = y′′(π2 ) = 0.

(d)

{

y′′′ − y′′ − y′ + y = 1ch3x

y(0) = y′(0) = y′′(0) = 0.

4. Find the general real solution of each of the following differential equations:

(a) y′′′ + y = 0

(b) y(4) + y = 0

(c) y(4) + 2y′′′ + 2y′′ + 2y′ + y = 0

(d) y(5) + y = 0 (remind that cos π5 =

√5+14 , sin π

5 = 14

10 − 2√

5 )

(e) y(6) + y = 0

(f) y(8) + 8y(6) + 24y(4) + 32y′′ + 16y = 0.

5. Compute the following analytic function in terms of elementary functions:

y(x) =

∞∑

n=0

x3n

(3n)!= 1 +

x3

3!+

x6

6!+

x9

9!+ · · · .

(Hint: using differentiation term by term, show that the function y solves the differential equationy′′′ − y = 0 with the initial conditions y(0) = 1, y′(0) = y′′(0) = 0.)

6. Prove that if k ∈ N+ then∞∑

n=0

xkn

(kn)!=

1

k

k−1∑

j=0

eαjx,

where αj are the k-th roots of 1

αj =k√

1 = ei2πj

k (j = 0, 1, . . . , k − 1).

(Hint: prove that the function y(x) =∑∞

n=0xkn

(kn)! solves the differential equation y(k) − y = 0

with the initial conditions y(0) = 1, y′(0) = y′′(0) = · · · = y(k−1)(0) = 0.)

38

Page 39: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

6 The method of undetermined coefficients

The computation of the impulsive response g and of the convolution integral in (4.7) maybe rather laborious, in general. The problem of finding a particular solution of (4.1) canbe solved in a more efficient way in the case in which the forcing term f has a particularform, namely when it is a polynomial, an exponential, or a product of terms of this kind.One looks then for a particular solution which is similar to f . The unknown coefficientsin this tentative solution are determined by substitution into the differential equation.The justification of this method, known as the method of undetermined coefficients, andthe precise form of the solution to be looked for, are given by the following result and itscorollary.

Theorem 6.1. The differential equation

Ly =[

(

ddx

)n+ a1

(

ddx

)n−1+ · · · + an−1

ddx

+ an

]

y = P (x) eλ0x, (6.1)

where a1, . . . , an, λ0 ∈ C and P is a complex polynomial of degree m, has a particularsolution of the form

y(x) = xr Q(x) eλ0x, (6.2)

where Q is a complex polynomial of degree m, and

r =

{

0 if p(λ0) 6= 0multiplicity of λ0 if p(λ0) = 0.

Proof. Let g be the impulsive response of L. By Theorem 4.1, (6.1) has the particularsolution

yp(x) =

∫ x

0

g(x − t)P (t)eλ0t dt.

Let P (x) =∑m

j=0 cjxj . Recalling (2.5), (5.4) and (5.5), we can rewrite yp in convolution

form (for, e.g., x ≥ 0) as

yp =

m∑

j=0

j! cj θgλ1,m1 ∗ · · · ∗ θgλk ,mk∗ θgλ0,j+1. (6.3)

Suppose first p(λ0) 6= 0. Then the function θgλ1,m1 ∗ · · · ∗ θgλk,mk∗ θgλ0,j+1 in (6.3) is the

impulsive response of the differential operator(

ddx

− λ1

)m1 · · ·(

ddx

− λk

)mk(

ddx

− λ0

)j+1,

with the extra root λ0 of multiplicity j + 1 (see (5.5)). By Theorem 5.3 there arepolynomials Gj,1, . . . , Gj,k, Gj,0, of degrees m1 − 1, . . . , mk − 1, j, respectively, such that

θgλ1,m1 ∗ · · · ∗ θgλk,mk∗ θgλ0,j+1(x) = Gj,1(x)eλ1x + · · ·+ Gj,k(x)eλkx + Gj,0(x)eλ0x,

for x ≥ 0. The same expression is obtained for −θgλ1,m1 ∗ · · · ∗ θgλk,mk∗ θgλ0,j+1 when

x ≤ 0. The first k terms in the right-hand side of this formula are solutions of thehomogeneous equation Ly = 0 (by Theorem 5.6). It follows from (6.3) that (6.1) has aparticular solution of the form

y(x) =

m∑

j=0

j! cj Gj,0(x) eλ0x := Q(x)eλ0x,

39

Page 40: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

where Q is a polynomial of degree m = max0≤j≤m j.Suppose now p(λ0) = 0, for example let λ0 = λ1. We observe that the function

θgλ1,m1 ∗ θgλ1,j+1, that occurs in (6.3), is just the impulsive response θgλ1,m1+j+1 of thedifferential operator ( d

dx− λ1)

m1( ddx

− λ1)j+1 = ( d

dx− λ1)

m1+j+1 (for x ≥ 0). In otherwords, we have the general formula

θgλ,p ∗ θgλ,q = θgλ,p+q (λ ∈ C, p, q ∈ N+), (6.4)

that can also be proved directly from (5.4) for x ≥ 0. For x ≤ 0 we get the analogousformula −θgλ,p ∗ θgλ,q = −θgλ,p+q. By (6.3) we get for x ≥ 0

yp =

m∑

j=0

j! cj (θgλ1,m1+j+1 ∗ θgλ2,m2 ∗ · · · ∗ θgλk,mk) .

Again the expression in round brackets in this formula is the impulsive response of thedifferential operator ( d

dx−λ1)

m1+j+1 · · · ( ddx

−λk)mk , which by Theorem 5.3 is of the form

Gj,1(x)eλ1x + Gj,2(x)eλ2x + · · · + Gj,k(x)eλkx,

for polynomials Gj,1, . . . , Gj,k, with deg Gj,1 = m1 + j, degGj,l = ml − 1 (2 ≤ l ≤ k).Since the term Gj,2e

λ2 + · · ·+ Gj,keλk is a solution of Ly = 0, we conclude that (6.1) has

a particular solution given by

y(x) =

m∑

j=0

j! cj Gj,1(x) eλ1x := Q1(x)eλ1x,

where Q1 has degree m1 + m = max0≤j≤m(m1 + j). By writing out Q1 as

Q1(x) =(

d0 + d1x + · · · + dm1−1xm1−1

)

+ dm1xm1 + · · ·+ dm1+mxm1+m,

we see that the polynomial in round brackets, multiplied by eλ1x, is a solution of Ly = 0.Finally, we obtain a particular solution of (6.1) of the form

xm1 (dm1 + dm1+1x + · · · + dm1+mxm) eλ0x = xrQ(x)eλ0x,

where deg Q = m, and r = m1 is the multiplicity of λ0 in p(λ).

Remark 8. The polynomial Q in (6.2) is uniquely determined by the requirement thaty given by (6.2) satisfy (6.1). See, for instance, [4], pp. 97-98.

By applying the theorem with L and P real, and separating out the real and imaginaryparts in the complex solution (6.2), we obtain the following real version of the methodof undetermined coefficients.

Corollary 6.2. If L in (6.1) has real coefficients and P is a real polynomial of degreem, then the differential equation Ly = P (x)eαx cos βx, where α, β ∈ R, has a particularsolution of the form

y(x) = xr eαx(Q1(x) cos βx + Q2(x) sin βx), (6.5)

40

Page 41: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

where Q1, Q2 are real polynomials of degree ≤ m (but at least one of them has degree m),and

r =

{

0 if p(α + iβ) 6= 0multiplicity of α + iβ if p(α + iβ) = 0.

A similar result holds for the differential equation Ly = P (x)eαx sin βx (β 6= 0).

Proof. Let β 6= 0. By letting λ0 = α + iβ in Theorem 6.1 we see that the equationLy = P (x)e(α+iβ)x has a particular solution yc of the form

yc(x) = xr Q(x) e(α+iβ)x = xr (Q1(x) + iQ2(x)) eαx (cos βx + i sin βx) ,

where Q1, Q2 are real polynomials of degree ≤ m and at least one of them has degree m(since Q has degree m). Separating out the real and imaginary parts we get

yc(x) = xr eαx{Q1(x) cos βx − Q2(x) sin βx + i[Q2(x) cos βx + Q1(x) sin βx]}.

By linearity and the fact that L has real coefficients, it follows that the function

y1(x) = Re yc(x) = xr eαx [Q1(x) cos βx − Q2(x) sin βx]

solvesLy = P (x) eαx cos βx,

whereas the function

y2(x) = Im yc(x) = xr eαx [Q2(x) cos βx + Q1(x) sin βx]

solvesLy = P (x) eαx sin βx.

We thus obtain (6.5) (with −Q2 in place of Q2). Note that if (Q1, Q2) are the polynomialsin the particular solution (6.5) with forcing term P (x)eαx cos βx, then the polynomials(−Q2, Q1) give the particular solution with forcing term P (x)eαx sin βx. Also note thatfor β 6= 0 the polynomial Q is generally complex-valued (i.e., Q2 6= 0) even thoughP and L have real coefficients. If β = 0 the result (6.5) for a particular solution ofLy = P (x)eαx (namely y(x) = xreαxQ1(x) with Q1 of degree m) becomes identical with(6.2), the polynomial Q being real-valued if λ0 ∈ R.

We observe that, for calculational purposes, it is often simpler to use the complexformalism, namely in order to find a particular solutions of Ly = P (x)eαx cos βx (resp.Ly = P (x)eαx sin βx) it is generally easier to solve Ly = P (x)e(α+iβ)x by Theorem 6.1,and then take the real (resp. imaginary) part of the complex solution thus obtained.

Example 5. Find a particular solution of the differential equation

y′′ − 4y′ + 5y = x2e2x cosx. (6.6)

Solution. The characteristic polynomial p(λ) = λ2 − 4λ + 5 has roots λ = 2± i, both of multiplicity1, and the general real solution of the homogeneous equation is

yom(x) = c1e2x cosx + c2e

2x sin x (c1, c2 ∈ R).

41

Page 42: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

As P (x) = x2 is a polynomial of degree 2, Corollary 6.2 implies that (6.6) has a particular solution ofthe form

y1(x) = x e2x[(ax2 + bx + c) cosx + (dx2 + ex + f) sin x] (6.7)

where a, b, c, d, e, f ∈ R. Substituting (6.7) in (6.6) we find, with a little tedious calculation, a = c = e =0, b = −f = 1/4, d = 1/6.

Using the complex formalism simplifies the computation, as we now show. Instead of solving (6.6),we solve the complex equation

y′′ − 4y′ + 5y = x2e(2+i)x. (6.8)

According to Theorem 6.1, this equation has a particular solution of the form

y(x) = x e(2+i)x(Ax2 + Bx + C) = e(2+i)x(Ax3 + Bx2 + Cx)

where A, B, C are complex constant to be determined. We have

y′(x) = e(2+i)x[ (2 + i)(Ax3 + Bx2 + Cx) + 3Ax2 + 2Bx + C ],

y′′(x) = e(2+i)x[ (2 + i)2(Ax3 + Bx2 + Cx) + 2(2 + i)(3Ax2 + 2Bx + C) + 6Ax + 2B ].

Substituting in (6.8) we get the equality

e(2+i)x{[ (2 + i)2 − 4(2 + i) + 5](Ax3 + Bx2 + Cx) + 2(2 + i)(3Ax2 + 2Bx + C)

− 4(3Ax2 + 2Bx + C) + 6Ax + 2B} = x2e(2+i)x.

Now the term in square brackets vanishes, being equal to p(2 + i) = 0, and we get

6iAx2 + 2(3A + 2iB)x + 2B + 2iC = x2,

whence

6iA = 1

3A + 2iB = 0

B + iC = 0,

=⇒

A = −i/6

B = 1/4

C = i/4.

It follows that (6.8) has the particular solution

y(x) = x e(2+i)x(− 16 ix2 + 1

4x + 14 i)

= x e2x(cosx + i sinx)[ 14x + i(1

4 − 16x2)]

= x e2x{ 14x cosx + (1

6x2 − 14) sin x + i[(1

4 − 16x2) cosx + 1

4x sin x]}.

Since x2e2x cosx = Re(

x2e(2+i)x)

, the real solution sought of (6.6) is precisely

y1(x) = Re y(x) = x e2x[ 14x cosx + (1

6x2 − 14) sinx],

in agreement with the calculation using the real formalism. By Corollary 6.2, it also follows that thefunction

y2(x) = Im y(x) = x e2x[(14 − 1

6x2) cosx + 14x sin x]

solvesy′′ − 4y′ + 5y = Im

(

x2e(2+i)x)

= x2e2x sin x.

Exercises

42

Page 43: An introduction to linear ordinary differential equations ...calvino.polito.it/~camporesi/Eqdiff6.pdf · 1 Introduction In view of their many applications in various fields of science

1. Find a particular solution of the differential equation

y(4) − y = f(x)

for each of the following forcing terms:

(a) f(x) = ex (b) f(x) = cosx (c) f(x) = sin x

(d) f(x) = ex cosx (e) f(x) = x ex sin x (f) f(x) = x2ex cosx

2. Find a particular solution of the differential equation

y′′′ − 3y′′ + 4y′ − 2y = x2ex sin x.

References

[1] R. Camporesi, Linear ordinary differential equations with constant coefficients. Re-visiting the impulsive response method using factorization, Internat. J. Math. Ed.Sci. Tech. 42 (2011) 497-514.

[2] R. Camporesi, A fresh look at linear ordinary differential equations with constantcoefficients. Revisiting the impulsive response method using factorization, Internat.J. Math. Ed. Sci. Tech. (2015) (to appear).

[3] E. A. Coddington and N. Levinson, Theory of ordinary differential equations,McGraw-Hill Book Company, Inc., New York-Toronto-London, 1955.

[4] E. A. Coddington, An introduction to ordinary differential equations, Prentice-HallMathematics Series, Prentice-Hall, Inc., Englewood Cliffs, N.J. 1961.

[5] G. Doetsch, Introduction to the theory and application of the Laplace transformation,Springer-Verlag, New York-Heidelberg, 1974.

[6] L. Schwartz, Methodes mathematiques pour les sciences physiques, Enseignement desSciences, Hermann, Paris, 1961.

43