fullnotes - ode

104
THE UNIVERSITY OF NEWCASTLE MATH 2310 ORDINARY DIFFERENTIAL EQUATIONS STRAND DAVID PASK, REVISED BY AIDAN SIMS Contents Course Notes 1. Differential equations we can solve 1 1.1. Preliminaries 1 1.2. First order ordinary differential equations 2 1.3. Higher order linear ODE’s with constant coefficients 9 2. Existence-Uniqueness 12 3. Direction Fields 15 4. Numerical solutions of differential equations 19 5. The Laplace Transform 26 6. The Fourier Transform 41 6.1. Fourier series 41 6.2. Periods other than 2π. 43 6.3. Complex Fourier series. 44 6.4. Fourier integrals 45 6.5. Sine and Cosine Fourier transforms 46 6.6. The Fourier transform 49 7. Higher order homogeneous linear Ordinary Differential Equations: the Wronskian 50 8. Series solutions 54 9. Other methods for higher-order ODEs 60 Exercises 1. Exercises — Solvable DE’s 68 2. Exercises — Existence-Uniqueness 71 3. Exercises — Direction Fields 73 4. Exercises — Numerical solutions of differential equations 74 5. Exercises — The Laplace Transform 75 6. Exercises — the Fourier Transform 79 7. Exercises — Wronskians 80 8. Exercises — Series solutions 82 Date : Semester 1, 2006.

Upload: api-3835421

Post on 10-Apr-2015

446 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: FullNotes - ODE

THE UNIVERSITY OF NEWCASTLE

MATH 2310

ORDINARY DIFFERENTIAL EQUATIONS STRAND

DAVID PASK, REVISED BY AIDAN SIMS

Contents

Course Notes1. Differential equations we can solve 11.1. Preliminaries 11.2. First order ordinary differential equations 21.3. Higher order linear ODE’s with constant coefficients 92. Existence-Uniqueness 123. Direction Fields 154. Numerical solutions of differential equations 195. The Laplace Transform 266. The Fourier Transform 416.1. Fourier series 416.2. Periods other than 2π. 436.3. Complex Fourier series. 446.4. Fourier integrals 456.5. Sine and Cosine Fourier transforms 466.6. The Fourier transform 497. Higher order homogeneous linear Ordinary Differential Equations: the

Wronskian 508. Series solutions 549. Other methods for higher-order ODEs 60Exercises1. Exercises — Solvable DE’s 682. Exercises — Existence-Uniqueness 713. Exercises — Direction Fields 734. Exercises — Numerical solutions of differential equations 745. Exercises — The Laplace Transform 756. Exercises — the Fourier Transform 797. Exercises — Wronskians 808. Exercises — Series solutions 82

Date: Semester 1, 2006.

Page 2: FullNotes - ODE

DAVID PASK, REVISED BY AIDAN SIMS

9. Exercises — Reduction of Order and Variation of Parameters 83Answers to Exercises1. Answers — Solvable DE’s 852. Answers — Existence-Uniqueness 883. Answers — Direction Fields 904. Answers — Numerical Solutions of Differential Equations 925. Answers — Laplace Transform 936. Answers — the Fourier Transform 977. Answers — Wronskians 998. Answers — Series 1009. Answers — Reduction of Order and Variation of Parameters 101

Page 3: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 1

MATH2310, Semester I, 2006, ODE’s strand — Notes

1. Differential equations we can solve

1.1. Preliminaries. The material in this section is covered in Stewart (4th. ed. Chapter10, 3rd. ed. Chapter 15), in Zill and Cullen (Part I, Section 2) and in Kreysig (8th. ed.Chapter 1).

Throughout this subject we shall be dealing with functions, as we are trying to solveequations satisfied by the derivative of some function. If y is a function of the singlevariable x then we usually record this by writing y = y(x). In such a situation thevariable x is referred to as the independent variable and y the dependent variable.

Definition 1.1. A differential equation (or simply D.E.) is any equation containing atleast one derivative of an unknown function.

The equations sin x = 0, x2+2x+1 = 0, f(x) = 0 for some function f are not differentialequations. These equations simply find the zeroes of some function.

Examples 1.2. The following are examples of differential equations:

(i) y = y(x),dy

dx+ 2xy = 3 cos(2x),

(ii) u = u(x, t),∂2u

∂x2− ∂u

∂t= e−xt,

(iii) y = y(x), (1− 2x)y′′ + xy′ + exey = 0.

Note 1.3. We shall sometimes use the standard abbreviations for the derivative of a

function: y′ =dy

dx, y′′ =

d2y

dx2and y =

dy

dt, etc.

Definitions 1.4. An ordinary differential equation involve function(s) of a single inde-pendent variable. Examples 1.2 (i) and (iii) are ordinary differential equations. If thedifferential equation involves a function of more than one variable, then it is a partialdifferential equation. Example 1.2(ii) is a partial differential equation. The order of adifferential equation is the order of the highest derivative in the equation. Examples 1.2(i) is first order, and Examples 1.2 (ii) and (iii) are second order.

An ordinary differential equation is linear if it has the form

an(x)dny

dxn+ an−1(x)

dn−1y

dxn−1+ . . . + a0(x)y = g(x)

where an(x), . . . , a0(x), g(x) are functions of x only. A function which satisfies a givendifferential equation (in particular its derivatives must exist up to the order of thedifferential equation) is called a solution.

In particular a linear ordinary differential equation does not involve any terms of theform (y′)2, ln y, ey, y′y′′, sin y or

√y, etc. As we shall see later, a solution y = y(x) to

a given ordinary differential equation may only be valid in some interval a < x < b. Inthis subject we shall only study ordinary differential equations.

Example 1.5. The function y = y(x) = x2 is a solution to the first order linear ordinarydifferential equation xy′ = 2y for all x. To see this, substitute y = x2 into the differentialequation to get

xy′ = x(2x) = 2x2 = 2x2 = 2y.

Page 4: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 2

1.2. First order ordinary differential equations. The most general type of firstorder ordinary differential equation is of the form

F (x, y, y′) = 0, where y = y(x).

For instance, the differential equation xy′ = 2y given in Example 1.5 is an example whereF (x, y, y′) = xy′−2y. There are special classes of first order differential equations whichwe shall study:

(A) Separable: A first order separable differential equation has the form

(1.1)dy

dx= Y (y)X(x),

where Y is a function of y only and X a function of x only – these differential equa-tions are not necessarily linear (see Example 1.6 below). First order separable ordinarydifferential equations occur in a variety of contexts: Newton’s law of heating/cooling,Population models such as the Logistic equation, Radioactive decay, Compound inter-est, Reaction rates, Disease infection models, Mass transfer problems such as the onesgiven in Applications 1.8 below.

We solve a differential equation of the form (1.1) by “separating the variables”, whichinvolves moving all the y’s across to the left side and the x’s to the right side. Integratingthe resulting equation with respect to x we then have

∫1

Y (y)

dy

dxdx =

∫X(x)dx, which is the same as

∫1

Y (y)dy =

∫X(x)dx by the integration by substitution rule.

Example 1.6. To solvedy

dx=

√y

x, where y ≥ 0 and x 6= 0. We separate the variables to

get ∫1√ydy =

∫1

xdx.

Recall that

∫xndx =

xn+1

n + 1+ c if n 6= −1 and if n = −1, then

∫1

x= ln |x| + c. So if

we integrate the above expressions we have

2y12 = ln |x|+ c and so if we square then(1.2)

y =

(1

2ln |x|+ c

2

)2

provided that1

2ln |x|+ c

2≥ 0,

which gives a “one–parameter family of solutions” since there is a solution for each valueof c – this (infinite) family is sometimes called the general solution of the differentialequation. The graphs of these functions form a family of curves in the plane. The curvesfill out a region in the plane for which the differential equation makes sense (here y ≥ 0,

Page 5: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 3

and x 6= 0).

.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

..........................................................................................................................................................................................................................................................................................................

...............................

.......................

.......................................................................................................................................................

..........................................................................................................................................................................................................................................................................................................

.............................................................................................................................................................................................................

..................................................................................................................................................................................................................................................................................................................................................................................................................................................

..............................................................................................................................................................................................................................................................................................................................................................................................................

....................................

...................................................................................................................................................

.................................................................

...........................................

................................

...........................

.......................

....................

...............................................................................................................................................

...................................................................................................................................................

.................................................................

...........................................

................................

..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

............................................................................................................................................................................................................................................................................................................................................................................................................................................................................. .................................................................................... ...................

........

..........................

...................

c = 0c = 0

c = 1c = 1

c = −1c = −1c = 2 c = 2

1−1

y

x

The existence and uniqueness theorem in the next section (Theorem 2) essentiallysays that under certain hypotheses there is a unique curve through any point in thisregion. For instance the differential equation y′ = 2x has general solution y = x2 + c,and these parabolas, as c varies, fill out the plane.

To obtain a solution to our differential equation we need to specify the value of thearbitrary constant c, which is usually done by giving an “initial (or boundary) condition”which corresponds to choosing a point in the plane which the solution curve must passthrough.

For instance if we wish to solve the initial value problem:

dy

dx=

√y

x, where y(1) = 0

which corresponds to finding a solution curve which passes through the point (1, 0).

From (1.2) the general solution to the differential equation is 2√

y(x) = ln |x| + c, andto solve the initial value problem we substitute x = 1, y = 0 and determine the value ofc. This gives 2

√0 = ln(1) + c which implies that c = 0 and so the required solution is

2√

y = ln |x| = ln(x) or y =1

4(ln x)2 , where x ≥ 1,

since ln x ≥ 0 if x ≥ 1. This is the curve labelled c = 0 on the right hand side ofthe above diagram. Note that if y(−1) = 0 then we would have a different solution:2√

y = ln(−x) since x < 0. This is the curve labelled c = 0 on the left hand side of theabove diagram.

(B) Linear: A first order linear differential equations is of the form

(1.3) a1(x)dy

dx+ a0(x)y = h(x)

where a1(x), a0(x), h(x) are functions of x only. Note that if h(x) = 0 then the differentialequation (1.3) is also separable. First order linear ordinary differential equations occurin a variety of contexts: Newton’s law of cooling/heating, Radioactive decay, Compoundinterest, and Electrical circuit theory such as the one given in Applications 1.8 below.

We solve a differential equation of the form (1.3) by first dividing through by a1(x)to rewrite this equation in the standard form:

(1.4)dy

dx+ p(x)y = q(x).

Page 6: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 4

If we now multiply equation (1.4) through by I = I(x) we get

(1.5) Idy

dx+ Ipy = Iq.

Suppose that the function I is such that the left–hand side of (1.5) is the derivative ofIy, that is of the form

(1.6) Idy

dx+

dI

dxy =

d

dx(Iy),

then comparing the left–hand sides of the two expressions (1.5) and (1.6) we find thatI must satisfy the first order seperable differential equation

dI

dx= Ip and so

∫dI

I=

∫p(x)dx or

ln |I| =∫

p(x)dx + c in which case I(x) = c′e∫

p(x)dx,

where c′ is a constant which we may choose to be 1. The function I(x) is called theintegrating factor. For such a function I, the differential equation (1.5) or (1.4) thenbecomes

d

dx(Iy) = Iq,

This differential equation is exact and we can solve it by integrating both sides withrespect to x. Hence we can see that solution to (1.5) or (1.4) is then

Iy =

∫Iq.dx + c or y(x) =

1

I(x)

∫I(x)q(x).dx +

c

I(x).

Example 1.7. Find the general solution of the differential equation

dM

dt+

(3

t + 100

)M = 7 where M = M(t), t > 0,

which is already in the standard form (1.4). To compute the integrating factor weevaluate

µ(t) = e

∫3

t+100dt

= e3 ln |t+100|

Since t > 0 we have t + 100 > 0 and so |t + 100| = t + 100 and hence µ(t) = (t + 100)3.If however t < −100 then t + 100 < 0 and so |t + 100| = −(t + 100) and then µ(t) =−(t + 100)3.

Returning to the case where t > 0 we multiply the differential equation through bythe integrating factor µ we get

(t + 100)3dM

dt+ 3(t + 100)2M = 7(t + 100)3 or

d

dt

((t + 100)3M

)= 7(t + 100)3 which integrates to

(t + 100)3M =7

4(t + 100)4 + A and so the general solution is

M =7

4(t + 100) +

A

(t + 100)3,

Page 7: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 5

where A is a constant. Observe that the solution has a discontinuity at t = −100, thevalue of t at which the original differential equation is undefined. If M(0) = 0 then ashort calculation shows that A = −7

4× 108. A plot of the solution curve is shown by

the part of the graph in the picture below to the right of t = −100.If t < −100, then as mentioned above the integrating factor is µ(t) = −(t + 100)3.

Multiplying the differential equation through by the integrating factor we get

−(t + 100)3dM

dt− 3(t + 100)2M = −7(t + 100)3 or

d

dt

(−(t + 100)3M)

= −7(t + 100)3 which integrates to

−(t + 100)3M = −7

4(t + 100)4 + A and so the general solution is

M =7

4(t + 100)− A

(t + 100)3,

where A is a constant. Observe that the solution in this case is essentially the sameas for t > −100 and has a discontinuity at t = −100. If M(−200) = 0 then a shortcalculation shows that A = 7

4× 108. A plot of the solution curve is shown by the part

of the graph in the picture below to the left of t = −100.

......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

......

............................................................................................................................................................................................................................................................................................................................................................................................................................................

...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

.............................. ...................

...........................

...........................................................................................................................................................................................................................................................

−100 0−200

t

M(t)

Applications 1.8.

(i) First order linear separable differential equations frequently occur in models ofsome process where the rate of change of some quantity is proportional to theamount of that quantity.

If we suppose that dry ice sublimes at a rate proportional to its (exposed)surface area. Then the equation which models this behaviour is arrived at asfollows: the independent variable is t and the dependent variable is V = V (t),the volume of dry ice. In our model we are assuming that

dV

dt= −kS,

where S = S(t) is the surface area of dry ice at the time its volume is V andk > 0 is the constant of proportionality. Note the minus sign since k is positiveand the volume is decreasing.

Page 8: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 6

If the dry ice is in the shape of a spherical ball, and retains its shape as it

sublimes, then V =4

3πr3 where r = r(t) is the radius of the ball at time t and

then S = 4πr2 so that by the chain rule

dV

dt=

dV

dr

dr

dt=

4

3π3r2dr

dt= −k4πr2

which simplifies to

dr

dt= −k,

which is a first order separable differential equation. Integrating directly we maysee that this differential equation has general solution r = −kt + c. In fact c isequal to the radius r0 of the sphere at time t = 0, and then substituting we findthat

S = 4π(r0 − kt)2 and V =4

3π(r0 − kt)3.

A typical plot of V (t) against t has the form:

........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

..........................................................................................................

...............................

.......................

.....................

....................

...............................................................................................................................................................................................

....................................................... ...................

........

........

........

........

.......................

...................V (t)

t

One may equally apply the same technique to models for radioactive decay orNewton’s law of cooling/warming. For more examples see the Exercises at theend of this section (or Kreysig section 1.4).

(ii) A common source of examples of first order linear (or integrating factor) differ-ential equations come from “mixing” problems (see Kreysig section 1.6): A largetank initially contains 2000 litres of pure water. Brine containing 0.25 kg. of saltper litre flows into the tank at a rate of 20 litres per minute. The well–mixedsolution flows out of the tank at the rate of 40 litres per minute. Find the num-ber of kg. of salt M(t) in the tank at any time t, and the concentration of thelast fluid to flow out of the tank.

The net rate at which M(t) changes at time t is given by

dM

dt= ( rate at which salt mass enters)− ( rate at which salt mass leaves)

= (20× 0.25)− 40M(t)

V (t)kg. per minute ,

where V (t) is the volume of water in the tank at time t. Alternatively, we mayconsider the change ∆M of salt mass in the tank over a small time interval t to

Page 9: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 7

t + ∆t:

∆M = (20× 0.25)∆t− 40M(t)

V (t)∆t

letting ∆t → 0 we arrive at the same differential equation. Now

dV

dt= 20− 40 = −20 litres per minute, and so V = −20t + A litres.

If the brine is added at time t = 0, then V (0) = A = 2000 and so V (t) =2000 − 20t litres. Observe that the tank is empty when V (t) = 0, i.e. whent = 100 minutes. Hence we have the differential equation

dM

dt= 5−

(40

20(100− t)

)M or

dM

dt+

(2

100− t

)M = 5.(1.7)

The integrating factor is then

µ(t) = e

∫2

100−tdt

= e−2 ln |100−t| = (100− t)−2 as t < 100.

Hence we may now rewrite (1.7) as:

d

dt

((100− t)−2M

)=

5

(100− t)2so, integrating we get

1

(100− t)2M =

5

100− t+ B and so the general solution is

M = 5(100− t) + B(100− t)2,

where B is a constant. When t = 0, M = 0 and so 0 = M(0) = 500 + B × 104

which gives B = −5× 10−2, hence

M(t) = 5(100− t)− 5× 10−2(100− t)2.

A plot of M(t) against t has the form:

M(t)

50 100

125

t

Page 10: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 8

Finally, the concentration C at time t is given by C(t) =M(t)

V (t). To obtain the

differential equation satisfied by the concentration we substitute M = CV into(1.7) and use the product rule for differentiation to get

d

dt

(CV

)+

(2

100− t

)CV = 5

VdC

dt+ C

dV

dt+

2

(100− t)20(100− t)C = 5 since V = 20(100− t),

20(100− t)dC

dt− 20C + 40C = 5 since

dV

dt= −20, and so

dC

dt+

(1

100− t

)C =

5

20(100− t).

This first order linear differential equation has integrating factor (100− t)−1 andsince C(0) = 0 has solution

C(t) =1

4− 1

400(100− t),

so that C(100) = 0.25 and so the last fluid to leave the tank has concentration0.25 kg. per litre. Note that substituting the solutions for M(t) and V (t) found

earlier into C(t) =M(t)

V (t)gives the same answer. Physical considerations might

also lead us to the same conclusion without calculation.(iii) Electrical circuits. The voltage drop across and inductor of inductance L Henry

is LdI

dtvolts where I is the current through the inductor (in Amps). The voltage

drop across a capacitor with charge Q Coulombs and capacitance C Farads isQ

Cvolts. The voltage drop across a resistor of resistance R Ohms is IR where I isthe current through the resistor (in Amps). Given that the current I is the rate

of flow of charge we have I =dQ

dt.

Kirchoff’s second law says that in any loop the sum of the voltage drops isequal to the supplied voltage (e.g. from a battery). Hence for a RC–circuit,which consists of a capacitor, a resistor and an e.m.f. source E(t) we have

(1.8) IR +1

CQ = E(t) or R

dQ

dt+

1

CQ = E(t).

For an RL–circuit which consists of a resistor, an inductor and an e.m.f. sourceE(t) we have

(1.9) IR + LdI

dt= E(t).

Both equations (1.8) and (1.9) give rise to first order linear differential equations.For instance if I = I(t) is the current in an RL–circuit at time t with R = 5Ohms, L = 4 Henrys and constant supplied voltage of E = 8 volts then (1.9)

Page 11: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 9

becomes

(1.10) 4dI

dt+ 5I = 8 or

dI

dt+

5

4I = 2.

The integrating factor is then

µ(t) = e

∫54dt

= e54t.

Hence the solution to our differential equation is

d

dt

(e

54tI

)= 2e

54t and so e

54tI(t) =

8

5e

54t + A

the general solution is then I(t) =8

5+ Ae−

54t,

where A is a constant. If the current is zero at time t = 0, i.e. I(0) = 0, then

0 =8

5+ A and so A = −8

5. A plot of I(t) against t has the form:

...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

...

.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. ................................................................ ...................

........

........

........

....................

...................

........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........85

I(t)

t

Evidently I → 8

5Amps as t → ∞. Such a steady state can also be obtained

from the original differential equation (1.10) by puttingdI

dt= 0.

1.3. Higher order linear ODE’s with constant coefficients. As we have seen,there are only a few special cases of first order differential equations that we can solveexplicitly. For higher-order ODE’s, the situation is even worse.

There is really only one class of higher-order ODE’s that we can truly solve system-atically. These are the higher-order linear ODE’s with constant coefficients.

A linear ODE with constant coefficients is a differential equation of the form

(1.11) cndny

dxn+ cn−1

dn−1y

dxn−1+ . . . + c0y = f(x),

where cn, cn−1, . . . , c0 are complex numbers.We handle this in two steps, which we will revisit later when we consider more general

linear ODE’s. The idea is that we first find the complete solution to the homogeneousdifferential equation

(1.12) cndny

dxn+ cn−1

dn−1y

dxn−1+ . . . + c0y = 0,

Page 12: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 10

and call this the general solution to the homogeneous ODE, and denote it yg. Then we“guess” a solution to the non-homogeneous DE (1.11), which we call yp. If we add yp toyc, we obtain the complete solution to the original ODE.The homogeneous DE. Inspired by the solution in the case n = 1 we look for asolution of the form y(x) = erx, where r is a complex number. Substituting into theequation (1.11) we get

cnrnerx + cn−1r

n−1erx + . . . + c0erx = 0

erx(cnr

n + cn−1rn−1 + . . . + c0

)= 0

for all x. Since erx is not zero for any x it follows that we must have

(1.13) cnrn + cn−1rn−1 + . . . + c0 = 0.

The polynomial cnrn+cn−1r

n−1+. . .+c0 is called the characteristic or auxillary equation.Suppose now that the characteristic equation has roots r1, . . . , rn. To the roots of (1.13)we attach solutions to the homogeneous equation (1.11) as follows:

(1) If rj is distinct from all the other roots then the function yj(x) = erjx is acorresponding solution of (1.11).

(2) If rj is of multiplicity k > 1 then we obtain a collection of k different solutionsof (1.11): {erjx, xerjx, . . . xk−1erjx}. For rj = 1 and k = 2 it is straightforward touse the Wronskian to check that ex and xex are linearly independent.

Since every complex polynomial of degree n factors into n terms of the form (x− zi)where each zi is a complex number, the above procedure always gives us n solutionsf1(x), . . . , fn(x) where each fi(x) is of the form fi(x) = xmiezix.

To obtain the general solution to the homogeneous higher-order linear ODE withconstant coefficients (1.12), we take all possible combinations of this fundamental set ofn solutions. That is,

yg(x) := A1f1(x) + · · ·+ Anfn(x) = A1xm1ez1x + · · ·+ Anx

mneznx.

We will see later in the section on general higher-order linear ODE’s how to check thatthese solutions are all truly distinct and that they combine to give the general solution.For now we just take it on faith.

Remark 1.9. If all the ci are real, so the DE is a “real” DE, then it is not particu-larly satisfying to obtain complex solutions. For example, for the DE y′′ + y = 0, thecharacteristic equation is r2 + 1 = 0, so the solutions to the DE are f1(x) = eix andf2(x) = e−ix.

Fortunately, there is a way around this. If all the ci are real, then the characteristicpolynomial is a real polynomial, so any complex roots occur in complex conjugate pairsα + iβ and α − iβ. In this case, the corresponding solutions are e(α+iβ)x and e(α−iβ)x,which we can rewrite as

eαxeiβx and eαxe−iβx.

If we use the formula eiθ = cos(θ) + i sin(θ) that we learned in first year, we can deducethat

{Aeαxeiβx + Beαxe−iβx : A,B ∈ R} = {Ceαx cos(βx) + Deαx sin(βx) : C,D ∈ R}.

Page 13: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 11

So when all the ci are real, and α + iβ and α− iβ are roots of the characteristic poly-nomial, we can replace e(α+iβ)x and e(α−iβ)x with eαx cos(βx) and eαx sin(βx) throughoutthe resulting fundamental set of solutions.

Examples 1.10. The general solution of

(1) y′′ + 2y′ − 3y = 0 is y(x) = Aex + Be−3x, since the characteristic equation is(r + 3)(r − 1) = 0.

(2) y′′ − 4y′ + 4y = 0 is y(x) = Ae2x + Bxe2x, since the characteristic equation is(r − 2)2 = 0.

(3) y′′−2y′+17y = 0 is y(x) = Ae(1+4i)x +Be(1−4i)x or Aex cos 4x+Bex sin 4x, sincethe characteristic equation is (r−1+4i)(r−1−4i) = (r−(1−4i))(r−(1+4i)) = 0.

(4) y′′+9y = 0 is Ae3ix+Be−3ix or y(x) = A cos 3x+B sin 3x, since the characteristicequation is (r − 3i)(r + 3i) = 0.

(5) y′′′−y′ = 0 is y(x) = Ae0.x+Bex+Ce−x = A+Bex+Ce−x, since the characteristicequation is r(r − 1)(r + 1) = 0.

(6) y′′ = 0 is y(x) = Ae0.x + Bxe0.x = A + Bx, since the characteristic equation isr2 = 0.

(7) y(5) − y(4) − y′ + y = 0 is y(x) = Aex + Bxex + Ce−x + Deix + Ee−ix or Aex +Bxex + Ce−x + D cos(x) + E sin(x) since the characteristic equation is

(r − 1)2(r + 1− i)(r + 1 + i) = (r − 1)2(r − (−1 + i))(r − (−1− i)) = 0.

(8) y′′−2iy′−y = 0 is Ae−x+Bxeix since the characteristic equation is r2−2ir−1 =(r − i)2.

The particular solution. Now we need a single solution to the non-homogeneousDE (1.11). The idea is that we guess. To do this, we look at the right-hand side of theDE, and try an arbitrary function of that form. We substitute our guess into the DEand then try to solve to find the coefficients.

The following table indicates what guess to make based on what is on the right-handside of the DE. If there is a sum of terms on the right-hand side, we add together theguesses for the individual terms.

type of f(x) Guess for yp

xn Anxn + · · ·+ A1x + A0

eαx Aeαx

sin(αx)cos(αx)

A sin(αx) + B cos(αx)

sinh(αx)cosh(αx)

A sinh(αx) + B cosh(αx)

xnf(x) (Anxn + · · ·+ A1x + A0)×(guess for f(x))

There is only one problem. If the left-hand side is already one of the fundamental setof solutions to the homogeneous DE, we can’t use it, so we multiply by a large enoughpower of x to eliminate the problem, and try that instead.

Page 14: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 12

Examples 1.11. Solve

(1) y′′+2y′−3y = e2x. yg(x) = Aex+Be−3x as above. For yp(x), guess yp(x) = ke2x.Then

y′′p + 2y′p − 3yp = 4ke2x + 2× 2ke2x − 3ke2x = 5ke2x.

Since RHS of DE is e2x, take k = 15: yp = 1

5e2x. General solution is Aex+Be−3x+

15e2x.

(2) y′′ − 4y′ + 4y = 8x. yg(x) = Ae2x + Bxe2x. Try yp = k1x + k0. Then

y′′p − 4y′p + 4y = −4k1 + 4(k1x + k0) = 4k1x + 4(k0 − k1).

Comparing coefficients with RHS of DE, need 4k1 = 8 and 4(k0 − k1) = 0, sok1 = 2 and k0 = 2. So the general solution is y(x) = Ae2x + Bxe2x + 2x + 2.

(3) y′′′ − y′ = 2ex. yg(x) = Ae0.x + Bex + Ce−x = A + Bex + Ce−x. Can’t tryyp(x) = kex as ex is a solution to the homogeneous DE. Try yp(x) = kxex. Then

y′′′p − y′p = (3kex + kxex)− (kex + kxex) = 2kex.

Comparing with RHS of DE, want k = 12; that is yp = 1

2xex, and the solution is

y(x) = A + Bex + Ce−x + 12xex.

2. Existence-Uniqueness

References for this section are: Kreysig is section 1.9 and Zill and Cullen section 2.1.Recall from Section 1 that the most general first order ordinary differential equation

is of the form F (x, y, y′) = 0, for some function F . Do solutions always exist? No –consider the differential equation (y′)2+1 = 0, this has no real–valued solution. However,if the differential equation can be written in the form

(2.1)dy

dx= f(x, y)

where f : R2 → R, then a real–valued solution always exists provided that f satisfiescertain conditions.

Examples 2.1. (i) For f(x, y) =

√y

x, recall from Example 1.6 the separable differ-

ential equation y′ = f(x, y) has general solution 2√

y = ln |x|+ c, where c ∈ R.

(ii) For f(x, y) = 7− 3

x + 100y, recall from Example 1.7 the linear differential equa-

tion y′ = f(x, y) has general solution y =7

4(x+100)+

A

(x + 100)3, where A ∈ R.

As we can see from Examples 2.1, the general solution of (2.1) contains one arbitraryconstant. To obtain a single solution, we need to impose an “initial (or boundary)condition”: y(x0) = y0.

Example 2.2. A solution of the initial value problem

y′ =√

y

x, with y(1) = 0

is 2√

y = ln |x| = ln x, as x ≥ 1. But: y(x) ≡ 0 also satisfies the same initial value

problem, that is y′ =√

y

x, y(1) = 0 does not have a unique solution.

Page 15: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 13

If there is a number c such that f(x, c) ≡ 0 (i.e. f(x, c) = 0 for all x), then the constantfunction y(x) = c is a solution to (2.1).

Example 2.3. Since f(x, y) =1

4y2 − 1 =

1

4(y − 2)(y + 2), the differential equation

dy

dx=

1

4y2 − 1

has constant solutions y = 2 and y = −2. Note that these two constant solutions are theunique solutions satisfying the initial conditions y(0) = 2, y(0) = −2 respectively. Forother initial conditions there is a unique solution, which is not a constant function andis found by the method of separation of variables. Note that the method of separationof variables does not work (division by 0) for this differential equation precisely wheny = ±2.

As we shall see later, constant solutions can tell us much about the behaviour of othersolutions of the ordinary differential equation for large values of the independent variable(such as x or t).

Theorem 2.4. [Existence and Uniqueness]

If f and∂f

∂yare continuous on some rectangle in the XY –plane centred on (x0, y0)

then the initial value problem

dy

dx= f(x, y) with y(x0) = y0,

has a unique solution which is continuous on at least |x− x0| < h where h > 0.

The existence and uniqueness theorem essentially says that if f and∂f

∂y(which we

sometimes write fy) are continuous at (x0, y0) then there is a unique solution curvethrough that point. Note that the rectangle mentioned in Theorem should have anonzero height and width.

Examples 2.5. (i) The function f(x, y) =

√y

xfrom Examples 2.1(i) is continuous

for all (x, y) with x 6= 0 and y ≥ 0. However we have

∂f

∂y(x, y) =

1

2x√

y,

which is continuous for all (x, y) with x 6= 0 and y > 0. Note that the point(1, 0) does not belong to this region, so Theorem 2 gives us no information on

the solution to y′ =

√y

x, with y(1) = 0. In fact we were always going to have

trouble from the start, since we cannot find a rectangle with nonzero height andwidth centred on (1, 0) which lies entirely within the region of the XY –plane onwhich f(x, y) makes sense. The rectangle would necessarily contain points withnegative Y –coordinates.

On the other hand Theorem 2 guarantees the existence of a unique solution to

y′ =

√y

xwith y(1) = 100 which is continuous in some neighbourhood of x = 1.

Page 16: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 14

In fact the solution y =

(1

2ln x + 10

)2

is continuous for all x ≥ e−20. Here the

rectangle can be made quite large, so long as its borders do not intersect the Xor Y -axes.

(ii) Does the initial value problem: y′ =x

y2, with y(0) = 1 have a unique solution?

Now f(x, y) =x

y2is continuous for all (x, y) with y 6= 0, as is

∂f

∂y= −2x

y3. Hence

Theorem 2 guarantees a unique solution in a neighbourhood of (0, 1).On the other hand for the initial condition y(1) = 0, which corresponds to the

point (1, 0) there is a problem, as y = 0 is not a point of continuity of f(x, y) orfy(x, y). Hence the Existence and Uniqueness Theorem does not apply. In factthere is no solution to this initial value problem.

For an initial value problem involving a linear differential equation we may use Theorem2 to find a “largest” interval of assured continuity for the unique solution. Suppose that(2.1) is of the linear form (1.4), then

f(x, y) = −p(x)y + g(x) so that∂f

∂y= −p(x).

Theorem 2 guarantees the existence of a unique solution to the initial value problem

y′ = −p(x)y + g(x) with y(x0) = y0,

provided that p and g are continuous at x0, Indeed this solution is continuous at leaston α < x < β where α is the discontinuity of {p, g} nearest to and less than x0 and βis the discontinuity of {p, g} nearest to and greater than x0. If there is no discontinuityless than x0 we put α = −∞ and similarly if there is no discontinuity greater than x0

we put β = +∞.

Examples 2.6. (i) State the largest interval in which you can be sure that

y′ − 1

x + 1y = 3, with y(0) = 3,

has a unique solution. Now p(x) = − 1

x + 1is discontinuous at x = −1 and

g(x) = 3 is continuous for all x. Since x0 = 0, the required interval is (−1,∞).(ii) Recall from Example 1.7 the linear differential equation

y′ +3

x + 100y = 7

has general solution y =7

4(x + 100) +

A

(x + 100)3, where A ∈ R. Observe that

this function has a discontinuity at x = −100 for all A 6= 0. For the initialcondition y(−200) = 0 the continuous solution in question is the one on theinterval (−∞,−100).

Page 17: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 15

3. Direction Fields

References: Zill and Cullen, §15.3. Stewart, 4th. edition §10.2, 3rd. edition §15.1 orKreysig §1.2.

If y = y(x) is a solution of y′ = f(x, y) then the derivative of y(x) must exist at each x.Graphically y′ is the slope of the curve y = y(x) at x, furthermore since it is a solution ofthe differential equation we also have y′(x) = f(x, y). Thus, if the differential equationhas a solution at the point (x, y) in the plane, the slope of the solution curve there isequal to f(x, y), and can be represented by a short line segment (lineal element) centredon (x, y) with the correct slope. Many of the plots in this section have arrow headson each segment, indicating the direction of the “flow” as x increases; hence the arrowheads tend to point to the right which is the direction of increasing x.

Example 3.1. Consider the separable differential equation

y′ =y + 1

x− 2.

If a solution curve goes through the point (0, 3) its slope there is equal to −2. Similarlythough (5, 2) the slope there will be 1.

–4

–2

0

2

4

y(x)

–2 2 4 6x

The totality of these short line segments is called a direction field for the differentialequation. The direction field suggests the “flow pattern” for the family of solution curvesof the differential equation. In particular, if we want the unique solution (subject to the

Page 18: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 16

hypotheses of Theorem 2) passing through (0, 3) we construct the curve though (0, 3)such that at each point its slope is that given by the direction field.

Observe that the solution curve for the initial value problem

y′ =y + 1

x− 2, with y(0) = 3

is y = −2x + 3. This curve “passes through” (2,−1) where f(x, y) =0

0– it is in

fact, two half-lines. For the given initial condition, the half-line y = −2x + 3, x ≤ 2represents the solution curve. For the initial condition y(3) = −3, the solution curve isagain y = −2x + 3, but this time its is the part of the line where x ≥ 2.

Exercise 3.2. Repeat the above for the point (5, 2) which corresponds to the initialcondition y(5) = 2. Verify that the solution curve is y = x − 3, which also “passesthrough” (2,−1) in the same sense as above. Show that all solution curves indeed “passthrough” the point (2,−1) in this sense.

As discussed earlier in Example 2.3, the differential equation y′ =1

4y2 − 1 has two

constant solutions y ≡ 2 and y ≡ −2. The direction field shown below

–4

–2

0

2

4

y(x)

–2 2 4 6 8 10x

suggests that the behaviour of the initial value problem

y′ =1

4y2 − 1, with y(0) = y0

Page 19: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 17

as x increases from x0 = 0 (the initial value of the independent variable) to ∞ dependsonly on the value of y0. Indeed by merely inspecting the direction field above one maydeduce that

(i) If y0 > 2, then y(x) → +∞ as x →∞.(ii) If y0 = 2, then y(x) = 2 for all x.(iii) If y0 < 2, then y(x) → −2 as x →∞.

Question: Did we really need to compute the direction field to discover this?Answer: No.

Observe that y′ =1

4(y − 2)(y + 2). By considering the behaviour of the concave up

quadratic function g(t) = 14(t− 2)(t + 2)

.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

....

........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

..............................................

....................................

...............................

........................................................................................................................................................

......................................................................... ...................

........

........

........

........

...........................

...................g(t)

t−2 2

we may deduce that

(i) On the interval (−∞,−2) we have y′ > 0 so y(x) is increasing.(ii) On the interval (−2, 2) we have y′ < 0 and so y(x) is decreasing.(iii) On the interval (2, +∞) we have y′ > 0 and so y(x) is increasing.

Hence if y < −2 then the solution curve y = y(x) is increasing and will continue toincrease until it reaches (as a limit, since the rate of increase becomes close to zero) −2.If y = ±2 then y′ = 0 and so we have a constant solution. If −2 < y < 2 then thesolution curve y = y(x) is decreasing and will continue to decrease until it reaches (asa limit, since the rate of decrease becomes close to zero) −2. If y > 2 then the solutioncurve y = y(x) will increase and its rate of increase will increase and so the curve goesoff to +∞.

Many differential equations can not be solved in terms of elementary functions.

Example 3.3. Consider the initial value problem

y′ = x2 + y2, with y(0) = 1.

By Theorem 2 there is a unique solution (which is also continuous), but we can not finda formula for it. Using direction fields

Page 20: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 18

–2

0

2

4

6

y(x)

–1 1 2 3x

we can make a guess as to what the solution curves look like snd what their long-termbehaviour might be. However, as we shall soon see in the next section, we can do a littlebetter than this, and give a “ball–park” figure for the value of, say y(1) (if it exists)using approximations coming from the direction field.

Note 3.4. In practice we use computers to help us plot direction fields, since there are somany computations involved. Many software packages have some facility for this. Forthe computer package MAPLE the commands which produced the first direction fieldin these notes are:

with(DEtools):

dfieldplot(diff(y(x),x)=(y+1)/(x-2),y(x),x=-2..6,y=-4..4);

Page 21: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 19

4. Numerical solutions of differential equations

References: Zill and Cullen, §15.4. Stewart, 4th. edition §10.2, 3rd. edition §15.1 orKreysig §19.1. From your Tutorial Notes, the relevant exercises are Exercises 8–13.

As we saw at the end of the last section, many differential equations cannot be solvedin terms of simple functions. Instead we may calculate approximate values for pointson the solution curve by a variety of numerical techniques. A class of methods for thenumerical solution of the initial value problem

y′ = f(x, y), with y(x0) = y0

tries to approximate the solution curve over an interval by a straight line segment ofappropriate slope. We can then iterate this process to produce a piecewise linear curvewhich approximates the “real solution”. In this course we shall look at three basicmethods:

1. Euler’s method

We start our algorithm at the initial point (x0, y0) given to us by the initial conditionsand repeat the Euler approximation method in steps of equal size. Suppose that aftern steps our solution curve has reached the point (xn, yn) and we want to approximatethe value of y at xn + h where h is the step size in the x–direction. From the differ-ential equation we know the value of y′ at (xn, yn) is f(xn, yn). In Euler’s method weapproximate the solution curve y = y(x) over the interval (xn, xn + h) by the straightline segment through (xn, yn) with slope f(xn, yn), that is

yn+1 − yn

(xn + h)− xn

= f(xn, yn)

which simplifies to

(4.1) yn+1 = yn + hf(xn, yn).

In which case yn+1 is the Euler method value (approximation) for the real value ofy(xn+1) where xn+1 = xn + h.

A rough picture to help describe the approximation process used in Euler’s method isshown below:

.................................................................................................................................................................................. .............................................................................................................................................................................................................................................................................................

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

.

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

...

......................................................................................................

..........................................

................................................................

............................................................................................................

........................................................

............................

....................................................... ...................

........

........

........

........

........

......................

...................

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ..

............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ..

........

.....

........

.................. ............. .............

. . . . . .

.

.

.

.

.

.

.

. . . .

←−− h −−→xn

yn

x0

y0

X

Y

yn+1

xn+1

slopef(xn, yn)

(xn + h, yn + hf(xn, yn)

• •

Page 22: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 20

Example 4.1. Consider the initial value problem

y′ = x2 + y2, with y(0) = 1.

Using Euler’s method, and a stepsize of h = 0.1, find a numerical approximation fory(1). Our data is then f(x, y) = x2 + y2, x0 = 0, y0 = y(0) = 1, and so we compute

y1 = y0 + hf(x0, y0) = 1 + 0.1(02 + 12) = 1.1 =: y(x1),

and x1 = x0 + h = 0.1,

y2 = y1 + hf(x1, y1) = 1.1 + 0.1((0.1)2 + (1.1)2) = 1.1 + 0.122 = 1.222,

and x2 = x1 + h = 0.2,

y3 = y2 + h(f(x2, y2) = 1.222 + 0.1((0.2)2 + (1.222)2) = . . . = 1.3753284

and x3 = x2 + h = 0.3.

Tabulating our results we find that

xn yn xn yn

.1 1.1 .6 2.199546514

.2 1.222 .7 2.719347001

.3 1.3753284 .8 3.507831812

.4 1.573481221 .9 4.802320214

.5 1.837065536 1.0 7.189548158

so that y10 = 7.18954 ≈ y(1).

Question: How accurate is this answer?Answer: It depends on the step size h, and the local character of y = y(x).

For instance using h = 0.05 in the above calculation and n = 20 so that y(x20) ≈ y(1)we find that

y2 ≈ y(0.1) = 1.10525, y4 ≈ y(0.2) = 1.23602, y6 ≈ y(0.3) = 1.40392, . . . ,

and so y(0.1) ≈ y20 = 12.3209. However, using h = 0.01 and n = 100 so that y(x100) ≈y(1) we find that

y10 ≈ y(0.1) = 1.11012, y20 ≈ y(0.2) = 1.24933, y30 ≈ y(0.3) = 1.43180, . . . ,

and so y(0.1) ≈ y100 = 90.7554. Why can’t we just keep taking h smaller and smaller inmagnitude? As we shall see later, the problem here appears to be that the value of y(1)is approaching infinity – it is likely that a solution to the initial value problem does notexist there.

Remark 4.2. A second way of deriving the formula for Euler’s method is to truncate theTaylor series expansion

y(xn + h) = y(xn) + hy′(xn) +h2

2!y′′(xn) + . . .

= y(xn) + hf(xn, yn) + . . .

after the “h” term. Consequently, Euler’s method is also called a first order Runge-Kutta method, as it agrees with the above Taylor series expansion to the O(h) term.

Page 23: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 21

Example 4.3. Using Euler’s method with step size h = 0.1, calculate y(0.2) for the initialvalue problem

y′ =x2

y(1 + x3), with y(0) = 1,

and compare with the exact solution. Since f(x, y) =x2

y(1 + x3), x0 = 0, y0 = y(x0) = 1

we compute

y1 = y0 + hf(x0, y0) = 1 + 0.1

(0

1(1 + 0)

)= 1 = y(x1) and x1 = 0.1,

y2 = y1 + hf(x1, y1) = 1 + 0.1

((0.1)2

1(1 + (0.1)3

)= 1.000999 . . . and x2 = 0.2.

The exact solution is

y2 =2

3ln(1 + x3) + 1 for x ≥ −

(1− e

32

) 13

= −0.919 . . . ,

and so y =

√2

3ln(1 + x3) + 1 which is equal to 1.0026525 . . . at x = 0.2.

One can use the direction field itself to make an estimate: simply draw in the trajectoryfrom the given initial condition and then read off the value from the curve you havedrawn. This method is much more effective than Euler’s method when the derivative ofthe solution curve changes rapidly over the interval in question.

One may also use negative stepsizes to approximate values of the solution y(x) forx < x0. Everything we have done so far will work for negative values of h and so we canuse the same formulas.

Example 4.4. From Example 4.3 we have

y′ =x2

y(1 + x3), with y(0) = 1,

and so we may approximate y(−0.2) by computing y2 with h = −0.1 as follows:

y1 = y0 + hf(x0, y0) = 1− 0.1

(0

1(1 + 0)

)= 1 = y(x1) and x1 = −0.1,

y2 = y1 + hf(x1, y1) = 1− 0.1

((−0.1)2

1(1 + (−0.1)3

)= 0.998998 . . . and x2 = −0.2.

The exact solution is y(x) = 0.9996664443 . . . at x = −0.2

There are other, more sophisticated methods of producing approximate solutions.These are called the higher-order Runge-Kutta methods. We will not be studying themin this course. However, it is worth having some idea how they work, so the remainderof this chapter describes them. As a rule, if we want to calculate with these methods,we use maths-specific software like MAPLE or MatLab to do the calculations for us.2. Improved Euler’s method

Page 24: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 22

Other Runge–Kutta type methods try to approximate the “required” shape of thestraight line segment over the interval (xn, xn + h) with an average of nearby sam-pled slopes. Here derivatives are sampled at (xn, yn) and (xn + h, yn + hf(xn, yn)), andmarked with a •:

..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

..................................

..................................

..................................

..................................

..................................

..................................

..................................

...................................

..................................

............

.................................................

.....................................

...............................

.....................................................................................................................................................................................................................................................

....................................................... ...........................................

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

............. ............. ............. ............. ............. .............

............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ........... . . . . . . . . . . . . . . . . . . . . . . .

←−−−−−− h −−−−−−→xn Xxn+1

(xn + h, yn + hf(xn, yn))

(xn, yn)

(xn + h, yn + h2(f(xn, yn) + f(xn + h, yn + hf(xn, yn)))

This leads to the improved Euler method (or Heun’s formula, which is a Runge-Kuttamethod of order 2):

yn+1 − yn

h=

1

2

{f(xn, yn) + f(xn + h, yn + hf(xn, yn))

}

which simplifies to

yn+1 = yn +h

2

{f(xn, yn) + f(xn + h, yn + hf(xn, yn))

}.

Example 4.5. Consider the initial value problem

y′ = x2 + y2, with y(0) = 1.

If we use the Improved Euler’s method with stepsize h = 0.1, then we compute

y1 = y0 +h

2

{f(x0, y0) + f(x0 + h, y0 + hf(x0, y0))

}

= 1 +0.1

2

{(02 + 12) + f(0.1, 1 + 0.1(02 + 12))

}

= 1 + 0.05{1 + f(0.1, 1.1)

}= 1 + 0.05(1 + (0.1)2 + (1.1)2) = 1.111 . . . ≈ y(0.1)

whereas in Example 4.1 earlier we saw that the Euler method approximation to y(0.1)was 1.1. If we continue we find that

y2 = y1 +h

2

{f(x1, y1) + f(x1 + h, y1 + hf(x1, y1))

}

= 1.251530674 . . . ,

whereas in Example 4.1 earlier we saw that the Euler method approximation to y(0.2)was 1.222. Tabulating our results we find that

xn yn xn yn

.1 1.111000000 .6 2.600025118

.2 1.251530674 .7 3.529011494

.3 1.436057424 .8 5.371468766

.4 1.688007333 .9 10.34833534

.5 2.048770724 1.0 38.13428520

Page 25: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 23

so that y10 = 38.13438520 ≈ y(1).

3. Fourth order Runge-Kutta

The most popular Runge-Kutta methods use several “sample” slopes; one of the mostwidely known uses 4 (and is known as a 4th. order method).

yn+1 = yn +h

6

(`1 + 2`2 + 2`3 + `4

), where `1 = f(xn, yn),

`2 = f(xn +

h

2, yn +

1

2h`1

), `3 = f

(xn +

h

2, yn +

1

2h`2

), and `4 = f(xn + h, yn + h`3).

Derivatives are sampled at four different places marked with • shown below:

..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

.......................................

...............................

...............................................................................................................................................................................................................................................................................................................................................................................

....................................................... .................................................

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

..

............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ..........

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

........

.....

.......

......................................

................................

. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . .

←− h2−→ ←− h

2−→

↑|h`1

|↓

↑|h`2

|↓

↑|||

h`3

|||↓

↑|||||

h`4

|||||↓

xn xn+1 X

••

Examples 4.6. (i) Reconsider the initial value problem

y′ = x2 + y2 with y(0) = 1.

Using the Runge-Kutta method, and a step size of h = 0.1 to find a numericalapproximation for y(1). We have f(x, y) = x2 + y2, x0 = 0, y0 = 1. Now

y1 = y0 +h

6

(`1 + 2`2 + 2`3 + `4

)

where `1 = f(x0, y0) = 02 + 12 = 1,

`2 = f(x0 +

h

2, y0 +

1

2h`1

)= f(0.05, 1 + 0.05× 1) = (0.05)2 + (1.05)2 = 1.105

`3 = f(x0 +

h

2, y0 +

1

2h`2

)= f(0.05, 1 + 0.05× 1.105) = (0.05)2 + (1.05525)2 = 1.11605 . . .

`4 = f(x0 + h, y0 + h`3) = f(0.1, 1 + 0.1× 1.11605 . . .) = (0.1)2 + (1.1116 . . .)2 = 1.245666 . . .

and so

y1 = 1 +0.1

6

(1 + 2× 1.105 + 2× 1.116− 05 . . . + 1.245666 . . .

)= 1.1114628 ≈ y(x1)

and x1 = x0 + h = 0.1, etc. tabulating our results we get:What now happens if we decrease h to get more accuracy? Compare the resultsfor the fourth order Runge-Kutta with the results from Euler’s method:

Page 26: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 24

xn yn xn yn

.1 1.111462856 .6 2.643860195

.2 1.253015174 .7 3.652200355

.3 1.439665974 .8 5.842013327

.4 1.696097903 .9 14.02182003

.5 2.066961014 1.0 735.0991247

x h = 0.1 h = 0.05 h = 0.010.1 1.11146 1.11146 1.111460.2 1.25301 1.25301 1.253010.3 1.43966 1.43967 1.43967...

......

...1.0 735.099 175875 1.49838× 102893

Euler 7.18954 12.3209 90.7554

(ii) Use both the Euler and the fourth order Runge-Kutta method with a single stepto calculate an approximate value for y(0.1) for the initial value problem

y′ = 2y(1− y) with y(0) = 2.

Here f(x, y) = 2y(1− y), x0 = 0, y0 = 2. Euler’s method gives us

y1 = y0 + hf(x0, y0) = 2 + 0.1× f(0, 2) = 2 + 0.1× 2× 2× (1− 2) = 1.6.

The fourth order Runge-Kutta method gives

y1 = y0 +h

6

(`1 + 2`2 + 2`3 + `4

)

where `1 = f(x0, y0) = f(0, 2) = 2× 2× (1− 2) = −4,

`2 = f(x0 +

h

2, y0 +

h

2`1

)= f(0.05, 2 + 0.05× (−4))

= f(0.05, 1.8) = 2× 1.8× (1− 1.8) = −2.88

`3 = f(x0 +

h

2, y0 +

h

2`2

)= f(0.05, 2 + 0.05× (−2.88))

= f(0.05, 1.856) = 2× 1.856× (1− 1.856)) = −3.177472

`4 = f(0.1, 2 + 0.1× (−3.177472)) = f(0.1, 1.6822528)

= −2.29544 . . . ,

so

y1 = 2 +0.1

6

(− 4 + 2× (−2.88) + 2× (−3.177 . . .) + (−2.295 . . .)

)= 1.693160211 . . . .

For h = 0.5 (in which case y2 ≈ y(0.1)) we have y2 = 1.69309 . . ..

Exercise 4.7. For the initial value problem y′ = x2 + y2 with y(0) = 1 show that y(1)does not exist. Hint: Show that y1(1) does not exist for y1 ≤ y which is the solutionto a certain separable Differential equation.

Note 4.8. For the compute package MAPLE the commands you need are:

Page 27: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 25

with(DEtools):

dsolve({diff(y(x),x)=x^2+y^2,y(0)=1},y(x),type=numeric, \

method=classical[foreuler],stepsize=0.1, \

value=array([0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0]));

use classical[heunform] and classical[rk4] instead for improved Euler and fourthorder Runge-Kutta respectively.

Page 28: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 26

5. The Laplace Transform

References: Zill and Cullen, Chapter 4, Kreysig, Chapter 6. This section is not coveredin Stewart.

Definition 5.1. Let f : [0,∞) → R be a real-valued function of one variable t withdomain 0 ≤ t < ∞ then the Laplace transform of f(t) is given by

L{f(t)}(s) =

∫ ∞

0

e−stf(t).dt,

provided that the improper integral is convergent.

Recall that the improper integral of a function g : [0,∞) → R is defined to be∫ ∞

0

g(t).dt = limM→∞

∫ M

0

g(t).dt

provided that the limit on the right-hand side exists and is finite.

Examples 5.2. (i) L{0}(s) =

∫ ∞

0

e−st0.dt = limM→∞

∫ M

0

0.dt = limM→∞

0 = 0.

(ii) L{1}(s) =

∫ ∞

0

e−st1.dt = limM→∞

∫ M

0

e−st.dt = limM→∞

( − 1

se−Ms +

1

se0

)=

1

s,

provided that s > 0.

(iii) L{t}(s) =

∫ ∞

0

e−stt.dt = limM→∞

1

s2

(1−(1+Ms)e−Ms

)=

1

s2, provided that s > 0.

(iv) L{eat}(s) =

∫ ∞

0

e−steas.dt limM→∞

∫ M

0

e(a−s)t.dt = limM→∞

1

a− s

(e(a−s)M − 1

)=

1

s− a, provided that s > a.

Following on from Examples 5.2(iii), by induction of n we may show that for integers

n ≥ 0 we have L{tn}(s) =n!

sn+1. Note also that the value of L{f(t)}(s), if it exists, is

a function of s, so we frequently write F (s) or f(s) instead of L{f(t)}(s) to emphasisethis.

Theorem 5.3. [Existence]If f(t) is at least piecewise continuous on [0,∞), and is of exponential order as t →∞then L{f(t)}(s) is defined for s > d where d is defined in Remarks 5.4(i) below.

Remarks 5.4. (i) The function f is of exponential order as t →∞ if there is a T > 0,B > 0 and d ∈ R such that

|f(t)| ≤ Bedt for all t ≥ T.

For instance any bounded function is of exponential order, as are f(t) = tn for

any n, eat for any a, but not et2 .(ii) The function f is piecewise continuous on [0,∞) if its only allowable discontinu-

ities on [0,∞) are “finite” jumps. So the characteristic function of the interval

[a, b], χ[a,b] is one such, but one with a vertical asymptote such as f(t) =1

t− a

Page 29: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 27

where a > 0 is not. Neither are functions such as f(t) = sin(1

t

)which behaves

badly at the point t = 0.(iii) The theorem gives sufficient conditions for the existence of the Laplace transform

L{f(t)}(s) of f(t), but not necessary. For instance f(t) = (t)−12 is not piecewise

continuous on [0,∞) but L{t− 12}(s) =

√π

s, for s > 0.

Example 5.5. The function f(t) = cos(bt) is piecewise continuous on [0,∞) and is ofexponential order as t → ∞ (since its bounded, we can choose d = 0). Hence byTheorem 5.3 its Laplace transform L{cos(bt)}(s) exists. Indeed∫ M

0

e−st cos(bt).dt =

[e−st

−scos(bt)

]M

0

+1

s

∫ M

0

e−st(−b) sin(bt).dt

=1

s− e−sM cos(bM)

s− b

s

{[e−st sin(bt)

−s

]M

0

+b

s

∫ M

0

e−st cos(bt).dt

}

=1

s− e−sM cos(bM)

s+

be−sM sin(bM)

s2− b2

s2

∫ M

0

e−st cos(bt).dt

so (1 +

b2

s2

) ∫ M

0

e−st cos(bt).dt =1

s− e−sM cos(bM)

s+

be−sM sin(bM)

s2.

Now let M → ∞, then provided s > 0 the right hand side converges to1

s. Hence we

have shown that for s > 0 we have

L{cos(bt)}(s) =1s

1 + b2

s2

=s

s2 + b2.

Similarly we may show that

L{sin(bt)}(s) =b

s2 + b2

for s > 0 (see also Example 5.18).

There are five important properties of the Laplace transform which we shall make useof in this course:

1. The shift (or first translation) formula

If F (s) = L{f(t)}(s) for s > d then

(5.1)L{eatf(t)}(s) =

∫∞0

e−steatf(t).dt =∫∞0

e−(s−a)tf(t).dt= L{f(t)}(s− a) = F (s− a),

for s− a > d.

Examples 5.6. (i) Applying the shift formula (5.1) we have

L{eattn}(s) = L{tn}(s− a) =n!

(s− a)n+1.

for s > a.

Page 30: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 28

(ii) Applying the shift formula (5.1) we have

L{eat cos(bt)}(s) = L{cos(bt)}(s− a) =s− a

(s− a)2 + b2.

for s > a.(iii) Applying the shift formula (5.1) we have

L{eat sin(bt)}(s) = L{sin(bt)}(s− a) =b

(s− a)2 + b2

for s > a.

The second important property shows how to handle functions which are multiplied byt.

2. Multiplication by t

The Laplace transform of tf(t) is equal to the negative of the derivative of the Laplacetransform of f :

Theorem 5.7. If L{f(t)}(s) exists, then so does L{tf(t)}(s), and it satisfies

L{tf(t)}(s) =d

dsL{f(t)}(s).

Proof. By the Fundamental Theorem of Calculus, need only show that {−L({f(t)})(s)}is antiderivative for L({tf(t)}). To see this, first note that, again by the FundamentalTheorem of Calculus, for any real number a, the function

Fa(s) :=

∫ s

u=a

L({tf(t)})(u) du

is an antiderivative for L({tf(t)})(s). Reversing the direction of integration, we haveFa(s) = − ∫ a

u=sL({tf(t)})(u) du.

We now calculate:

−∫ a

u=s

L({tf(t)})(u) du = −∫ a

u=s

∫ ∞

t=0

e−uttf(t) dt du

= −∫ a

u=s

limT→∞

∫ T

t=0

e−uttf(t) dt du

= limT→∞

−∫ a

u=s

∫ T

t=0

e−uttf(t) dt du

as integration is continuous

= limT→∞

∫ T

t=0

−∫ a

u=s

e−uttf(t) dt du

as we can reverse the order of finite integrals

= limT→∞

∫ T

t=0

−[− e−utf(t)]a

u=sdt

= − limT→∞

∫ T

t=0

(e−st − e−at)f(t) dt

Page 31: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 29

Since f has a Laplace transform, we know that as a → ∞, e−atf(t) → 0, so for eachvalue of s, we have

lima→∞

Fa(s) = − limT→∞

lima→∞

∫ T

t=0

(e−st − e−at)f(t) dt = − limT→∞

∫ T

t=0

e−stf(t) dt

and this last is equal to L{f(t)}(s) by definition.As each Fa is an antiderivative for L({tf(t)})(s), and as L{f(t)} is differentiable

and is equal to the pointwise limit lima→∞ F (a), it must also be an antiderivative forL({tf(t)})(s) as required. ¤Corollary 5.8. Under the appropriate hypotheses on f , the Laplace transform of {tnf(t)}is equal to the nth derivative of the Laplace transform of {f(t)}.Example 5.9. We have already computed that L{1}(s) = 1

sfor all s. Hence we can

compute L{t}(s) as follows:

L{t}(s) = L{t · 1}(s) = − d

dsL{1}(s) = −

(1

s

)′=

1

s2.

More generally:

Corollary 5.10. For all n ≥ 0, we have L{tn}(s) = n!sn+1 .

Proof. We proceed by induction. For n = 0, we have {tn} = {1}, and we computedearlier that L{1}(s) = 1

sas required.

Now suppose as an inductive hypothesis that L{tn}(s) = n!sn+1 . Then

L{tn+1}(s) = L{t · tn}(s)= − d

dsL{tn}(s)

= −(

n!

sn+1

)′by inductive hypothesis

= −n!(s−(n+1)

)′

= −n!(−(n + 1))s−(n+1)−1

=(n + 1)!

sn+2

as required. ¤The third important property follows from its definition as an integral.

3. Linearity

The Laplace transform of a sum of functions is the sum of the Laplace transforms, andthe Laplace transform of a function times a scalar is a scalar times the Laplace transformof the function. These properties add up to what Mathematicians call linearity.

Theorem 5.11. If L{f1(t)}(s) and L{f2(t)}(s) both exist then so does L{a1f1(t) +a2f2(t)}(s) for all a1, a2 ∈ R and

L{a1f1(t) + a2f2(t)}(s) = a1L{f1(t)}(s) + a2L{f2(t)}(s).

Page 32: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 30

Proof. The left hand side of the above expression is

limM→∞

∫ M

0

e−st[a1f1(t) + a2f2(t)].dt = limM→∞

∫ M

0

e−sta1f1(t).dt +

∫ M

0

e−sta2f2(t).dt

= a1 limM→∞

∫ M

0

e−stf1(t).dt + a2 limM→∞

∫ M

0

e−stf2(t).dt

which is equal to the right hand side since both limits exist. ¤Example 5.12. We may use Theorem 5.11 to compute

L{4 + 3e6t}(s) = 4L{1}(s) + 3L{e6t}(s)=

4

s+

3

s− 6for s > 6.

The fourth important property of the Laplace transform is that its inverse is well–defined.

4. Uniqueness

The Laplace transform is essentially one–to–one.

Theorem 5.13. There is at most one continuous function f(t) whose Laplace transformis F (s).

Remark 5.14. The unique “inverse” transform of F (s) is often denoted L−1{F (s)}(t).Although there is a general formula for L−1:

L−1{F (s)}(t) =1

2πi

∫ γ+i∞

γ−i∞estF (s).ds.

However, it is much easier to use the Laplace transform table to calculate inverses.

Examples 5.15. (i) If F (s) =6

s + 3= L{e−3t}(t) then L−1

{ 6

s + 3

}(t) = 6e−3t.

(ii) If F (s) =2s

s2 − 8s + 12then by partial fractions we find that

F (s) =2s

s2 − 8s + 12=

2s

(s− 2)(s− 6)=

−1

s− 2+

3

s− 6

= −1L{e2t}(s) + 3L{e6t}(s),so we may deduce that L−1{F (s)}(t) = −e2t + 3e6t.

(iii) If F (s) =4s + 16

s2 + 25then

F (s) =4s + 16

s2 + 25=

4s

s2 + 52+

16

5

5

s2 + 52

= 4L{cos(5t)}(s) +16

5L{sin(5t)}(s),

and so

L−1{F (s)}(t) = 4 cos(5t) +16

5sin(5t).

Page 33: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 31

(iv) If F (s) =7s + 11

s2 + 8s + 25=

7(s + 4)− 17

(s + 4)2 + 32then

F (s) =7(s + 4)

(s + 4)2 + 32− 17

3

3

(s + 4)2 + 32

= 7L{e−4t cos(3t)}(s)− 17

3L{e−4t sin(3t)}(s),

and so

L1{F (s)}(t) = 7e−4t cos(3t)− 17

3e−4t sin(3t).

How is this any use for solving Differential equations? This comes from the fifth impor-tant property of the Laplace transform.

5. Derivative

If a function and its derivative have a Laplace transform then the Laplace transformof the derivative may be expressed in terms of the Laplace transform of the originalfunction:

Theorem 5.16. Let f(t) be differentiable on [0,∞) and be of exponential order ast → ∞ and let f ′(t) be piecewise continuous on [0,∞). Then L{

f ′(t)}(s) exists for

s > d andL{

f ′(t)}(s) = sL{f(t)}(s)− f(0).

Proof. The left hand side is the limit as M →∞ of∫ M

0

e−st df

dt.dt =

[f(t)e−st

]M

0+ s

∫ M

0

e−stf(t).dt

= e−sMf(M)− f(0) + s

∫ M

0

e−stf(t).dt.

Taking the limit as M →∞, provided s > d we have |f(t)| < Bedt for t ≥ T and so thefirst term decays to zero – the result then follows. ¤Corollary 5.17. Under the appropriate hypotheses for f ′′(t) we have

L{f ′′(t)}(s) = s2L{f(t)}(s)− sf(0)− f ′(0).

Proof. The left hand side is equal to

sL{f ′(t)}(s)− f ′(0) = s[sL{f(t)}(s)} − f(0)

]− f ′(0).

¤

Example 5.18. Sinced

dtcos(bt) = −b sin(bt) we have

sL{cos(bt)}(s)− cos(b.0) = ss

s2 + b2− 1 =

−b2

s2 + b2,

= −bL{sin(bt)}(s) = L{−b sin(bt)}(s)Using Theorem 5.16 we may apply Laplace transform methods to solve initial valueproblems. General solutions to differential equations are not normally computed usingthe Laplace transform method.

Page 34: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 32

Examples 5.19. (i) Use the Laplace transform method to solve the initial value prob-lem

y′′ − y′ − 2y = 4e3t with y(0) = 2, and y′(0) = −1.

Taking Laplace transforms of both sides we have

L{y′′ − y′ − 2y}(s) = L{y′′}(s)− L{y′}(s)− 2L{y}(s) = 4L{e3t}(s).That is[s2L{y}(s)− sy(0)− y′(0)

]− [sL{y}(s)− y(0)

]− 2L{y}(s) =4

s− 3.

Collecting terms in L{y}(s) we get

(s2 − s− 2)L{y}(s) =4

s− 3+ 2s + (−1)− 2 =

4 + (2s− 3)(s− 3)

s− 3

which simplifies to

L{y}(s) =2s2 − 9s + 13

(s− 3)(s− 2)(s + 1)=

A

s− 2+

B

s + 1+

C

s− 3,

where (s + 1)(s− 3)A + (s− 2)(s− 3)B + (s− 2)(s + 1)C = 2s2 − 9s + 13.

Putting s = 3 we get 0.A. + 0.B + 4.C = 18− 27 + 13 = 4 and so C = 1.

Putting s = −1 we get 0.A + 12.B + 0.C = 2 + 9 + 13 = 24 and so B = 2.

Putting s = 2 we get − 3.A + 0.B + 0.C = 8− 18 + 13 = 3 and so A = −1.

Hence our transformed differential equation is

L{y}(s) =−1

s− 2+

2

s + 1+

1

s− 3

= −1L{e2t}(s) + 2L{e−t}(s) + L{e3t}(s)so, taking the inverse transform we find that

y(t) = −1e2t + 2e−t + e3t,

which is the solution to the initial value problem.(ii) Use the Laplace transform method to solve the initial value problem

dy

dt+ 2y = e−2t sin t with y(0) = 3.

Taking Laplace transforms we get

L{y′}(s) + 2L{y}(s) = L{e−2t sin t}(s) =1

(s + 2)2 + 12

sL{y}(s)− 3 + 2L{y}(s) =1

s2 + 4s + 5

(s + 2)L{y}(s) =3s2 + 12s + 15

s2 + 4s + 5+ 3

L{y}(s) =3s2 + 12s + 16

(s + 2)(s2 + 4s + 5)

Page 35: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 33

Now3s2 + 12s + 16

(s + 2)(s2 + 4s + 5)=

A

s + 2+

Bs + C

s2 + 4s + 5

where A(s2 + 4s + 5) + (Bs + C)(s + 2) = 3s2 + 12s + 16 and then

with s = −2 we get A× 1 + (−2B + C)× 0 = A = 12− 24 + 16 and so A = 4

with s = 0 we get A× 5 + (B × 0 + C)× 2 = 20 + 2C = 16 and so C = −2

comparing coefficients of s2 we get A + B = 3 and so B = −1

Therefore

L{y}(s) =3

s + 2+

1

s + 2+

−s− 2

s2 + 4s + 5

=4

s + 2− (s + 2)

(s + 2)2 + 1= 4L{e−2t}(s)− L{e−2t cos t}(s) so

y(t) = 4e−2t − e−2t cos t

Since the original differential equation was linear we may solve it using the inte-grating factor technique. It’s worth comparing the two methods: The integratingfactor is e2t and so

d

dt

(e2ty

)= e2te−2t sin t = sin t(5.2)

y(t) = −e−2t cos t + Ce−2t where C is a constant

y(0) = −1 + C = 3 and so C = 4.

Hence the solution to the initial value problem is y(t) = −e−2t cos t + 4e−2t. Itturns out that this equation was easier to solve directly, because by luck theintegrating factor removed the exponential term from the right-hand side (5.2)and allowed us to integrate it more easily. If this were not the case (say the right-hand side were e3t sin t then the problem would be much harder to do directlyand the Laplace transform method would work out easier.

(iii) Use the Laplace transform method to solve the initial value problem

y′′ + 2y′ + y = 6, where y(0) = 5, y′(0) = 10.

Taking Laplace transforms we get

L{y′′}(s) + 2L{y′}(s) + L{y}(s) = L{6}(s)s2L{y}(s)− 5s− 10 + 2(sL{y}(s)− 5) + L{y}(s) =

6

s

(s2 + 2s + 1)L{y}(s) =6

s+ 5s + 20 =

6 + 5s2 + 20s

s

L{y}(s) =5s2 + 20s + 6

s(s + 1)2

Now5s2 + 20s + 6

s(s + 1)2=

A

s+

B

s + 1+

C

(s + 1)2

Page 36: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 34

so that 5s2 +20s+6 = A(s+1)2 +Bs(s+1)+Cs. Putting s = 0 we get 6 = A,putting s = −1 we get 9 = C and then comparing the coefficient of s2 on eachside we find that 5 = A + B so that B = −1. Therefore

L{y}(s) =6

s− 1

s + 1+

9

(s + 1)2= 6L{1}(s)− L{e−t}(s) + 9L{te−t}(s)

and soy(t) = 6− e−t + 9te−t

is the solution to the initial value problem.

Remarks 5.20. (i) A familiarity with the techniques of partial fractions where thedegree of the numerator is less than the degree of the denominator is very helpfulfor using the Laplace transform method for solving differential equations.

(1) For a fraction of the formf(s)

(s− a)kthe partial fraction expansion is

A1

s− a+

A2

(s− a)2+ . . . +

Ak

(s− a)k

(2) For a fraction of the formf(s)

(s2 + as + b)kwhere s2 +as+ b is irreducible (i.e.

a2 − 4b < 0), the partial fraction expansion is

A1s + B1

s2 + as + b+

A2s + B2

(s2 + as + b)2+ . . . +

Aks + Bk

(s2 + as + b)k.

(ii) It is also important to be able to compute the inverse Laplace transform ofa rational function F (s) with a quadratic denominator. If the zeroes of thequadratic are(1) Real and distinct, then treat this as we did for

F (s) =2s

(s− 2)(s− 6)=

−1

s− 2+

3

s− 6, then

L−1{F (s)}(t) = −e2t + 3e6t.

(2) Real and equal, then treat this as for

F (s) =3s + 1

(s− 1)2=

3(s− 1) + 4

(s− 1)2=

3

s− 1+

4

(s− 1)2,

and then

L−1{ 3s + 1

s2 − 2s + 1

}(t) = 3et + 4tet

(3) Complex (so that the quadratic is irreducible), first complete the square asfor

F (s) =7s + 11

s2 + 8s + 25=

7(s + 4)− 17

(s + 4)2 + 32

and then write as two fractions which are translated trigonometric functions

L−1{F (s)}(t) = 7e−4t cos 3t− 17

3e−4t sin 3t.

Page 37: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 35

Laplace Transforms of piecewise continuous functions

Consider the function

g(t) =

t2 for 0 ≤ t < 23 for 2 ≤ t < 8t− 4 for 8 ≤ t

which is piecewise continuous on [0,∞) and of exponential order as t →∞.

...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

...........................................................................................................................................................................................................................................................................................................................................................................................................................................

...................................

..................................

..................................

..................................

.......................

........

........

......

........

........

......

...............

...............

...................................................

................................................................................................................................................................

....................................................... ...................

........

........

.....................

...................

t

g(t)

2 8

••

34

By definition we find that

L{g(t)}(s) =

∫ 2

0

t2e−st.dt +

∫ 8

2

3e−st.dt +

∫ ∞

8

(t− 4)e−st.dt

=2

s3− e−2s

( 2

s3+

4

s2+

1

s

)+ e−8s

( 1

s2+

1

s

).

The Laplace transform L{g(t)}(s) is more easily computed using the unit step (orHeaviside) functions. For each number c the unit step function uc(t) is defined by

uc(t) =

{0 if t < c1 if t ≥ c

which has a graph of the form

...........................................................................................................................................................................................................................................................................................................................................................................................................................................

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

.

...................................................................................................................................................................................................................................................................................................................................................................................

........

........ . . . . . . . . . . . . . . . . . . . . . . . . . . . .

........

........

........

........

.......................

...................

1

g(t)

tc

The same function may be denoted in other texts by u(t − c) or H(t − c) where H isthe Heaviside function H(t) := u0(t). The graph of uπ(t) cos t is then

.............................................................................................................................................................................................................................................................................................................................................................

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

...............

..........

.......... ...........................................................................................................................................................................................................................................................................

. . . . . . . . . . . . . . . .

........

........

........

........

........

........

.....................

...................

t

uπ cos t

0 π

−1

1

•We may use the unit step function to represent any piecewise continuous function. IfW (t) = uc1(t)− uc2(t) where c1 < c2 then

W (t) =

0 if t < c1

1 if c1 ≤ t < c2

0 if c2 ≤ t

Page 38: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 36

which has a graph of the form

............................................................................................................................................................................................................................................................................................. ......................................................................................................................................................................................................................

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

.

............................................................................................................................................................................................................................................................................................................

........

......................

........

........

........

........

.......................

...................

. . . . . . . . . . . . . . . . . . . . . . .

1

W (t)

tc1 c2

so that if f(t) is any function W (t)f(t) takes the value f(t) in the interval [c1, c2) and iszero elsewhere. It is called the characteristic function of the interval [c1, c2). Thereforethe piecewise continuous function

g(t) =

t2 for 0 ≤ t < 2,3 for 2 ≤ t < 8,t− 4 for 8 ≤ t,

may be written as

g(t) = t2[u0(t)− u2(t)] + 3[u2(t)− u8(t)] + (t− 4)u8(t) or

g(t) = u0(t)t2 + u2(t)(3− t2) + u8(t)(t− 4− 3), or perhaps

g(t) = t2 + (3− t2)u2(t) + (t− 7)u8(t),

since t2u0(t) = t2 for all t ≥ 0 (recall that in Laplace transform calculations we aredealing with functions whose domain consists of the positive real numbers). It is com-monplace to drop the u0(t) term in Laplace transform calculations as it does not haveany affect.

Now for any function f(t) we have

L{uc(t)f(t)}(s) =

∫ ∞

0

e−stuc(t)f(t).dt

=

∫ ∞

c

e−stf(t).dt now substitute τ = t− c

=

∫ ∞

0

e−s(τ+c)f(τ + c).dτ = e−cs

∫ ∞

0

e−sτf(τ + c).dτ and so

L{uc(t)f(t)}(s) = e−csL{f(t + c)}(s)Examples 5.21. (i) For g(t) = u0(t)t

2 + u2(t)(3− t2) + u8(t)(t− 7) we have

L{g(t)}(s) = e−0.sL{(t + 0)2}(s) + e−2sL{3− (t + 2)2}(s) + e−8sL{(t + 8)− 7}(s)= L{t2}(s) + e−2sL{−t2 − 4t− 1}(s) + e−8sL{t + 1}(s)=

2

s3+ e−2s

(− 2

s3− 4

s2− 1

s

)+ e−8s

( 1

s2+

1

s

).

(ii) For the piecewise continuous function

g(t) =

{t + 6 if 0 ≤ t < 1,3 if 1 ≤ t,

Page 39: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 37

we may write

g(t) = (t + 6)[u0(t)− u1(t)] + 3u1(t) and so

g(t) = (t + 6)u0(t) + (3− t− 6)u1(t),

g(t) = t + 6 + (−t− 3)u1(t),

and then

L{g(t)}(s) = e−0.sL{(t + 0)}(s) + 6e−0.sL{1}(s) + e−sL{−3− (t + 1)}(s)=

1

s2+

6

s+ e−s

(− 4

s− 1

s2

).

How do we invert the Laplace transform when there are exponentials involved? Theformula

L{uc(t)f(t)}(s) = e−csL{f(t + c)}(s)can be used for inversion, however the following one is simpler:

L{ucf(t− c)}(s) =

∫ ∞

0

uc(t)f(t− c).dt

=

∫ ∞

c

e−stf(t− c).dt now substitute t− c = τ

=

∫ ∞

0

e−s(τ+c)f(τ).dτ = e−cs

∫ ∞

0

e−sτf(τ).dτ so that

L{uc(t)f(t− c)}(s) = e−csL{f(t)}(s).

Examples 5.22. (i) To find L−1{F (s)}(t) where F (s) =e−3s

s2− e−4s

s. First we write

F (s) = e−3sL{t}(s)− e−4sL{1}(s)= L{u3(t)(t− 3)− u4(t).1}(s) so

L−1{F (s)}(t) = u3(t)(t− 3)− u4(t).1 =

0 if 0 ≤ t < 3,t− 3 if 3 ≤ t < 4,t− 4 if 4 ≤ t.

(ii) To find L−1{F (s)}(t) where F (s) = e−πs 1

s2 + 4. First we write

F (s) =1

2e−πs 2

s2 + 22

F (s) = e−πsL{1

2sin 2t

}(s) = L

{1

2uπ sin 2(t− π)

}(s) so

L−1{F (s)}(t) = uπ(t)1

2sin(2t− 2π) =

1

2uπ sin 2t.

(iii) To find L−1{F (s)}(t) where F (s) = e−πs( 1

s2(s2 + 1)+

π

s(s2 + 1)

). First we write

1

s2(s2 + 1)+

π

s(s2 + 1)=

1 + sπ

s2(s2 + 1)=

π

s+

1

s2+−πs− 1

s2 + 1

Page 40: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 38

Then we have

F (s) = e−πs{ 1

s2− 1

s2 + 1+ π

(1

s− s

s2 + 1

)},

= e−πsL{t− sin t + π − π cos t}(s),= L{uπ(t)[(t− π)− sin(t− π) + π − π cos(t− π)]}(s),

and so

L−1{F (s)}(t) = uπ(t)[(t− π)− sin(t− π) + π − π cos(t− π)]

= uπ(t)[t + sin t + π cos t].

Applications

One of the most important applications of the Laplace transforms of piecewise continu-ous functions lies in initial value problems with piecewise continuous non-homogeneousterm. To solve these directly we would have to solve the differential equation in eachinterval in which the piecewise continuous function was defined, using the solution inthe previous interval to generate the initial condition for the problem in the currentinterval. This would make the calculation potentially messy. The Laplace transformmethod takes care of all this. We illustrate this below (though the first example couldprobably be more easily done directly):

Examples 5.23. (i) Solve the initial value problem y′ + 2y = g(t) where y(0) = 0and

g(t) =

{3 if 0 ≤ t < 1,0 if 1 ≤ t.

Since g(t) = 3[u0(t)− u1(t)] + 0.u1(t) = 3u0(t)− 3u1(t) we may take the Laplacetransform of the differential equation

L{y′}(s) + 2L{y}(s) = L{g}(s) = e−0.sL{3}(s)− e−1.sL{3}(s) so

[sL{y}(s)− y(0)] + 2L{y}(s) =3

s− e−s 3

sand then

(s + 2)L{y}(s) =3

s− e−s 3

s.

Page 41: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 39

Dividing both sides by (s + 2) we have

L{y}(s) =3

s(s + 2)− e−s 3

s(s + 2)

=32

s−

32

s + 2− e−s

( 32

s−

32

s + 2

)

=3

2L{1}(s)− 3

2L{e−2t}(s)− e−sL

{3

2− 3

2e−2t

}(s)

= L{3

2− 3

2e−2t − u1(t)

[3

2− 3

2e−2(t−1)

]}(s) therefore

y(t) =3

2− 3

2e−2t − u1(t)

[3

2− 3

2e−2(t−1)

]or

y(t) =

{32− 3

2e−2t if 0 ≤ t < 1,

32

(e2 − 1

)e−2t if 1 ≤ t.

(ii) Solve the initial value problem y′′ + y = g(t) where y(0) = 0, y′(0) = 1 and

g(t) =

{t if 0 ≤ t < 2,2e−(t−2) if 2 ≤ t,

so that the graph of g is of the form:

...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

..........................................................................................................................................................................................................

........

.......

....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... ...................

........

........

........

........

.......................

...................

2

g(t)

t

Now g(t) = t[u0(t)− u2(t)] + 2e−(t−2)u2(t) = u0(t)t + u2(t)[2e−(t−2) − t]. Taking

Laplace transforms we get

L{y′′}(s) + L{y}(s) = e−0.sL{(t + 0)}(s) + e−2sL{2e−(t+2−2) − (t + 2)}(s)[s2L{y} − sy(0)− y′(0)] + L{y}(s) =

1

s2+ e−2s

(2L{e−t}(s)− L{t}(s)− 2L{1}(s)

)

(s2 + 1)L{y}(s)− 1 =1

s2+ e−2s

( 2

s + 1− 1

s2− 2

s

)and so

L{y}(s) =1 + s2

s2(s2 + 1)+ e−2s 2s2 − (s + 1)− 2s(s + 1)

(s2 + 1)s2(s + 1)

=1

s2+ e−2s −3s− 1

s2(s + 1)(s2 + 1)

Now

−3s− 1

s2(s + 1)(s2 + 1)=

A

s+

B

s2+

C

s + 1+

Ds + E

s2 + 1=−2

s+−1

s2+

1

s + 1+

s + 2

s2 + 1

Page 42: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 40

and so

L{y}(s) = L{t}(s) + e−2sL{−2.1− t + e−t + cos t + 2 sin t}(s),= L{t}(s) + L{u2(t)[−2− (t− 2) + e−(t−2) + cos(t− 2) + 2 sin(t− 2)]}(s)

then

y(t) = t + u2(t)[−2− (t− 2) + e−(t−2) + cos(t− 2) + 2 sin(t− 2)]

=

{t if 0 ≤ t < 2,e−(t−2) + cos(t− 2) + 2 sin(t− 2) if 2 ≤ t.

Page 43: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 41

6. The Fourier Transform

References: Kreysig, Chapter 11. This section is not covered in Stewart.In this section we begin by considering functions f which are periodic. We show how

to represent such functions using series in which the terms are the familiar trigonometricfunctions sin and cos. This leads to the notion of a Fourier series.

By allowing the period of the functions in question to go to infinity, we show how toreplace the Fourier series with a Fourier integral to represent functions which are notperiodic.

Finally, using the Euler formula eiθ = cos(θ) + i sin(θ), we show how to replace thestandard Fourier series for a periodic function with its complex Fourier series, and howto get from this notion to the notion of the Fourier Transform.

6.1. Fourier series.

Definition 6.1. Let f : R → R be any function. We say that f is periodic with period2π if f(x) = f(x + 2π) for all x ∈ R.

Examples 6.2. (1) The most obvious examples are the trig functions x 7→ sin(x) andx 7→ cos(x).

(2) Functions which oscillate more often also have period 2π. For example, x 7→sin(5x) satisfies sin(5(x + 2π)) = sin(x + 10π) = sin(x) as well.

(3) We can build more complicated periodic functions from sin and cos. For example,tan(x) = sin(x)/ cos(x), x 7→ esin(x) and x 7→ 5 sin(x) + 2 cos2(x) are all periodicwith period 2π.

(4) Other periodic functions can be defined by hand: For x ∈ R, we define [x][−π,π) tobe the unique real number such that −π ≤ [x][−π,π)) < pi and x = [x][−π,π)) +2nπfor some n ∈ Z. Then

f(x) := [x][−π,π)

f(x) := ([x][−π,π))2

f(x) := e[x][−π,π)

f(x) :=

{0 if −π ≤ [x][−π,π) < 0

1 if 0 ≤ [x][−π,π) < π

f(x) :=

{π + [x][−π,π) if −π ≤ [x][−π,π) < 0

π − [x][−π,π) if 0 ≤ [x][−π,π) < π

are all periodic with period 2π.

The idea of Fourier series is to approximate arbitrary periodic functions by the well-understood functions sin and cos above.

Recall that a function f is piecewise continuous if it is discontinuous only at a collec-tion of isolated points in R. That is, f is piecewise continuous if the left- and right-handlimits limx↗x0 f(x) and limx↘x0 f(x) both exist for all values of x0. Note that the twolimits do not have to be equal, and do not have to agree with the value of f at x0.

Page 44: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 42

Definition 6.3. Let f : R → R be piecewise- continuous and periodic with period 2π.We say that f is represented by the Fourier series

(6.1) a0 +∞∑

n=1

(an cos(nx) + bn sin(nx))

if the series converges to f(x) everywhere except at points where f is not continuous.In this case, points of discontinuity notwithstanding, we write

f(x) = a0 +∞∑

n=1

(an cos(nx) + bn sin(nx)),

and call the series the Fourier series for f . We call the numbers ai and bi the Fouriercoefficients of f .

This definition begs a question: how do we know that he fourier series is unique if itexists, and how to we know whether a function can be represented by a Fourier seriesin the first place? The next theorem answers the first of these questions.

Theorem 6.4. Suppose that f : R → R is periodic with period 2π and that f representedby the Fourier series (6.1). Then the Fourier coefficients are given by the Euler formulae:

(a) a0 :=1

∫ π

−π

f(x) dx.

(b) an :=1

π

∫ π

−π

f(x) cos(nx) dx for n ≥ 1.

(c) bn :=1

π

∫ π

−π

f(x) sin(nx) dx for n ≥ 1.

The idea of the proof is to apply the Euler formulae to the Fourier series (6.1),and show that we recover the Fourier coefficients. Of course, this makes the implicitassumption that if we integrate term-by-term, we obtain the same answer as if we hadintegrated the limit function. This is true, but not obvious. We will not present theproof here, but we include the following theorem, which is the key step in the proof,because it is of independent interest in any case.

First we need to define what we mean by orthonormal functions. Recall that we canthink of functions as vectors with one coordinate for each element of R. In this modeof thinking, we regard the value f(x) of f at x as the x-coordinate of the vector f .

Recall also that for “ordinary” vectors (x1, . . . , xn) and (y1, . . . , yn) in Rn, we can taketheir dot-product x · y := x1y1 + · · · + xnyn, and that x and y are orthogonal (that is,at right-angles) precisely if x · y = 0. Recall also that a vector x is normal, meaning ithas length 1, if x · x = 1. Putting these two concepts together, we say that a collectionS of vectors in Rn is orthonormal if x · x = 1 for all x ∈ S, and x · y = 0 for x 6= y ∈ S.

A function which is periodic with period 2π is determined by its values on [−π, π],so we think of such functions as vectors with infinitely many coordinates (one for eachelement of [−π, π]. It makes little sense to try to define the dot product of two functionsby adding up the products of the coordinates because there are uncountably many ofthem. Instead, we replace the sum with an integral, and we define the inner-product of

Page 45: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 43

two periodic functions f, g with period 2π by

(f |g) :=

∫ π

−π

f(x)g(x) dx

whenever the integral converges. We can now say that a collection S of functions isorthonormal if (f |f) = 1 for all f ∈ S and (f |g) = 0 for all f 6= g ∈ S.

Theorem 6.5. The trigonometric system { 12π

, 1π

sin(nx), 1π

cos(nx) : n ≥ 1} is a systemof orthogonal functions.

Again, we will not prove this theorem. The idea is to notice that we can use themultiple-angle formulae to rewrite

cos(mx) cos(nx) =1

2

(cos((m− n)x) + cos((m + n)x)

)

sin(mx) sin(nx) =1

2

(cos((m− n)x)− cos((m + n)x)

)and

sin(mx) cos(nx) =1

2

(sin((m + n)x) + sin((m− n)x)

),

and then that the periodicity of sin and cos force∫ π

−π

cos(kx) dx =

∫ π

−π

sin(kx) dx = 0

for each nonzero integer k.We now know that if f can be represented by a Fourier series, then the Fourier

coefficients are given by the Euler formulae. In particular, the Fourier series for a givenf is unique. The next theorem tells us when f can in fact be represented by a Fourierseries in the first place. Now that we have the Euler formulae in hand, it is not hardto prove — the Fourier series can only be the one given by the Euler formulae, so oneproves the theorem simply by checking that under the hypotheses of the theorem theEuler formulae make sense.

Theorem 6.6. Suppose that f : R → R is periodic with period 2π, is piecewise continu-ous in the interval [−π, π], and suppose that f also has a piecewise continuous derivativeon (−π, π]). Then f can be represented by a unique Fourier series which converges tof(x) wherever f is continuous. Moreover, for −π ≤ x0 ≤ π such that f is not continuousat x0, the Fourier series for f converges to the average 1

2(limx↗x0 f(x) + limx↘x0 f(x)).

6.2. Periods other than 2π. Of course, there are many periodic functions whoseperiod is not 2π. In general, we say that a function f has period 2L if f(x+2L) = f(x)for all x. Now we cannot expect to approximate with a Fourier series in cos(nx) andsin(nx). Instead, we seek to represent f by a Fourier series

(6.2) f(x) = a0 +∞∑

n=1

(an cos

(nπ

Lx)

+ bn sin(nπ

Lx))

.

The existence theorem and Euler’s formula are very similar: if (6.2) holds, then

(A) a0 :=1

2L

∫ L

−L

f(x) dx.

Page 46: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 44

(B) an :=1

L

∫ L

−L

f(x) cos(nπ

Lx)dx for n ≥ 1.

(C) bn :=1

L

∫ L

−L

f(x) sin(nπ

Lx)dx for n ≥ 1.

One proves this by showing that the system { 12L

, 1L

sin(

nπL

x), 1

Lcos

(nπL

x)

: n ≥ 1} is anorthonormal system of functions (where the inner-product is now defined by integrationover [−L,L] rather than [−π, π]). The formulae (A)–(C) converge provided that fis periodic of period 2L, is piecewise continuous on [−L,L] and also has a piecewise-continuous derivative on the same interval. The series determined by (A)–(C) convergesto f wherever f is continuous, and where f is not continuous, it converges to the averageof the left- and right-hand limits of f .

None of this is particularly surprising — it amounts to adjusting the formulae fromthe previous subsection by a scaling constant.

6.3. Complex Fourier series. Recall that Euler’s formula states that eiθ = cos(θ) +i sin(θ) for all real θ. Since sin is an odd function and cos is an even function, it followsthat e−iθ = cos(−θ) + i sin(−θ) = cos(θ) − i sin(θ). Adding and subtracting theseformulae one from the other, we obtain

eiθ + e−iθ = 2 cos(θ) and eiθ − e−iθ = 2i sin(θ).

Rearranging, we have cos(θ) = 12(e−θ + e−iθ) and sin(θ) = 1

2i(eiθ − e−iθ).

Putting this into (6.2) and into (A)–(C), we obtain

f(x) = a0 +1

2

∞∑n=1

(an

(enπx/L + e−nπx/L

)− ibn

(enπx/L − e−nπx/L

))

= a0 +1

2

∞∑n=1

((an − ibn)enπx/L + (an + ibn)e−nπx/L

)

where

an − ibn =1

L

∫ L

−L

f(x) cos(nπ

Lx)dx− i

1

L

∫ L

−L

f(x) sin(nπ

Lx)dx

=1

L

∫ L

−L

f(x)(

cos(nπ

Lx)− i sin

(nπ

Lx))

dx

=1

L

∫ L

−L

f(x)e−inπx/L dx

and

an + ibn =1

L

∫ L

−L

f(x) cos(nπ

Lx)dx + i

1

L

∫ L

−L

f(x) sin(nπ

Lx)dx

=1

L

∫ L

−L

f(x)(

cos(nπ

Lx)

+ i sin(nπ

Lx))

dx

=1

L

∫ L

−L

f(x)einπx/L dx

Page 47: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 45

This gives us the complex Fourier series for f :

Theorem 6.7. The exponential system { 12L

e−inπx/L : n ∈ Z} is orthonormal with inner-product defined by integration on [−L,L]. Suppose that f : R → R is periodic with period2L. Then f is represented by a Fourier series (6.2) if and only if it is also representedby the complex Fourier series

(6.3) f(x) =∞∑

n=−∞cneinπx/L

where

cn =1

2L

∫ L

−L

f(x)e−inπx/L dx for all n ∈ Z.

Moreover, these coefficients cn are the only ones for which (6.3) is valid.

6.4. Fourier integrals. The idea is now to study non-periodic functions by letting theperiod 2L in the previous section approach infinity. The upshot is that the infinite serieswe have seen so far become an improper integral called the Fourier integral.

Definition 6.8. We say that f : R → R is absolutely integrable if∫ ∞

−∞|f(x)| dx :=

(lim

a→−∞

∫ 0

a

|f(x)| dx)

+(

limb→∞

∫ b

0

|f(x)| dx)

converges to some finite value.

Fix an absolutely integrable function f . As we did when producing functions of period2π before, For any given L, and for x ∈ R, define [x][−L,L) ∈ [−L,L) to be the uniqueelement of [−L,L) such that x = [x][−L,L) + 2nL for some integer n. Then the functionfL(x) := f([x][−L,L) is periodic with period 2L and agrees with f on the interval [−L,L).

We will suppose from here on in that each fL can be represented by a Fourier serieson [−L, L) as in subsection 6.2. For each n ≥ 1, let wn := nπ

Lso that the trigonometric

functions in the Fourier expansion of fL, namely cos(nπx/L) and sin(nπx/L) becomecos(wnx) and sin(wnx). Then the Euler formulae tell us that

fL(x) =1

2L

∫ L

−L

fL(v) dv +1

L

∞∑n=1

(( ∫ L

−L

fL(v) cos(wnv) dv)

cos(wnx)

+( ∫ L

−L

fL(v) sin(wnv) dv)

sin(wnx)

).

Let ∆w := wn+1 − wn = (n+1)πL

− nπL

= πL. Then 1

π∆w = 1

L. The Fourier series above

then becomes

fL(x) =1

2L

∫ L

−L

fL(v) dv +1

π

∞∑n=1

(( ∫ L

−L

fL(v) cos(wnv) dv)

cos(wnx)∆w

+( ∫ L

−L

fL(v) sin(wnv) dv)

sin(wnx)∆w

).

Note that this formula is valid for arbitrarily large finite values of L. In particular, wemay take the limit of this expression as L → ∞, or equivalently as ∆w → 0. Since

Page 48: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 46

f is absolutely integrable, the term 12L

∫ L

−LfL(v) dv on the right-hand side goes to 0.

Moreover, since each value of x lies in [−L,L) for large enough L, we have

f(x) =1

πlim

∆w→0

∞∑n=1

(( ∫ π∆w

− π∆w

f(v) cos(wnv) dv)

cos(wnx)∆w)

+1

πlim

∆w→0

∞∑n=1

((∫ π∆w

− π∆w

f(v) sin(wnv) dv)

sin(wnx)∆w)

for all x. We do not even pretend to prove the following statement, but it is believableat least that the limits of these sums become improper integrals:

f(x) =1

π

∫ ∞

0

(∫ ∞

−∞f(v) cos(wv) dv

)cos(wx) dw

+1

π

∫ ∞

0

(∫ ∞

−∞fL(v) sin(wv) dv

)sin(wx) dw

(6.4)

If we define

(6.5) Af (w) :=1

π

∫ ∞

−∞f(v) cos(wv) dv and Bf (w) :=

1

π

∫ ∞

−∞f(v) sin(wv) dv,

then the hoped-for representation (6.4) can be rewritten as

(6.6) f(x) =

∫ ∞

0

Af (w) cos(wx) + Bf (w) sin(wx) dw.

This is called a representation of f by a Fourier integral provided that it agrees with fat every point at which f is continuous.

The following theorem justifies the hand-waving we did above, at least under appro-priate hypotheses.

Theorem 6.9. Suppose that f : R → R is absolutely integrable, piecewise-continuouson every finite interval, and has a piecewise continuous derivative on every interval aswell. Then f can be represented by the Fourier integral (6.6) where the functions Af

and Bf are given by (6.5). At any point x0 at which f is not continuous, the value ofthe Fourier integral is equal to the average of the left- and right-hand limits of f(x) asx approaches x0

6.5. Sine and Cosine Fourier transforms. The next step in our progression towardsthe Fourier transform is to concentrate on the functions Af (w) and Bf (w) appearing inthe Fourier integral in the previous section.

Recall that we say a function g : R → R is even if f(x) = f(−x) for all x, and wesay that h : R → R is odd if h(x) = −h(−x) for all x. The observations which makethis section work are

(1) if g is any even function, then∫∞−∞ g(x) dx = 2

∫∞0

g(x) dx whenever the integralsconverge; and

(2) if h is any odd function, then∫∞−∞ h(x) dx = 0.

Why is this important? We obtained the function Af by integrating f(v) cos(wv) from−∞ to ∞. We then obtained (part of) f(x) from the Fourier integral by integratingAf (w) cos(wx) dw from 0 to ∞. The point is that if we knew that f(v) cos(wv) was an

Page 49: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 47

even function of v, we could replace the integral from −∞ to ∞ in the first step with anintegral from 0 to ∞, and the two steps would then become two iterations of the samestep; this single step is what we will call the Cosine Fourier transform.

Suppose that f is an even function. Since cos is an even function, so is v 7→ cos(wv)for any fixed w. Since a product of two even functions is also even, it follows thatif f is even, then v 7→ f(v) cos(wv) is also even for any fixed w. Furthermore, sincev 7→ sin(wv) is odd, and since the product of an even function and an odd function isitself odd, we have

Bf (w) =

∫ ∞

−∞f(v) sin(wv) dv = 0.

Consequently, if f is even and is represented by a Fourier integral, then

Af (w) =2

π

∫ ∞

0

f(v) cos(wv) dv

and

f(x) =

∫ ∞

0

Af (w) cos(wx) + Bf (w) sin(wx) dw =

∫ ∞

0

Af (w) cos(wx).

A very similar analysis to the one above, using that the product of two odd functionsis an even function, shows that if f is an odd function which is represented by a Fourierintegral, then

Bf (w) =2

π

∫ ∞

0

f(v) sin(wv) dv,

and Af (w) = 0 for all w so that

f(x) =

∫ ∞

0

Bf (w) sin(wx) dw.

Definition 6.10. For an absolutely integrable function f : R → R, we define theCosine Fourier transform Fc(f) of f and the Sine Fourier transform Fs(f) of f by

Fc(f)(w) :=

√2

π

∫ ∞

0

f(v) cos(wv) dv and Fs(f)(w) :=

√2

π

∫ ∞

0

f(v) sin(wv) dv

The reasoning prior to the definition proves the following result:

Lemma 6.11. Suppose that f satisfies the hypotheses of Theorem 6.9. Then

(1) If f is an even function, then f = Fc(Fc(f)) and Fs(f) = 0.(2) If f is an odd function, f = Fs(Fs(f)), and Fc(f) = 0.

We are aiming to use the Sine and Cosine Fourier transforms to represent an arbitraryfunction f , but to do so we need to know that they are linear.

Theorem 6.12. The transforms Fc and Fs are linear in the sense that if f and g arefunctions for which the Cosine and Sine Fourier transforms exist, and if k ∈ R, thenthe Cosine and Sine Fourier transforms of kf + g both exist and are given by

Fc(kf + g)(w) = kFc(f)(w) +Fc(g)(w) and Fs(kf + g)(w) = kFs(f)(w) +Fs(g)(w)

Page 50: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 48

Proof. We just calculate:

Fc(kf + g)(w) =

√2

π

∫ ∞

0

(kf + g)(v) cos(wv) dv

=

√2

π

∫ ∞

0

kf(v) cos(vw) + g(v) cos(wv) dv

=

√2

πlim

V→∞

∫ V

0

kf(v) cos(vw) + g(v) cos(wv) dv

=

√2

πlim

V→∞k

∫ V

0

f(v) cos(vw) dv +

∫ V

0

g(v) cos(wv) dv

= k

(√2

πlim

V→∞

∫ V

0

f(v) cos(vw) dv

)+

(lim

V→∞

∫ V

0

g(v) cos(wv) dv

)

= k

(√2

π

∫ ∞

0

f(v) cos(vw) dv

)+

(∫ ∞

0

g(v) cos(wv) dv

)

= kFc(f)(w) + Fc(g)(w)

for all w ∈ R. ¤We can now prove the theorem which motivates this section:

Theorem 6.13. Suppose that f : R → R satisfies the hypotheses of Theorem 6.9. ThenFc(f) and Fs(f) both exist, and

f(x) = Fc(Fc(f))(x) + Fs(Fs(f))(x).

for all x at which f is continuous.

Proof. Let fe be the function fe(x) := f(x) + f(−x) for all x ∈ R, and let fo be thefunction fo(x) = f(x)−f(−x) for all x ∈ R. It is easy to see that fe is an even function,that fo is an odd function, and that f = fe + fo. By Lemma 6.11, we have that Fc(fo)and Fs(fe) are both zero. Lemma 6.11 also proves that Fc(Fc(fe))(x) = fe(x) and thatFs(Fs(fo))(x) = fo(x) for all x. Hence

f(x) = fe(x) + fo(x)

= Fc(Fc(fe))(x) + Fs(Fs(fo))(x)

= Fc(Fc(fe) + 0)(x)Fs(0 + Fs(fo))(x)

= Fc(Fc(fe) + Fc(fo))(x) + Fs(Fs(fe) + Fs(fo))(x)

= Fc(Fc(fe + fo))(x) + Fs(Fs(fe + fo))(x)

= Fc(Fc(f))(x) + Fs(Fs(f))(x)

for all x as required. ¤The Cosine and Sine Fourier transforms also behave nicely with respect to derivatives,

somewhat parallel to the behaviour of the Laplace transform. For this reason they cansometimes be used in solving differential equations in a manner similar to the way theLaplace transform is used, though the Fourier transform discussed in the next sectionis a better tool for this.

Page 51: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 49

Theorem 6.14. Suppose that f is continuous and absolutely integrable. Suppose furtherthat f ′ is piecewise continuous on every finite interval. Finally, suppose that f(x) → 0as x →∞. Then

Fc(f′)(w) = wFs(f)(w)−

√2

πf(0), andFs(f

′)(w) = −wFc(w)

for all w ∈ R.

Applying these formulae twice gives formulae for the Cosine and Sine Fourier trans-forms of f ′′ in terms of those for f . This allows us to compute the transforms of somefunctions easily. For example

Fc{eax}(w) = Fc

{1

a(eax)′

}(w) =

w

aFs{eax}(w)−

√2

πe0

and

Fs{eax}(w) = Ffs

{1

a(eax)′

}(w) =

−1

awFc{eax}(w).

Combining these, we obtain Fc{eax}(w) = −w2

a2 Fc{eax}(w) −√

2π. Rearranging, we

obtain Fc{eax}(w) + w2

a2 Fc{eax}(w) = −√

2π, and so

Fc{eax}(w) = −√

2

π

(1

1 + w2/a2

)=

√2

π

( −a

a2 + w2

)

6.6. The Fourier transform. In this section we apply the ideas of the last two sectionsto the complex Fourier series

∑cne

inπ/Lx. This will bring us to the Fouirer transform.Let f be an arbitrary function. As in Section 6.4, for each L ∈ R, define fL to be

the periodic function fL(x) := f([x][−L,L) of period 2L. Supposing that each fL can berepresented by a Fourier series, Theorem 6.7 ensures that for any L > |x|,

f(x) =∞∑

n=−∞

1

2L

∫ L

−L

f(v)e−inπv/L dveinπx/L.

Where we have used a different variable, v in the integral defining cn to avoid confusion.If we again let wn := nπ

Lfor each n, and ∆w := wn − wn−1 = π

L, this becomes

f(x) =1

∞∑n=−∞

( ∫ L

−L

f(x)e−iwnv dv)eiwnx∆w

for large enough L. If we take the limit as L →∞ (so that ∆w → 0, and again act onthe plausible assumption that the infinite sum then becomes an infinite integral, weobtain

f(x) =1

∫ ∞

−∞

( ∫ ∞

−∞f(x)e−iwv dv

)eiwx dw.

Rearranging this, we arrive at the complex Fourier integral:

f(x) =1

∫ ∞

−∞

∫ ∞

−∞f(x)e−iw(x−v) dv dw.

It is more important, however, to note the symmetry between the expression for cn

and the expression for f(x) obtained from cn. The former is the integral of f(x) against

Page 52: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 50

e−iwv as v ranges over R, and the latter is effectively the same except that one integratesagainst eiwx as w ranges over R. Apart from a change of variable names, the differenceis only in the sign of the exponent.

This leads us to the definition of the Fourier transform, which is where we have beenheaded throughout this section.

Definition 6.15. Given a function f : R → R, we define the Fourier transform of f ,

denoted either F(f) or f by

(6.7) F(f)(x) = f(x) =1√2π

∫ ∞

−∞f(w)e−iwx dw

at all values of x for which the integral converges. Where f exists, we call f the inverseFourier transform of f , and denote it F−1(f).

In terms of the Fourier transform, the Fourier integral for f becomes

f(x) =1√2π

∫ ∞

−∞F(f)(w)e−wx dw = F(F(f))(−x).

That is to say, F−1(g)(x) = F(g)(−x) whenever g has an inverse Fourier transform. Asalways, we want to know when the Fourier transform exists, and what properties it has.

Theorem 6.16. The Fourier transform has the following properties:

(1) Suppose that f : R → R is absolutely integrable and piecewise continuous on

every finite interval. Then The Fourier transform f of f given by (6.7) exists.(2) suppose that f : R → R is continuous and f(x) → 0 as x → ∞. Suppose

moreover that f ′(x) is absolutely integrable. Then f ′ exists, and satisfies

f ′(w) = iwf(w) for all w.

(3) Suppose that f and g both have Fourier transforms, and let k ∈ R. Then kf + ghas a Fourier transform, and it satisfies

kf + g(w) = kf(w) + g(w) for all w.

(4) Suppose that f and g are piecewise continuous, bounded and absolutely integrable.Then the convolution f ∗ g of f and g has a Fourier transform and it satisfies

f ∗ g(w) =√

2πf(w)g(w) for all w.

7. Higher order homogeneous linear Ordinary Differential Equations:the Wronskian

The most general form of a linear ordinary differential equation is

(7.1) an(x)dny

dxn+ an−1(x)

dn−1x

dxn−1+ . . . + a0(x)y = G(x),

where an(x), an−1(x), . . . a0(x), G(x) are known functions of x, and the functions ai(x)for i = 0, . . . , n are called the coefficients of the linear differential equation. If G(x) = 0then the equation (7.1) is called a homogeneous nth. order linear differential equation. IfG(x) 6= 0 then the equation (7.1) is called a non-homogeneous nth. order linear differentialequation.

Page 53: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 51

Rewriting (7.1) as

dny

dxn+ pn−1(x)

dn−1y

dxn−1+ . . . + p0(x)y = g(x)

then the existence and uniqueness theorem guarantees that if pn−1, . . . , p0, g are allcontinuous at x0 then there exists one and only one solution of (7.1) satisfying theinitial conditions

dn−1y

dxn−1(x0) = y

(n−1)0 , . . .

dy

dx(x0) = y′0, y(x0) = y0.

It can be shown that this solution is continuous at least on the interval (a, b) where ais the nearest singularity (i.e. discontinuity) of {p0(x), . . . , pn−1(x), g(x)} below x0 (if nosuch value exits then a = −∞) and b is the nearest singularity of {p0(x), . . . , pn−1(x), g(x)}above x0 (if no such value exists then b = +∞).

Note 7.1. In a boundary value problem, conditions are specified at more than one valueof the independent variable, in which case the existence and uniqueness theorem doesnot apply, compare:

(1) y′′ + y = 0 with y(0) = 0 and y′(0) = 1 is an initial value problem with uniquesolution y(x) = sin x.

(2) y′′ + y = 0 with y(0) = 0, y(π) = 0 is a boundary value problem with solutiony(x) = A sin x for all A.

(3) y′′+y = 0 with y(0) = 0, y(π) = 1 is a boundary value problem with no solution.

As was the case for higher order linear ODEs with constant coefficients, the generalsolution of (7.1) is of the form

(7.2) yg(x) = yp(x) + yc(x)

where yp(x) is a particular solution of the associated non-homogeneous equation (sothat yp(x) ≡ 0 if G ≡ 0) and yc(x) is the complementary function, which is the generalsolution of the associated homogeneous equation:

(7.3) an(x)dny

dxn+ an−1(x)

dn−1x

dxn−1+ . . . + a0(x)y = 0.

If y1(x) and y2(x) are two solutions to (7.1) (for different given initial conditions) thentheir difference y1(x) − y2(x) is automatically a solution to (7.3). This follows becausethe yp(x) term in each of y1(x) and y2(x) is the same and cancels out when we take thedifference.

The decomposition (7.2) of the general solution in this way is reminiscent of thesolution to a non-homogeneous system of linear equations Ax = b. Here the generalsolution consists of a single solution to the system Ax = b plus the totality of thesolutions to the associated homogeneous system Ax = 0.

Example 7.2. Recall from Example 1.7 that the general solution ofdM

dt+

2

t + 100M = 7

is

M(t) =7

3(t + 100) +

A

(t + 100)2, where A is a constant.

Page 54: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 52

Now we may verify that7

3(t + 100) is a particular solution, and that

A

(t + 100)2is the

general solution of the associated homogeneous equation

(7.4)dM

dt+

2

t + 100M = 0.

Our strategy for solving (7.1) will be to first find the general solution yc(x) to theassociated homogeneous equation (7.3), then find a particular solution yp(x) and thenput them together to give the general solution yg(x). Hence we shall first focus onhomogeneous linear differential equations.

What are the general properties of a solution of a homogeneous linear ordinary differ-ential equation (7.3)?

(1) If y1(x), y2(x), . . . , yk(x) are solutions of a homogeneous linear ordinary differen-tial equation(7.3) on the interval (a, b) then so is the linear combination

c1y1(x) + c2y2(x) + . . . + ckyk(x)

for all numbers c1, . . . , ck. This fact is also called the superposition principle. We

saw this in practice in Example 7.2 above: since the function M(t) =1

(t + 100)2

is a solution of the homogeneous equation (7.4) then so are M(t) =A

(t + 100)2

for all values A. It is also the reason why the arbitrary constant which crops upin the integrating factor for a first order linear ordinary differential equation isignored.

For more examples, observe that since ex, e−x, cosh x and sinh x are all solu-tions to y′′ − y = 0 then so is Aex + Be−x + C cosh x + D sinh x for all values ofA, B, C, D. Though ex + x2 is a solution of y′′ − y = 2 − x2 it is not true thatA(ex +x2) is a solution for all values of A since the differential equation was not

homogeneous. Though y =1

xis a solution of y′′ − 2y3 = 0, the function y =

A

xis only a solution if A = 0,±1 since the differential equation is not linear.

(2) The general solution of (7.3) is the linear combination of n linearly indepen-dent solutions, called a fundamental set of solutions. Recall that the functions{y1(x), y2(x), . . . , yk(x)} are linearly independent if

c1y1(x) + c2y2(x) + . . . + ckyk(x) ≡ 0

for all x only when c1 = c2 = . . . = ck = 0. For instance Ax + Bx2 = 0 for all xif and only if A = B = 0 (e.g. put x = −1, 1 and solve simultaneously for A,B)and so {x, x2} are linearly independent. On the other hand, from the doubleangle formula we know that cos(2x) + (−1) cos2 x + sin2 x = 0 for all x and so{cos 2x, cos2 x, sin2 x} are linearly dependent.

In practise we do not use the definition itself to determine wether or not a set of functionsis linearly independent or not. Instead we use the Wronskian:

Page 55: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 53

Definition 7.3. The Wronskian of the k functions y1(x), . . . , yk(x) is

W (y1(x), . . . , yk(x)) :=

∣∣∣∣∣∣∣∣∣∣∣∣

y1(x) y2(x) . . . y`(x)dy1

dx(x)

dy2

dx(x) . . .

dyk

dx(x)

......

. . ....

dk−1y1

dxk−1(x)

dk−1y2

dxk−1. . .

dk−1yk

dxk−1

∣∣∣∣∣∣∣∣∣∣∣∣

.

Example 7.4. For the functions x, x2, sin x we compute

W (x, x2, sin x) =

∣∣∣∣∣∣

x x2 sin x1 2x cos x0 2 − sin x

∣∣∣∣∣∣= x

∣∣∣∣2x cos x2 − sin x

∣∣∣∣− 1

∣∣∣∣x2 sin x2 − sin x

∣∣∣∣ + 0

= x(−2x sin x− 2 cos x)− 1(−x2 sin x− 2 sin x)

= −x2 sin x− 2x cos x + 2 sin x.

If the Wronskian is identically zero (i.e. it has the value 0 for all values of x), then thefunctions comprising it are linearly dependent. In particular if y1(x), y2(x), . . . , yn(x)are n solutions of (7.3) on the interval (a, b) then

W (y1, . . . , yn) 6= 0 on (a, b) ↔ {y1, . . . , yn} is a fundamental set of solutions of (7.3).

It is important to note that the fundamental set of solutions to a differential equationis not unique.

Examples 7.5. The sets {ex, e−x}, {cosh x, sinh x}, {ex, cosh x} are all fundamental setsof solutions of the differential equation y′′ − y = 0 on the interval (−∞,∞). Thisfollows because each set consists of two linearly independent solutions to the equationy′′ − y = 0. The associated general solutions are then

y1(x) = Aex + Be−x,

y2(x) = C cosh x + D sinh x,

y3(x) = Eex + F cosh x.

Finally to solve the initial value problem

y′′ − y = 0, with y(0) = 1, y′(0) = 0,

we compute the appropriate values of A,B, C,D, E, F to get

y1(x) =1

2ex +

1

2e−x, y2(x) = cosh x, y3(x) = cosh x.

Page 56: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 54

8. Series solutions

References: Section 18.4 (Stewart 4th. edition) or Section 15.8 (Stewart 3rd. edition),and Section 5.2 in Zill and Cullen. In Kreysig, Sections 4.1 and 4.2 are the most relevant.

Consider the differential equation:

(8.1) y′′ + y = 0,

which has general solution

y(x) = A cos x + B sin x.

Near x = 0 the functions cos x and sin x have well-known power series representations:

cos x = 1− x2

2+

x4

4!− x6

6!+ . . . =

∞∑n=0

(−1)nx2n

(2n)!

sin x = x− x3

3!+

x5

5!− x7

7!+ . . . =

∞∑n=0

(−1)nx2n+1

(2n + 1)!

which converge for all values of x. Hence the general solution of (8.1) may be written

y(x) = A

∞∑n=0

(−1)nx2n

(2n)!+ B

∞∑n=0

(−1)nx2n+1

(2n + 1)!.

Can we obtain the power series solutions of (8.1) directly? The method of attack issimilar to the technique of undetermined coefficients. We seek a solution of (8.1) of theform

y(x) =∞∑

n=0

anxn = a0 + a1x + a2x

2 + a3x3 + . . . ,

our task is to determine coefficients an for which this series converges to a functionsatisfying (8.1). If we assume that term-by-term differentiation of the infinite series ispossible, then

d

dx

( ∞∑n=0

anxn

)=

∞∑n=0

nanxn−1, andd2

dx2

( ∞∑n=0

anxn

)=

∞∑n=0

n(n− 1)anxn−2.

Note that the infinite sums for the first and second derivatives now start at n = 1 andn = 2 respectively. Consequently we have

(8.2) y′′ + y =d2

dx2

( ∞∑n=0

anxn

)+

∞∑n=0

anxn =∞∑

n=0

n(n− 1)anxn−2 +

∞∑n=0

anxn.

To add two series together under one summation sign, both summation indices muststart at the same value (cf. adding definite integrals) and the numerical values of thepowers of x need to be the same for the same value of the summation index. this is notthe case in the formula above; in the first sum n = 2 gives the term x0 whereas in thesecond sum n = 2 gives the term x2. To get around this problem we must adjust the

Page 57: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 55

summation indices of each sum in the manner shown below: Observe that

d

dx

( ∞∑n=0

anxn

)=

∞∑n=0

nanxn−1

=∞∑

n=1

nanxn−1 =∞∑

k=0

(k + 1)ak+1xk,

where we replace n− 1 by k in the last sum – this operation is similar to a “change ofvariables” in an integral (and so changes the limits of the sum). Similarly we have

d2

dx2

( ∞∑n=0

anxn

)=

∞∑n=0

n(n− 1)anxn−2

=∞∑

n=2

n(n− 1)anxn−2

=∞∑

k=0

(k + 2)(k + 1)ak+2xk,

where we replace n− 2 by k in the last sum. In general we make the substitution for kto be the power of x occurring in the sum. Returning to (8.2) we have

0 =∞∑

k=0

(k + 2)(k + 1)ak+2xk +

∞∑

k=0

akxk =

∞∑

k=0

{(k + 2)(k + 1)ak+2 + ak}xk

which must be so for some interval about x = 0. Now a power series is identicallyzero (i.e. it is zero for all values of x) for some interval of the independent variableif and only if the coefficient of each power is 0. Thus for k = 0, 1, 2, . . . we have(k + 2)(k + 1)ak+2 + ak = 0 or

ak+2 = − 1

(k + 2)(k + 1)ak,

which is a (second order) recurrence relation. Substituting recursively into the recurrencerelation we find that

if k = 0 then a2 = − 1

2.1a0, if k = 1 then a3 = − 1

3.2a1,

if k = 2 then a4 = − 1

4.3a2 =

(−1)2

4!a0, if k = 3; then a5 = − 1

5.4a3 =

(−1)2

5!a1,

if k = 4 then a6 = − 1

6.5a4 =

(−1)3

6!a0, if k = 5 then a7 = − 1

7.6a3 =

(−1)3

7!a1.

In general for k = 0, 1, . . . we have

a2k =(−1)k

(2k)!a0, and a2k+1 =

(−1)k

(2k + 1)!a1,

Page 58: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 56

and the solution of (8.1) is

∞∑n=0

anxn = a0x0 + a1x− 1

2!a0x

2 − 1

3!a1x

3 +1

4!a0x

4 +1

5!a1x

5 − . . .

= a0

(1− x2

2!+

x4

4!− . . .

)+ a1

(x− x3

3!+

x5

5!− . . .

)

= a0y1(x) + a1y2(x),

where y1(x) = 1− x2

2!+

x4

4!− . . . and y2(x) = x− x3

3!+

x5

5!− . . .. The infinite series y1(x)

and y2(x) are solutions to (8.1) only on their intervals of convergence, which is usuallyfound by applying the ratio test.

For instance, since successive terms in the infinite series y1(x) and y2(x) are anxn andan+2x

n+2, then to apply the ratio test we compute

limn→∞

∣∣∣∣an+2x

n+2

anxn

∣∣∣∣ = |x|2 limn→∞

∣∣∣∣an+2

an

∣∣∣∣ substituting from the recurrence relation we get

= |x|2 limn→∞

∣∣∣∣−1

(n + 2)(n + 1)

∣∣∣∣ = |x|2.0 = 0 which is less than 1 for all x.

Hence y1(x) and y2(x) are solutions of (8.1) for all x (and a0y1(x)+a1y2(x) is the generalsolution since their Wronskian W (y1, y2)(0) = 1 6= 0 for all x and so W 6≡ 0).

Example 8.1. To find the general solution of the second order linear differential equation

(1− x2)y′′ − 2xy′ + 6y = 0

about x = 0 we set y(x) =∞∑

n=0

anxn then

y′(x) =∞∑

n=0

nanxn−1 and y′′(x) =∞∑

n=0

n(n− 1)anxn−2.

Hence

(1− x2)y′′ − 2xy′ + 6y = (1− x2)∞∑

n=0

n(n− 1)anxn−2 − 2x∞∑

n=0

nanxn−1 + 6

∞∑n=0

anxn

=∞∑

n=0

n(n− 1)an(1− x2)xn−2 +∞∑

n=0

−2nanxn +∞∑

n=0

6anxn

=∞∑

n=0

n(n− 1)anxn−2 +

∞∑n=0

−n(n− 1)anxn +

∞∑n=0

(−2n + 6)anxn

=∞∑

n=0

n(n− 1)anxn−2 +

∞∑n=0

{−n(n− 1)− 2n + 6}anxn,

Page 59: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 57

now put k = n− 2 in the first sum and k = n in the second sum to get

∞∑

k=0

(k + 2)(k + 1)ak+2xk +

∞∑

k=0

− (k2 + k − 6)akxk

=∞∑

k=0

{(k + 2)(k + 1)ak+2 − (k2 + k − 6)ak}xk.(8.3)

The right hand side of (8.3) is the function which is identically zero if for k = 0, 1, 2, . . .we have

(k + 2)(k + 1)ak+2 − (k2 + k − 6)ak = 0 or ak+2 =(k + 3)(k − 2)

(k + 2)(k + 1)ak,

which is a (second order) recurrence relation. Substituting values of k into the recurrencerelation we find that

for k = 0, we get a2 =−6

2.1a0 = −3a0, for k = 1, we get a3 =

−4

3.2a1 = −2

3a1,

for k = 2, we get a4 =5.0

4.3a2 = 0, for k = 3, we get a5 =

6.1

5.4a3 = −1

5a1,

for k = 4, we get a6 =7.2

6.5a4 = 0, for k = 5, we get a7 =

8.3

7.6a5 = − 4

35a1,

so a2k = 0 for k = 2, 3, 4, . . . and a2k+1 = f(k)a1 for k = 0, 1, 2, . . . .

Thus the solution of (1− x2)y′′ − 2xy′ + 6y = 0 is

y(x) = a0 + a1x +−3a0x2 − 2

3a1x

3 + 0.a4x4 − 1

5a1x

5 + 0.a6x6 − 4

35a1x

7 + . . .

= a0(1− 3x2) + a1

(x− 2

3x3 − 1

5x5 − 4

35x7 − . . .

)

= a0y1(x) + a1y2(x),

where y1(x) = 1− 3x2 is a solution for all x and y2(x) = x− 23x3− 1

5x5− 4

35x7− . . . is a

solution on its interval of convergence. Since the successive terms of y2(x) are anxn and

an+2xn+2 for the ratio test we compute

limn→∞

∣∣∣∣an+2x

n+2

anxn

∣∣∣∣ = |x|2 limn→∞

∣∣∣∣an+2

an

∣∣∣∣ and substituting from the recurrence relation we get

= |x|2 limn→∞

∣∣∣∣(n + 3)(n− 2)

(n + 2)(n + 1)

∣∣∣∣= |x|2.1 = |x|2 which is less than 1 for all |x| < 1.

Thus y2(x) is a solution of the differential equation only on −1 < x < 1. Clearly y1, y2

are linearly independent, so a1y1(x) + a2y2(x) is the general solution.Note that we could use the method of reduction of order with the known solution

y1(x) = 1 − 3x2 to find the exact nature of the infinite series series y2(x) (though theresulting calculation is quite messy!).

Page 60: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 58

Notes 8.2. (i) Suppose instead that we had the second order linear differential equa-tion

(2− x2)y′′ − 2xy′ + 6y = 0,

then with working almost identical to Example 8.1 we find that

an+2 =(n + 3)(n− 2)

2(n + 2)(n + 1)an.

Calculating the radius of convergence for this infinite power series we have

limn→∞

∣∣∣∣an+2x

n+2

anxn

∣∣∣∣ = |x|2 limn→∞

∣∣∣∣an+2

an

∣∣∣∣ and substituting from the recurrence relation we get

= |x|2 limn→∞

∣∣∣∣(n + 3)(n− 2)

2(n + 2)(n + 1)

∣∣∣∣

= |x|2.12

which is less than 1 for all |x| <√

2.

(ii) Recall that if f, g are two polynomials then

limn→∞

∣∣∣∣f(n)

g(n)

∣∣∣∣ =

0 if degree(f) < degree(g)∞ if degree(f) > degree(g)∣∣∣ab

∣∣∣ if degree(f) = degree(g) = k, and

f(n) = ank + . . . , g(n) = bnk + . . .

This may be shown by application of various forms of L’Hopital’s rule.

(iii) Recall that an infinite power series∞∑

n=0

an(x−x0)n is (absolutely) convergent for

|x − x0| < R or x0 − R < x < x0 + R where R (≥ 0) is called the radius ofconvergence. If R = 0 the series is only convergent at x0 and if R = ∞ thenthe series converges for all x. It can be shown that infinite power series canbe differentiated term by term in their intervals of convergence and these newinfinite series are equal to the derivative of the original infinite series. To applythe ratio test we compute

limn→∞

∣∣∣∣an+1(x− x0)

n+1

an(x− x0)n

∣∣∣∣ = |x− x0| limn→∞

∣∣∣∣an+1

an

∣∣∣∣ ,

the series is (absolutely) convergent for all those x with

|x− x0| limn→∞

∣∣∣∣an+1

an

∣∣∣∣ < 1.

In particular, the radius of convergence is given by

R = limn→∞

∣∣∣∣an

an+1

∣∣∣∣ .

One can seek a power series solution of y′′ + p1(x)y′ + p0(x)y = 0 centered on x = x0

for any x0 about which p1 and p0 have power series expansions (all such x0 are calledordinary points of the differential equation). If the radii of convergence of the powerseries for p1 and p0 are R1 and R0 then the series solution will converge at least on

Page 61: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 59

|x − x0| ≤ min{R0, R1}. For the sake of simplicity we shall usually assume that theordinary point of interest is x0 = 0. If x0 6= 0 then the substitution t = x−x0 translatesthe value of x = x0 to t = 0.

In Example 8.1 we had

p1(x) =−2x

1− x2= −2x(1 + x2 + x4 + x6 + . . .) for |x2| < 1

p0(x) =6

1− x2= 6(1 + x2 + x4 + x6 + . . .) for |x2| < 1

So an infinite power series solution will converge at least on |x| < 1. With initialconditions specified at x = 0 the existence and uniqueness theorem guarantees that theinitial value problem has a unique solution which is continuous at least on the interval(−1, 1).

Page 62: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 60

9. Other methods for higher-order ODEs

Reduction of order

How does one go about finding a fundamental set of solutions of a homogeneous lineardifferential equation such as (7.3)? If we know one non–trivial solution y = y1(x) of(7.3), then one can attempt to complete a fundamental set of solutions by the methodof reduction of order. The basic idea is to substitute y(x) = y1(x)v(x) into (7.3), andthen solve the resulting differential equation for v.

Examples 9.1. (i) Given that y(x) = cosh x is a solution of y′′ − y = 0 we mayuse reduction of order to find a second linearly independent solution as follows.Substitute y(x) = v(x) cosh x into the differential equation:

y′′ − y = v′′ cosh x + 2v′ sinh x + v(cosh x− cosh x) = 0 so

v′′ cosh x + 2v′ sinh x = 0 then

(v′)′ + 2

(sinh x

cosh x

)v′ = 0,

which is a first order linear differential equation in v′. The integrating factor forthis equation is

e2R

sinh xcosh x

.dx = e2 ln(cosh x) = (cosh x)2,

therefore((cosh x)2v′

)′= 0× cosh2 x so that v′ =

A

cosh2 x= A sech2x,

hence v(x) = A tanh x + B where A,B are constants. Then

y(x) = v(x) cosh(x) = A sinh x + B cosh x

is the general solution of the differential equation. Hence the second linearlyindependent solution is y(x) = sinh x.

(ii) It is easy to see that y(x) = x is a solution of x2y′′ − xy′ + y = 0 [if y = x theny′ = x, y′′ = 0 and then clearly x2(0)−x(1)+x = 0]. We may now use reductionof order to find a second, linearly independent solution, and also the generalsolution for x > 0. Substitute y(x) = xv(x) into the differential equation:

y − xy′ + x2y′′ = xv − x[v + xv′] + x2[2v′ + xv′′] = 0 so

v(x− x) + v′(−x2 + 2x2) + x3v′′ = 0 and then

(v′)′ +1

xv′ = 0, since x > 0,

which is a first order linear differential equation in v′. The integrating factor is

eR

1x

.dx = eln |x| = x provided x > 0,

Page 63: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 61

therefore(xv′

)′= 0× x = 0 so

v′ =A

xand then

v = A ln x + B,

where A,B are constants. Thus the general solution of the differential equationis

y(x) = xv(x) = Ax ln x + Bx.

The second solution of the differential equation which is linearly independentfrom y(x) = x is then y(x) = x ln x. We check

W (x, x ln x) =

∣∣∣∣x x ln x1 ln x + 1

∣∣∣∣ = x 6≡ 0 on (0,∞) or (−∞, 0),

which we would expect from the standard form of the differential equation

d2y

dx2+

(− 1

x

)dy

dx+

( 1

x2

)y = 0,

which shows that at least one coefficient is discontinuous at x = 0.

Non Homogeneous Linear Ordinary Differential Equations

Here we are considering the case of equation (7.1) with G(x) 6≡ 0. As mentionedearlier, the general solution to such equations is of the form yg(x) = yc(x)+ yp(x) whereyc is called the complementary function and is the general solution of the associatedhomogeneous equation and yp(x) is a particular solution to the equation itself. If thereare any initial conditions given with the differential equation, they are applied to yg(x)and not yc(x). There are three main methods for finding a particular solution

(1) The method of undetermined coefficients can sometimes be used; usuallywith constant coefficient differential equations. For example to find the generalsolution of y′′−2y′+y = 16e5x we first find the general solution to y′′−2y′+y =0 which has characteristic equation r2 − 2r + 1 = 0 = (r − 1)2 Hence thecomplementary function is yc(x) = Aex + Bxex for some constants A,B. Nextwe find the particular solution by guessing that yp = Ce5x; upon substitutinginto the differential equation we get

y′′p − 2y′p + yp = (C − 10C + 25C)e5x = 16Ce5x = 16e5x

in which case C = 1 and then yp(x) = e5x. Hence the general solution to thedifferential equation is yg(x) = Aex + Bxex + e5x. If we were also given initialconditions with the differential equation, we would now apply them to yg(x).

If the right-hand side of the differential equation is already one of the funda-mental set of solutions to the associated homogeneous equation then a constantmultiple of it cannot be a particular solution. We now guess a particular so-lution which is x times it and so on until we find a function which is not thesolution of the associated homogeneous equation. For instance, for the equation

Page 64: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 62

y′′ − 2y′ + y = 16ex we choose yp(x) = Cx2ex since ex and xex are in the fun-damental set of solutions to the associated homogeneous equation and cannottherefore be particular solutions to the nonhomogeneous equation.

(2) The method of variation of parameters was introduced by Lagrange in1774, and can be used once a fundamental set of solutions of the associatedhomogeneous differential equation is known. For example, we saw earlier inExamples 9.1 (ii) that for x > 0 the set {x, x ln(x)} is a fundamental set ofsolutions of x2y′′− xy′ + y = 0. To solve x2y′′− xy′ + y = 2x3 with y(1) = 1 andy′(1) = 2 we try a particular solution of the form yp = xu1(x) + (x ln(x))u2(x),in which case

y′p = u1(x) + xu′1(x) + (ln(x) + 1)u2(x) + (x ln(x))u′2(x)

and then we set

(9.1) xu′1(x) + (x ln(x))u′2(x) = 0

then y′p = u1 + (ln x + 1)u2 and so

y′′p = u′1 +1

xu2 + (ln(x) + 1)u′2.

Substituting into the differential equation we get

2x3 = x2y′′p − xy′p + yp(9.2)

= x2u′1 + xu2 + (x2 ln(x) + x2)u2 − [xu1 + (x ln(x))u2] + [xu1 + x ln xu2]

= u1(−x + x) + u2(x− x ln(x)− x + x ln(x)) + x2u′1 + (x2 ln(x) + x2)u′2= x2u′1 + (x2 ln(x) + x2)u′2(9.3)

Now we solve equations (9.1) and (9.3) simultaneously for u′1 and u′2. From (9.1),dividing by x > 0 and rearranging we get u′1 = − ln(x)u′2. Then substitutingfor u′1 into (9.3) gives x2u′2 = 2x3 that is u′2 = 2x (dividing by x2 > 0). Sinceu′1 = − ln(x)u′2 we then have u′1 = −2x ln(x). Integrating these equations we get

u2(x) = x2, u1(x) = −[x2 ln(x)− x2

2

].

Note that we do not introduce constants of integration here as they will addunnecessary solutions to the homogeneous equation to our particular solution.Hence we compute

yp(x) = xu1(x) + (x ln(x))u2(x)

= −x(x2 ln(x)− x2

2

)+ (x ln(x))x2 =

x3

2

which means that the general solution to the differential equation is

yg(x) = yc(x) + yp(x) =x3

2+ Ax + Bx ln(x).

Page 65: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 63

Now we apply the initial conditions to get

yg(1) =1

2+ A + 0 = A +

1

2= 1 and so A =

1

2then

y′g(x) =3x2

2+

1

2+ B(ln(x) + 1) so

y′g(1) = 2 + B = 2 and so B = 0.

Therefore the solution to the initial value problem is then

y(x) =x3

2+

1

2x.

(3) A modified reduction of order can be attempted once one non-trivial solutionof the associated homogeneous differential equation is known. For example, giventhat y(x) = x is a solution of x2y′′ − xy′ + y = 0 for x > 0 we may find thegeneral solution of x2y′′ − xy′ + y = 2x3 as follows. Try y(x) = xv(x) in the nonhomogeneous differential equation. Then

y = xy′ + x2y′′ = xv − x[v + xv′] + x2[2v′ + xv′′] = x3v′′ + x2v′ = 2x3

which leaves us the first order linear equation in v′

(v′)′ +1

xv′ = 2

which had integrating factor eR

1x

dx = eln |x| = x since x > 0, and so

(xv′)′ = 2x hence

xv′ = x2 + A that is

v′ = x +A

xwhich has solution

v =x2

2+ A ln x + B for x > 0 and constants A,B.

Therefore the general solution to the differential equation is y(x) =x3

2+[Ax ln x+

Bx] = yp(x) + yc(x). Hence, in once calculation we not only recover the secondlinearly independent solution of the associated homogeneous equation, but alsothe particular solution.

Applications of second order linear ordinary differential equations

Consider the situation of a mass M Kg. attached to a spring of natural length `. Whenthe spring is extended, or compressed, by a small amount x it exerts a force trying toreturn it to its natural length, of magnitude kx (Hooke’s law), where k > 0 is called thespring constant. In the equilibrium position the spring extends a distance s so that thedownward force of gravity on the mass is balanced by the restoring force of the spring,i.e.

(9.4) Mg = ks,

where g is the acceleration due to gravity.

Page 66: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 64

Now suppose that we set the mass moving in the vertical direction. It will continueto move in this direction. Suppose, at time t that the mass is at position y.

............................................................................................................................................................................................................................................................................................................................................................................................................................................

..........................................

..........................................

..........................................

..........................................

..........................................

........

........

........

........

........

......................

...................

..........................................................

..............................

........

........

........

........

........

........

........

........

........

........

........

........

.......................

...................

............................................................................................................

................................................................................................................................................................................................

.......................................................................................................................................................

...................................................................................................................................................................................................................

•M

`

s

x

y

........ ........ ........ .....

........ ........ ........ .....

By Newton’s second law of motion we have

My′′ = Mg − ky − cy′,

where cy′ is the friction (damping, or resistance) force on the moving mass which actsto slow the motion. The positive constant c is called the damping constant. If we writey = s+x so that x = x(t) is the displacement of the mass from the equilibrium positionthen y′ = x′, y′′ = x′′, and then by (9.4) we have

Mx′′ = Mg − k(s + x)− cx′ or Mx′′ + cx′ + kx = 0.

If an external force F (t) is also being exerted on the mass (say, by shaking the supportingbeam) then

Mx′′ + cx′ + kx = F (t).

No Friction

If there is no friction (i.e. c = 0) then Mx′′ + kx = F (t), and then the complementaryfunction xc(t) is the solution to the differential equation Mx′′ + kx = 0 which has

characteristic equation Mr2 + k = 0, so that r = ±i

√k

M= ±iwN where wN =

√k

Mcalled is the natural frequency. Hence we have shown that

xc(t) = A cos wN t + B sin wN t,

which represents a motion of period2π

wN

, or circular frequency wN . Once excited (by

making at least one of x(0) or x′(0) nonzero with F (t) ≡ 0, the natural motion calledsimple harmonic motion goes on for ever (since there is no energy dissipation).

Any function F (t) can be analysed into “Fourier coefficients” which are basicallyfunctions of the form a cos ωt for various ω. Hence we need really only consider thecase F (t) = a cos ωt. Let’s find the general solution of Mx′′ + kx = a cos ωt (wherek = Mw2

N). We use the method of undetermined coefficients to find the particularsolution. If ω 6= wN then we try xp(t) = A cos ωt, then

−Aω2M cos ωt + Ak cos ωt = a cos ωt which reduces to

0 = (a + A(Mω2 − k)) cos ωt.

Page 67: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 65

Since this equation must hold for all t we must have

A =a

k −Mω2=

a

M(w2N − ω2)

,

which gives

xg(t) = A cos wN t + B sin wN t +a

M(w2N − ω2)

cos ωt

which, in general represents a sum of the natural (free) motion, of period2π

wN

, and a

motion of period2π

ω, the forced response. If ω = wN then we try xp(t) = At sin ωt, then

2MAω cos ωt−MAω2t sin ωt + kAt sin ωt = a cos ωt which reduces to

(2MAω − a) cos ωt + (kA−MAω2)t sin ωt = 0.

Since this equation must hold for all t we must have

A =a

2Mωand ω =

√k

M

which gives

xg(t) = A cos wN t + B sin wN t +a

2MwN

t sin wN t

which represents a motion in which the amplitude |xg(t)| increases without bound ast →∞, due to the t sin wN t term. The mechanical system breaks down, since |x| is nolonger small. This phenomenon is called pure resonance and is potentially destructive,and is part of the reason why damping is essential is all mechanical an electrical systems.

Friction:

Here c 6= 0, then our equation is Mx′′ + cx′ + kx = F (t). The complementary functionxc(t) is a solution of Mx′′+cx′+kx = 0, which has characteristic equation Mr2 +cr+k.In which case

r1, r2 =−c±√c2 − 4kM

2M= − c

2M±

√( c

2M

)2

− w2N where wN =

√k

M.

There are three cases:

(1) Usuallyc

2M¿ wN , so r1, r2 are complex numbers. Writing w∗2 = w2

N −( c

2M

)2

we have r1, r2 = − c

2M± iw∗ and so

xc(t) = Ae−c

2Mt cos w∗t + Be−

c2M

t sin w∗t,

which represents a motion, oscillating with period2π

w∗ but with amplitude de-

creasing in time since e−c

2Mt → 0 as t → ∞. This case is called under-damped

motion.(2) When

c

2M= wN , we have r1, r2 = − c

2Mand then

xc(t) = Ae−c

2Mt + Bte−

c2M

t,

Page 68: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 66

which represents a motion that decays rapidly to zero (in time) and is calledcritically damped motion. Note that xc(t) is either always positive or alwaysnegative, so that there are no oscillations.

(3) Whenc

2M> wN , then r1 and r2 are both real and negative since the expression

√( c

2M

)2

− w2N <

c

2M, and then

xc(t) = Aer1t + Ber2t,

which represents a motion that decays to zero (in time) but even more slowlythan the critically damped case (though not initially, see curves below). andis called over damped motion. Again, xc(t) is either always positive or alwaysnegative, so that there are no oscillations.

Observe also that if r1 is the larger of r1, r2 then

r1 = − c

2M+

√( c

2M

)2

− w2N > − c

2M,

so that the over damped curve goes to zero slower than that of the under dampedcurve. For the critically damped curve it takes a little while for the under dampedcurve to lie above it, due to the te−

c2M

t-term.

...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

........

...

.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

.............................................................................................................................................................................................................................................................................................................................................................................................

................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. ................................................ ...................

........

........

........

........

.......................

...................

t

x(t)

Underdamped

Critically damped

Over damped

Hence with c 6= 0 all “natural” motions decay in time and are called transient motions.

The general solution of the non-homogeneous equation Mx′′ + cx′ + kx = a cos(ωt) is

x(t) =[Aer1t + Ber2t

]+ xp(t)

where the first two terms represent the transient motion just described, and xp(t) theparticular solution is called the forced response or steady state solution. Again we usethe method of undetermined coefficients to determine the particular solution. If we tryxp(t) = A cos(ωt) + B sin(ωt) then we find that

−MAω2 cos(ωt)−MBω2 sin(ωt)− Acω sin(ωt)

+ Bcω sin(ωt) + Ak cos(ωt) + Bk sin(ωt) = a cos(ωt)

Page 69: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 67

which reduces to

[A(k −Mω2) + Bcω − a] cos(ωt) + [B(k −Mω2)− Acω] sin(ωt) = 0.

Since this equation holds for all t we must have

AM(ω2N − ω2) + Bcω − a = 0 and

BM(ω2N − ω2)− Acω = 0.

From the second equation we have A =BM(ω2

N − ω)

cωand substituting into the first

equation we getBM2(ω2

N − ω2)2 + Bc2ω2 − acω = 0.

Hence

B =acω

M2(ω2N − ω2)2 + c2ω2

and A =aM(ω2

N − ω2)

M2(ω2N − ω2)2 + c2ω2

,

which gives

xp(t) =a

M2(w2N − ω2)2 + c2ω2

{M(w2

N − ω2) cos(ωt) + cω sin(ωt)}

which has the same period as the external forcing (i.e. 2πω

). However, the amplitude isalways finite, and is maximum (= a

cω) when ω = wN .

Electric circuits:

In an L-R-C circuit, if the current at time t is I(t), and the charge is Q, then

LdI

dt+ RI +

1

CQ = E(t),

where E(t) is the supplied e.m.f. Since I =dQ

dtwe have

either Ld2Q

dt2+ R

dQ

dt+

1

CQ = E(t),

or Ld2I

dt2+ R

dI

dt+

1

CI =

dE

dt.

The correspondence with case of the damped motion of a mass on a spring is L ↔ M ,

R ↔ c and1

C↔ k. The natural frequency of the L-C circuit is wN =

1√LC

. The aim

of many circuits is to “amplify” the input, here the E(t). So we wish to damp out thenatural oscillations as rapidly as possible.

With R 6= 0, all the natural motions are damped out as t increases from their moment

of excitation (i.e. e−R2L

t → 0 as t →∞). The circuit is said to be

overdamped if R2 − 4L

C> 0,

critically damped if R2 − 4L

C= 0,

underdamped if R2 − 4L

C< 0.

Page 70: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 68

MATH2310, Semester I, 2006, ODE’s strand — Exercises

1. Exercises — Solvable DE’s

1. Verify that(i) y = x3(5 + tan x) is a solution of x3 + 3y − xy′ = x3 − x4 sec2 x.

(ii) y = tan(

13x3 + x− 2

)is a solution of y′ = (1 + x2)(1 + y2).

(iii) y = − cos x ln(sec x + tan x) is a solution of y′′ + y = tan x.

2. Use separation of variables to find the general solution of each of the following. Alsofind all constant solutions. Solve the initial value problems where relevant.

(i)dy

dx= xy2

(ii) y′ =x2

y(1 + x3).

(iii)dy

dx= 4(1− y).

(iv)dy

dx= 2y(1− y).

(v) y′ =y − 1

x2 + 1.

(vi) y′ =y + 2√1− x2

.

(vii) y′ =y + 1

x− 1.

(viii)dy

dx=

ex+y

y.

(ix)dy

dt=

ty + 3t

t2 + 1, y(2) = 2.

(x)dy

dt=

ty + 3t

t2 + 1, y(0) = −3.

3. Use an integrating factor to find the general solution for each of the following. Solvethe initial value problems where relevant.

(i) y′ − 2y = x2e2x.

(ii) y′ + 2xy = e−x2.

(iii) xdy

dx− 3y = x4.

(iv) (x log x)dy

dx= 2 log x.

(v)dy

dx− y = 4ex, y(0) = 4.

(vi)dy

dx+ 3x2y = e−x2

, y(0) = 2.

(vii)dy

dx+

y

x=

cos x

x, y

2

)=

4

π, x > 0.

(viii)dy

dx+

ex

ex + 1y =

x

ex + 1, y(0) = 1.

(ix)dx

dt= x + t + 1, x(0) = 2.

4. A tank of capacity 1000 litres contains 500 litres of pure water. Salt solution con-taining 2mg/litre salt enters the tank at 20 litres/s and the (stirred) mixture flowsout at 10 litres/s. When will the tank start to overflow? What is the concentrationof salt in the tank when it starts to overflow? Write down an initial value problemfor the mass of salt in the tank after overflow has started.

5. Suppose that a drug is added to the body at a rate r(t), and let y(t) represent theconcentration of the drug in the bloodstream at time t hours. In addition, supposethat the drug is used by the body at the rate ky, where k is a positive constant.Then, the net rate in y(t) is y′ = r(t)− ky. If at t = 0, there is no drug in the body,we determine y(t) by solving the initial value problem y′ = r(t)− ky, y(0) = 0.(a) Suppose that r(t) = r, where r > 0 is a constant. Here the drug is added at a

constant rate. Solve the initial value problem and hence determine limt→∞ y(t).

(b) Suppose that r(t) = 1 + sin t and k = 1. Here the drug is added at a periodicrate. Solve the initial value problem, determine limt→∞ y(t) if it exists andhence describe what happens to the drug concentration over time.

Page 71: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 69

(c) Suppose that r(t) = e−t and k = 1. Here the rate at which the drug is addeddecreases over time. Solve the initial value problem, determine limt→∞ y(t) if itexists and hence describe what happens to the drug concentration over time.

6. In a room at 21◦ centigrade, moth repellant sublimes from the solid to the gaseousstate at the rate of k cubic centimetres of solid per second per square centimetre ofexposed surface. If a spherical mothball of radius 1

2cm in this room disappears in

6 months, find k. Is it more effective to use one mothball of radius 1 cm, or twomothballs of radius 1

2cm (using the second one when the first one has disappeared)?

Which would be better vale form money?

7. Carbon dating(a) The remains of a timber artifact are found to contain 50% as much Carbon 14

(relative to Carbon 12) as a living tree (and presumably had when the objectwas made). Assume that the half life of Carbon 14 is 5730 years. How old isthe artifact?

(b) Suppose the artifact contains 70% of the “normal” proportion of Carbon 14.How old is it then?

[ Hint:dQ

dt= kQ (k < 0) where Q is the mass of Carbon 14 at time t years

after the tree stopped growing. So Q = Aekt = A(0.5)1/5730 where A is the massof Carbon 14 at time t = 0]

(c) If the half life of Carbon 14 is not 5730 but 5568 years, how does this changethe answer to (b)?

(d) If the “Shroud of Turin” really was the burial cloth of Jesus Christ (died 33AD)and the half life of Carbon 14 is between 5568 and 5730 years what proportionof the original amount of Carbon 14 would you expect it to contain in 1989?State your answer as an interval.

8. Newton’s law of cooling states that the surface temperature of an object changes ata rate proportional to the difference between the surface temperature of the objectand that of the surroundings.Suppose the surface temperature of a cup of coffee is 95◦ when freshly poured, andthat one minute later the temperature is 90◦ in a room at 25◦. Assuming Newton’slaw of cooling to apply, how long a period must elapse before the coffee reaches asurface temperature of 65◦?

9. A certain small country has $ 10 billion in paper currency in circulation and each day,$ 50 million comes into the country’s banks. The government decides to introducenew currency by having the banks replace old bills with new ones whenever oldcurrency comes into the banks. Let x = x(t) denote the amount of new currency incirculation at time t, with x(0) = 0.(a) Determine a mathematical model in the form of an initial value problem that

represents the “flow” of the new currency into circulation

(b) Solve the initial value problem found in part (a).

(c) Find how long it will take for the new bills to account for 90% of the currencyin circulation.

Page 72: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 70

10. In each of the following, find the general solution and, where requested, use it tosolve the initial value problem stated:(a) y′′ + y′ − 2y = 0, y(0) = 1, y′(0) = 1.

(b) y′′ − 6y′ + 9y = 0, y(0) = 4, y′(0) = 10.

(c) y′′ + 2y′ + 5y = 0, y(0) = 2, y′(0) = 0.

(d) y” + 3y’=0,y(1)=-1, y′(1) = 0.

(e) y′′ − 4y = 0, y(1) = sinh(1), y′(1) = 0.

(f) y′′ + 25y = 0, y(π) = 0, y′(π) = 4.

(g) y(iv) − 5y′′ + 4y = 0.

(h) y′′′ − y′′ − y′ + y = 0, y(0) = 2, y′(0) = 1, y′′(0) = 4.

(i) y′′′ − 3y′′ + 3y′ − y = 0.

(j) y′′′ + y′ = 0, y(0) = 0, y′(0) = 1, y′′(0) = 2.

(k) y′′′ + y = 0.

(l) y(iv)+2y′′−8y′+5y = 0, given that r4+2r2−8r+5 = (r−1)2(r+1+2i)(r+1−2i).

(m) y(iv) + 8y′′′ + 26y′′ + 48y′ + 45y = 0, given that r4 + 8r3 + 26r2 + 48r + 45 =(r + 3)2(r + 1 + 2i)(r + 1− 2i).

11. Use the method of undetermined coefficients to solve the following differential equa-tions or initial value problems

(a) y′′ + 4y′ + 13y = 26x− 44,

(b) y′′ + 10y′ + 25y = 50x,

(c) y′′ + 3y′ + 2y = x2,

(d) y′′ − 2y′ = sin(4x),

(e) y′′ − 4y′ + 5y = e−x,

(f) y′′ + y = ex + x3, where y(0) = 2and y′(0) = 0,

(g) y′′−y = xe3x, where y(0) = 0 andy′(0) = 1,

(h) y′′ + 4y = x,

(i) y′′ − 2y′ + y = e2x.

Page 73: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 71

2. Exercises — Existence-Uniqueness

1. For each of the following initial value problems(i) state the largest interval in which there will be a unique solution,(ii) solve it, if you can

(a) y′ + (tan x)y = sin 2x,where y(0) = 1.

(b) (cos x)y′ + (sin x)y = 2 sin x cos2 x,where y(0) = 1.

(c) xy′ + 2y = x2 − x + 1,where y(1) = 1

2.

(d) y′ − y

x− 1= 4,

where y(0) = 3.

(e) (x− 1)y′ − y = 4(x− 1),where y(0) = 3

(f) y′ − y

x + 1= x,

where y(0) = 3.

(g) (cos x)y′ + ex2y = sin x,

where y(0) = 1.

(h) xy′ + (sin x)y = sin x,where y(0) = 1.

(i) (x log x)y′ + y = x2 log x,

where y(e) =e2

4.

2. For each of the following initial value problems determine wether or not the Fun-damental Existence and Uniqueness Theorem (for first order ordinary differentialequations) guarantees that the problem has a unique solution in a neighbourhoodof the point indicated.

(i) y′ = x1/5y, where y(1) = 0.(ii) y′ = xy1/5, where y(1) = 0.

(iii) y′ =y2

x, where y(0) = 1.

(iv) y′ =x

y2, where y(0) = 1.

3. Does the initial value problem y′ =√

y sin x, where y(π2) = 0 have a unique

solution in any neighbourhood of x = π2? If so

(a) find the unique solution, and

(b) show how the existence follows from the Fundamental Existence and Unique-ness Theorem.

If not(a) write down at least two solutions, and

(b) show why the Fundamental Existence and Uniqueness Theorem fails to ap-ply to this initial value problem.

4. Show how the Existence and Uniqueness Theorem guarantees the existence of aunique solution of y′ = x(x + y), where y(2) = 5 near x = 2.

5. (a) State the largest open interval in which you can be sure that the initialvalue problem

y′ +1

2(x− 1)y = 3, where y(0) = 1

will have a unique solution and,

(b) solve the initial value problem.

Page 74: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 72

(c) What is the largest x-interval in which you have found a continuous solution.

6. (a) Find all constant solutions and the general solution of

dy

dx=

(y + 2)2

x− 1;

(b) Solvedy

dx=

(y + 2)2

x− 1, where y(0) = 0.

7. Verify that the solution of the initial value problem y′ = (x+1)(x− ln(x+1)+3)is continuous on (−1,∞).

Page 75: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 73

3. Exercises — Direction Fields

1. Which of the following pictures best represents the direction field of y′ =y − 2

(x− 1)2

for the range −4 < x < 4, −4 < y < 4.(A)

–4

–2

0

2

4

y(x)

–4 –2 2 4x

(B)

–4

–2

0

2

4

y(x)

–4 –2 2 4x

(C)

–4

–2

0

2

4

y(x)

–4 –2 2 4x

(D)

–4

–2

0

2

4

y(x)

–4 –2 2 4x

2. For the following differential equations(i) Plot its direction field for the range −1 ≤ x ≤ 6(ii) It is known that the behaviour as x → ∞ of the solution y(x) of the dif-

ferential equation, satisfying y(0) = y0 depends only on the value of y0.Summarise this behaviour.

(a) y′ = y2(2− y)

(b) y′ = y(2 + y)

(c) y′ = y(2− y)

(d) y′ = y2(2 + y)

(e) y′ = y(y2 − 1)

(f) y′ = y(1− y2)

Page 76: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 74

4. Exercises — Numerical solutions of differential equations

1. Use a hand calculator and each of the Euler and Runge-Kutta methods with asingle step to find each of the following. Where appropriate, compare with theanalytic solution obtained by separating the variables.(a) Find y(1.1) if y′ = xy2 and y(1) = −2.

(b) Find y(0.1) if y′ =x2

y(1 + x3)and y(0) = 1.

(c) Find y(0.1) and y(−0.1) if y′ = 4(1− y) and y(0) = 0.(d) Find y(0.1) and y(−0.1) if y′ = 2y(1− y) and y(0) = 2.

(e) Find y(0.1) and y(−0.1) if y′ =√

sin(xy) + 2 and y(0) = 1.2. With a hand calculator or Maple (or spreadsheet, computer program etc.), use

the Euler and Runge-Kutta methods with a stepsize of h = 0.1 to find thefollowing(a) y(2) if y′ = xy2 and y(1) = −2. Compare with the exact answer.

(b) y(1) and y(2) if y′ =x2

y(1 + x3)and y(0) = 1. Compare with the exact

answer.(c) y(1) and y(3) if y′ = 4(1−y) and y(0) = 0. Compare with the exact answer.(d) y(1) and y(−0.3) if y′ = 2y(1 − y) and y(0) = 2. Compare with the exact

answer.(e) Find y(3) and y(−1) if y′ =

√sin(xy) + 2 and y(0) = 1.

3. For the initial value problem y′ = x(x + y2), where y(0) = 2 use a stepsize of0.1 to find an approximation to y(1) by Euler’s method and the Runge-Kuttamethod. Now repeat these calculations for a stepsize of 0.01.

4. For each of the following initial value problems(a) Use Euler’s formula with h = 0.1 to find a 4 decimal place approximation

to the required value, then(b) find a 4 decimal-place approximation using the Runge-Kutta method

(i) y′ = 2x− 3y + 1, y(1) = 5, find y(1.5).(ii) y′ = 1 + y2, y(0) = 0, find y(0.5).(iii) y′ = e−y, y(0) = 0, find y(0.5).

(iv) y′ = xy2 − y

x, y(1) = 1, find y(1.5).

(c) Use a computer program or spreadsheet to determine the effects of decreas-ing h to 0.01 in each of the problems (a) and (b).

Page 77: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 75

5. Exercises — The Laplace Transform

1. Use the definition of the Laplace transform to calculate the Laplace transformof

(a) e4t,(b) 21t,(c) 7e−t,(d) −8 cos(3t),(e) 2 sin(2t),(f) 2et,

(g) f(t) =

{1 if 0 ≤ t ≤ 20 if t > 2

(h) f(t) =

{0 if 0 ≤ t ≤ 11 if t > 1

(i) f(t) =

{3t + 2 if 0 < t < 50 if t ≥ 5

(j) f(t) =

{1− t if 0 < t < 30 if t ≥ 3

(k) f(t) =

{cos(t) if 0 ≤ t ≤ π

20 if t > π

2

(l) f(t) =

{sin(t) if 0 ≤ t ≤ 2π0 if t > 2π

(m) f(t) =

{1 if 0 ≤ t ≤ 10−1 if t > 10

(n) f(t) =

{t if 0 ≤ t < 23 if t ≥ 2

2. Use the definitions of cosh(bt) and sinh(bt) and the Laplace transform table tofind the Laplace transform of

(a) cosh(bt),(b) sinh(bt),

(c) eat cosh(bt),(d) eat sinh(bt).

3. Use the Laplace transform table to find the Laplace transform of the followingfunctions

(a) 3 + 4t4 + e−2t,

(b) e5t cos(2t),

(c) −6e−2t sin(3t) + cos(−t),

(d) t2e3t + sin(4t),

(e) 12sin(2t)− t cos(2t),

(f) 4t7e−2t − 8t sin(3t),

(g) et sin(2t),

(h) et cos(3t),

(i) e−2t cos(4t),

(j) e−t sin(5t),

(k) te3t,

(l) t2et2 ,

(l) 8 cosh(4t),

(m) t cos(3t),

(n) t sin(7t),

(o) 3t sin(t),

(p) 16t sin(3t),

(q) t5e−4t,

(r) et sinh(t),

(s) e7t cosh(t),

(t) e−2t sin(7t),

(u) e5t cos(7t),

(v) sin(4t) + 4t cos(4t),

(w) 1 + sin(5t).

Page 78: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 76

4. Use the Laplace transform table to find the inverse Laplace transforms of

(i)2

s + 5,

(ii)1

s2,

(iii)1

s8,

(iv)1

(s− 2)2,

(v)1

(s + 6)3,

(vi)1

(s− 5)6,

(vii)4

(s− 3)2,

(viii)s + 13

s2 + s− 6,

(ix)2s + 7

s2 + 9,

(x)3s− 5

s2 + 4,

(xi)1

s2 + 15s + 56,

(xii)s

s2 + 16,

(xiii)5

(s− 3)4,

(xiv)2s + 5

s2 − 6s + 13,

(xv)s

s2 − 5s− 14,

(xvi)s + 3

s2 + 6s + 5,

(xvii)1

s2 − 12s + 35,

(xviii)1

s2 + 12s + 61,

(xix)1

s2 + 9,

(xx)s− 2

s2 − 4s,

(xxi)s2

(s + 1)3,

(xxii)4s + 2

4s2 + 4s + 65,

(xxiii)s− 7

s2 − 14s + 48,

(xxiv)1

s2 − 4s− 12,

(xxv)1

s2 − 2s + 2,

(xxvi)s− 1

s2 − 2s + 50,

(xxvii)1

s2 + 2s− 24,

(xxviii)1

s2 + 12s + 37,

(xxix)s− 7

s2 − 14s + 50,

(xxx)s + 1

s2 + 2s + 37,

(xxxi)s + 2

s2 + 4s + 8,

(xxxii)s3 + 3s

(s2 + 9)2,

(xxxiii)s

(s2 + 16)2,

(xxxiv)4

(s2 + 16)2=

1

8

(1

s2 + 16− s2 − 16

(s2 + 16)2

),

(xxxv)9s + 15

(s + 1)(s + 2)(s + 3),

(xxxvi)7s2 + s− 3

(s + 1)2(s + 2).

Page 79: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 77

5. Let y be a function of t and Y (s) = L{y(t)}(s) its Laplace Transform.(a) Let y satisfy the Differential Equation y′′ − 3y′ + 2y = 6t2, where y(0) = 2,

y′(0) = −1. Use the Laplace Transform table to find Y in terms of s.

(b) Repeat (a) for y′′ − y′ + y = t2, where y(0) = 1, y′(0) = −2.

(c) Repeat (a) for y′′ + y′ + 2y = te3t, where y(0) = −1, y(0) = 2.

6. Solve the following initial value problems by the Laplace Transform method:(a) y′′ − 2y′ + y = 4e3t, where y(0) = −1, y′(0) = 2.

(b) y′′ − 3y′ + 2y = 3e−t, where y(0) = 3, y′(0) = 4.

(c) y′′ − 2y′ + 5y = 20e−3t, where y(0) = −2, y′(0) = 4.

(d) y′′ + 3y′ − 4y = 0, where y(0) = 1, y′(0) = −9.

(e) y′′ − 3y′ + 2y = cos(t), where y(0) = 0.1, y′(0) = 0.7.

(f) y′′ + 11y′ + 24y = 0, where y(0) = −1, y′(0) = 0.

(g) y′′ + 3y′ − 10y = 0, where y(0) = −1, y′(0) = 1.

(h) y′′ + 4y = 0, where y(0) = 2, y′(0) = 0,

(i) y′′ − 12y′ + 40y = sin(2t), where y(0) = 1, y′(0) = 0.

(j) y′′ − y′ − 12y = e2t − sin(t), where y(0) = −1, y′(0) = 1.

7. Write the following piecewise continuous functions as a combination of unit stepfunctions

(a) f(t) =

{0 if 0 ≤ t < π,

cos(t) if π ≤ t.

(b) f(t) =

0 if 0 ≤ t < 2,1 if 2 ≤ t < 3,0 if 3 ≤ t.

(c) f(t) =

0 if 0 ≤ t < 1,1 if 1 ≤ t < 3,

−3 if 3 ≤ t < 44 if 4 ≤ t.

(d) f(t) =

{t2 if 0 ≤ t < 3,

6t− 9 if 3 ≤ t.

(e) f(t) =

{3 if 0 ≤ t < 2,t if 2 ≤ t.

(f) f(t) =

{4 if 0 ≤ t < 7,

t + 1 if 7 ≤ t.

(g) f(t) =

3 if 0 ≤ t < 2,t2 if 2 ≤ t < 5,

e−t if 5 ≤ t.

Page 80: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 78

8. Use the Laplace transform method to solve the following initial value problems

(a) y′ + y =

{0 for 0 ≤ t < 1,5 for 1 ≤ t,

where y(0) = 0.

(b) y′′−3y′+2y =

{0 for 0 ≤ t < π

2,

10 sin(t− π2) for π

2≤ t,

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

(c) y′′ + 3y′ + 2y = u2(t).1 where y(0) = 0, y′(0) = 1.

(d) y′′ + y =

{3 for 0 ≤ t < π,

t + 1 for π ≤ t,where y(0) = 0 = y′(0).

(e) y′′ + 4y = sin(t)− u2π(t). sin(t− 2π) where y(0) = 0 = y′(0).

(f) y′′ + 4y = u2π(t). sin(t) where y(0) = 1, y′(0) = 0.

(g) y′′ + y =

0 for 0 ≤ t < π,1 for π ≤ t < 2π0 for 2π ≤ t,

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

(h) y′ + y =

{0 for 0 ≤ t < 1,5 for 1 ≤ t,

where y(0) = 0.

(i) y′ + 2y =

{t for 0 ≤ t < 1,0 for 1 ≤ t,

where y(0) = 0.

(j) y′′ + 4y = u2π(t). sin t where y(0) = 1, y′(0) = 0.

(k) y′′ + y′ =

{0 for 0 ≤ t < 1,1 for 1 ≤ t,

where y(0) = 0, y′(0) = 1. Write your

answer as a function defined by cases.

(l) y′′ =

0 for 0 ≤ t < 1,t− 1 for 1 ≤ t < 23− t for 2 ≤ t < 3

0 for 3 ≤ t,

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

(m) y′′ + π2y =

{t for 0 ≤ t < 1,1 for 1 ≤ t,

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

Page 81: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 79

6. Exercises — the Fourier Transform

1. Sketch the periodic functions(i) f(x) := [x][−π,π)

(ii) f(x) := ([x][−π,π))2

(iii) f(x) := e[x][−π,π)

(iv) f(x) :=

{0 if −π ≤ [x][−π,π) < 0

1 if 0 ≤ [x][−π,π) < π

(v) f(x) :=

{π + [x][−π,π) if −π ≤ [x][−π,π) < 0

π − [x][−π,π) if 0 ≤ [x][−π,π) < π

from the notes.

2. Use the Euler formulae to find the Fourier coefficients a0, a1 and b1 for thefunctions in the previous exercise. For the first and the second last of them,write down general formulae for an and bn.

3. For the functions in exercise 1, use the formula in Theorem 6.7 to find thecoefficients c−1, c0 and c1 in the complex Fourier series. Check these answers bycomparing them to the values obtained from the formulae ci = ai − ibi if i ≥ 0and ci = a−i + ib−i for i < 0 obtained in the derivation of the Theorem.

Page 82: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 80

7. Exercises — Wronskians

1. Use the Wronskian to determine wether or not the following sets of functions arelinearly independent or linearly dependent

(a) {tet, et},

(b) {3t2, t, 2t− 2t2},

(c) {cos(2t), sin2(t), 1},

(d) {t2et, tet, et},

(e)

{1

t + 1,

1

t− 1

},

(f) {cos(2t), sin(t), 1},

(g) {sin(t), cos(t), sin(2t)},

(h) {t, ln(t), et},

(i) {tet sin(t), et sin(t)}.

(j)

{1

t + 1,

1

t− 1,

1

t2 − 1

},

(k) {sin(t), sin(3t), sin3(t)} .

2. Decide wether or not the following sets S are fundamental sets of solutions tothe given differential equation.(a) S = {e−t, e3t, te3t}, y′′′ − 5y′′ + 3y′ + 9y = 0,

(b) S = {et, e−5t sin(t), e−5t cos(t)}, y′′′ + 9y′′ + 16y′ − 26y = 0,

(c) S = {e−t, e−2t}, y′′′ + 7y′′ + 14y′ + 8y = 0,

(d) S = {e3t, e−2t, e5t, te5t}, y(iv) − 11y′′′ + 29y′′ + 35y′ − 150y = 0,

(e) S = {e2t, e3t}, y′′ − y′ − 6y = 0,

(f) S = {cosh(2t), e2t, e−2t}, y′′ − 4y = 0.

3. Can {1, t, t2, 2t− 8} be the fundamental set of solutions to a constant coefficientfourth order linear ODE?

4. Can {e−t, et, cos(t), sin(t), sin(2t)} be the fundamental set of solutions to a con-stant coefficient fifth order linear ODE?

5. Can {e2t, et/4, e−t cos(t), e−t sin(t)} be the fundamental set of solutions to a con-stant coefficient fifth order linear ODE?

6. Can {e2t, et/4, e−t, te−t, t2e−t} be the fundamental set of solutions to a constantcoefficient fourth order linear ODE?

7. Can {e2t, et/4, e−t cos(t), e−t sin(t)} be the fundamental set of solutions to a con-stant coefficient fourth order linear ODE?

8. Can {e2t, et/4, e−t cos(t), et sin(t)} be the fundamental set of solutions to a con-stant coefficient fourth order linear ODE?

Page 83: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 81

9. In the following problems verify that the functions y1(x) and y2(x) are solutionsof the given differential equation. Determine the values of x for which y1 and y2

(and y3) are linearly independent.(a) y′′ − 3y′ + 2y = 0, y1(x) = ex, y2(x) = ex − e2x.

(b) y′′ − 4y′ + 4y = 0, y1(x) = e2x, y2(x) = (2x− 3)e2x.

(c) y′′ − 9y = 0, y1(x) = sinh(3x), y2(x) = e3x, y3(x) = cosh(3x).

(d) y′′ + 9y = 0, y1(x) = sin(3x), y2(x) = cos(3x).

(e) x2y′′ − 3xy′ + 4y = 0, y1(x) = x2, y2(x) = x2 log(x).

(f) y′′ − 4y′ + 13y = 0, y1(x) = e2x sin(3x), y2(x) = e2x cos(3x).

(g) y′′′ − 6y′′ + 12y′ − 8y = 0, y1(x) = e2x, y2(x) = xe2x, y3(x) = x2e2x.

Page 84: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 82

8. Exercises — Series solutions

1. Find k in each of the following equations

(a)∞∑

n=2

an+3xn+3 =

∞∑

n=k

anxn (b)

∞∑n=2

an+1xn+1 =

∞∑

n=k

anxn

2. For each of the following series, find the largest interval (a, b) on which it con-

verges:

(a)∞∑

n=0

xn

4nn2,

(b)∞∑

n=0

(−2)nxn

nn,

(c)∞∑

n=0

xn

2nn!,

(d)∞∑

n=0

n!xn

nn,

(e)∞∑

n=0

n!xn,

(f)∞∑

n=0

(x + 3)n

n2n.

3. For each of the following differential equations, let∑∞

n=0 anxn be the generalsolution. Find a recurrence relation for an. Hence express a2, a3, a4, a5, a2k

and a2k+1 in terms of a0 and a1. Hence express the general solution as a linearcombination of two power series. Determine for which values of x these powerseries converge.

(a) (1 + x2)y′′ − 2y = 0,

(b) y′′ + xy′ + y = 0,

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

(d) y′′ − xy′ + y = 0,

(e) (2 + x2)y′′ + 5xy′ + 4y = 0.

4. Find two linearly independent solutions about x = 0 for the differential equation(1 − x2)y′′ + 2y = 0. Hence solve the initial value problem (1 − x2)y′′ + 2y = 0where y(0) = 0 and y′(0) = 3. Hence calculate (to 2 decimal places) y(0.5), ifthis is possible, and calculate (to 2 decimal places) y(2) of this is possible.

5. Solve the following differential equations about x = 0 by the series method.Either write the series solution, or give the first five nonzero terms of each series.

(a) y′′ − 11y′ + 30y = 0,

(b) (2+3x)y′′−3y′−2y = 0,

(c) y′ − y = 0,

(d) y′ − x2y = 0,

(e) y′′ + xy′ + y = 0,

(f) (x2 +1)y′′+xy′−y = 0,

(g) y′′ + x2y′ + xy = 0, where y(0) = 0,y′(0) = 1,

(h) y′′−4x2y = 0, where y(0) = 1, y′(0) =0,

(i) y′′ − xy′ − y = 0, where y(0) = 1,y′(0) = 0,

(j) y′′ + xy′ + y = 0, where y(0) = 0,y′(0) = 1.

Page 85: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 83

9. Exercises — Reduction of Order and Variation of Parameters

1. In each of the following verify that the given function y1(x) is a solution of thedifferential equation and use the method of Reduction of Order to find a second,linearly independent solution and also the general solution.(a) y′′ − 4y′ − 12y = 0, where y1(x) = e6x.

(b) y′′ − 5y′ + 6y = 0, where y1(x) = e3x.

(c) x2y′′ − 7xy′ + 15y = 0, for x > 0, where y1(x) = x3.

(d) xy′′ + (2x− 1)y′ − 2y = 0, for x > 0 where y1(x) = e−2x.

(e) y′′ + 4y = 0, where y1(x) = cos(2x).

(f) x2y′′ − xy′ + y = 0, for x > 0, where y1(x) = x.

(g) (1− x2)y′′ − 2xy′ + 2y = 0, for −1 < x < 1, where y1(x) = x.

(h) xy′′ − 2(x + 1)y′ + (x + 2)y = 0, for x > 0, where y1(x) = ex.

2. Using the method of variation of parameters, determine a particular solution ofeach of the following. Solve the initial value problem where appropriate.

(a) y′′ + 5y′ + 6y = 6,

(b) y′′− y = 4e2x, where y(0) = 0 =y′(0),

(c) y′′ − y = 2ex,

(d) y′′ − 3y′ + 2y = cos(x), wherey(0) = 0.1 and y′(0) = 0.7,

(e) y′′ + y′ = x3 − x2,

(f) y′′+y′−6y = 5e2x, where y(0) =y′(0) = 0,

(g) y′′ − 4y′ + 4y =−2e2x

x3

(h) x2y′′−3xy′−5y = 10, given thatx5 and x−1 are solutions of thehomogeneous equation,

(i) (x2 − 2x)y′′ + 2(1− x)y′ + 2y =6(x2 − 2x)2, given that x2 andx− 1 are solutions of the homo-geneous equation,

(j) x2 + xy′ +

(x2 − 1

4

)y =

x32 , given that x−

12 cos(x) and

x−12 sin(x) are solutions of the

homogeneous equation.

(k) y′′ + 2y′ + y = e−x ln(x), where

y(1) = 0 and y′(1) = − 1

4e,

(l) y′′ + y = sec(x), for 0 < x <π

2,

(m) y′′ − 3y′ + 2y =1

1 + e−x,

(n) y′′−y =1

x, leave your answer in

terms of integrals if need be.

Page 86: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 84

3. Use the method of reduction of order to solve the following second order nonho-mogeneous linear differential equations for which a solution to the homogeneousequation is given.(a) x2y′′−3xy′+4y = 4 ln(x)−4, for x > 0, given solution to the homogeneous

equation is of the form y(x) = xr for some r (to be determined),

(b) x2y′′ − 2xy′ + 2y = 0, for x > 0 given the solution y(x) = x to the homoge-neous equation,

(c) (1 − x)y′′ + xy′ − y = 2(x − 1)2e−x, for 0 < x < 1, given the solutiony(x) = ex,

(d) xy′′ − (5x + 1)y′ + 5y = x2, for x > 0, given solution to the homogeneousequation is of the form y(x) = emx for some m (to be determined),

(e) All of the questions in the previous question, with given solutions e−2x,

ex, ex, ex, 1, e2x, omit (g), x5, x2, x−12 cos(x), e−x, sin(x), ex, ex. Which

problems are more efficiently done by this method compared to the variationof parameters?

Page 87: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 85

MATH2310, Semester I, 2006, ODE’s strand — Answers

1. Answers — Solvable DE’s

2. The solutions to the separable equations are

(i) −1

y=

y2

2+ C, y = 0.

(ii) y2 =2

3log |1 + x3|+ C.

(iii) − log |1− y| = 4x + C, y = 1.

(iv) log

∣∣∣∣y

1− y

∣∣∣∣ = 2x + C, y = 0,

y = 1.

(v) log |y−1| = tan−1 x+C, y = 1.

(vi) log |y + 2| = sin−1 x + C, y = −2.

(vii) log |y + 1| = log |x− 1|+ C, y = −1.

(viii) ex + e−y + ye−y = C.

(ix) y = −3 +√

5t2 + 5.

(x) y = −3.

If no constant solution is given, then none exists.

3. The solutions to the first order linear equations are

(i) y =x3

3e2x + Ce2x.

(ii) yex2= x + C.

(iii) y = x4 + Cx3.

(iv) y = log x +C

log x.

(v) y = 4ex(x + 1).

(vi) y = 2e−x3+ xe−x3

.

(vii) y = x−1(1 + sin x).

(viii) y =x2

2(ex + 1)+

2

ex + 1.

(ix) x = −2 + 4et − t.

4. The initial value problem for the volume V (t) is

dV

dt= 10, where V (0) = 500

which has solution V = 10t + 500. Hence the tank starts to overflow at t = 50seconds. The mass M(t) then satisfies the initial value problem

dM

dt+

M

t + 50= 40, where M(0) = 0, and T ≤ 50

This has solution M = 20(t + 50) − 50000

t + 50until t = 50. At t = 50, M = 1500 and

the concentration of salt is 1.5 mg/litre. After overflow the initial value problem is

dM

dt+

M

50= 40, where M(50) = 1500, and t ≥ 50

5. For the drug concentration problem the solutions are

(a) y(t) =r

k(1− e−kt), so limt→∞ y(t) = r

k.

(b) y(t) = 1− 1

2(e−t +cos t− sin t), so limt→∞ y(t) does not exist, the concentration

reaches a periodic state.

(c) y(t) = te−t, so limt→∞ y(t) = 0.

Page 88: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 86

6. The differential equation isdV

dt= −kS, where S(t) is the surface area (in square

centimetres) of solid at time t (in seconds) when the solid’s volume is V (in cubiccentimetres). If mothball, initially spherical, retains its spherical symmetry during

sublimation V (t) =4

3πr3(t), with S(t) = 4πr2(t). Therefore

4πr2dr

dt= −k.4πr2 and so

dr

dt= −k.

Thus r(t) = −kt + c. If r(0) =1

2= c and r(T ) = 0 = −kT +

1

2where T is the

number of seconds in 6 months, then k = 12T

. Now if r(0) = 1, then r(t) = 1 − kt

which is zero when t =1

k= 2T seconds.

That is a 1 centimetre radius mothball takes 12 months to disappear. Thus the

room has 12 months coverage using either method, but two mothballs of1

2radius

would cost only1

4as much as one ball of 1 centimetre radius!

7. The answers are(a) 5730 years.

(b) About 2949 years.

(c) It would change it to 2865 years.

(d) Between 78.39 and 78.93 percent.

8. If T (t) is the surface temperature (in degrees Celcius) at time t (in minutes) then

dT

dt= −k(T − 25) and so T (t) = 25 + De−kt

where D is a constant. Since T (0) = 95 = 25+D we have D = 70. Since T (1) = 90 =25+70e−k we have k = log

(7065

) ≈ 0.074. Hence T (t) = 65 when t = 1k

log(

7040

) ≈ 7.6minutes.

9. Using 1 billion dollars as the unit for x and 1 day for the unit of t, we obtain theinitial value problem

dx

dt= 0.005(10− x) where x(0) = 0.

The reasoning that leads to the differential equation is as follows. Initially, thereis $ 10 billion of old currency in circulation, so all of the $ 50 million returned tothe banks is old. At time t, the amount of new currency is x(t) billion dollars, so10− x(t) billion dollars of currency is old. The fraction of circulating money that is

old is 10−x(t)10

, and the amount of old currency being returned to the banks each day

is 10−x(t)10

× 0.05 billion dollars. Note: $ 50 million = $ 0.05 billion. This amount ofnew currency per day is introduced into circulation, so

dx

dt=

10− x

10× 0.05 = 0.005(10− x) billion dollars per day.

10. The general solutions and the solutions to the IVP’s are

Page 89: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 87

(a) y = Ae−2x + Bex, y = ex.

(b) y = Ae3x + Bxe3x, y = 4e3x − 2xe3x.

(c) y = Ae−x cos(2x) + Be−x sin(2x), y = 2e−x cos(2x) + e−x sin(2x).

(d) y = A + Be−3x, y = −1.

(e) y = Ae2x + Be−2x, y = sinh(1) cosh 2(x − 1) [recall cosh 2(x − 1) = 12(e2x−2 +

e−(2x−2))].

(f) y = A sin(5x) + B cos(5x), y = −45sin(5x).

(g) y = Aex + Be−x + Ce2x + De−2x.

(h) y = Ae−x + Bex + Cxex, y = e−x + ex + xex.

(i) Aex + Bxex + Cx2ex.

(j) A + B sin(x) + C cos(x), y = 2 + sin(x)− 2 cos(x).

(k) y = Ae−x + Bex/2 cos(√

32

x)

+ Cex/2 sin(√

32

x).

(l) y = Aex + Bxex + Ce−x cos(2x) + De−x sin(2x).

(m) y = Ae−3xs + Bxe−3x + Ce−x cos(2x) + De−x sin(2x).

11. The answers are

(a) y(x) = Ae−2x cos(3x) + Be−2x sin(3x) + 2x− 4

(b) y(x) = Ae−5x + Bxe−5x + 2x− 4

5.

(c) y(x) = Ae−2x + Be−x +1

2x2 − 3

2x +

7

4

(d) y(x) = A + Be2x +1

40cos(4x)− 1

20sin(4x)

(e) y(x) = Ae2x cos(x) + Be2x sin(2x) +1

10e−x

(f) y(x) =3

2cos(x) +

11

2sin(x) +

1

2ex + x3 − 6x

(g) y(x) =5

8ex − 17

32e−x +

1

8xe3x − 3

32e3x

(h) y(x) = A cos(2x) + B sin(2x) +1

4x

(i) y(x) = Aex + Bxex + e2x.

Page 90: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 88

2. Answers — Existence-Uniqueness

1. The intervals and the solutions are as follows

(a) (i)(−π

2,π

2

), (ii) y = −2 cos2 x + 3 cos x.

(b) (i)(−π

2,π

2

), (ii) y = −2 cos2 x + 3 cos x.

(c) (i) (0,∞), (ii) y =x2

4− x

3+

1

12x2+

1

2.

(d) (i) (−∞, 1), (ii) y = 4(x− 1) log(1− x) + 3(1− x).

(e) Same as above.

(f) (i) (−1,∞), (ii) y = (x + 1)(x− log(x + 1) + 3).

(g) (i)(−π

2,π

2

), (ii) since

∫ex2

cos xdx cannot be analytically evaluated we can’t find

expressions for the integrating factor or the general solution.

(h) The standard form is y′+sin x

xy =

sin x

x. However

sin x

xis not defined at x = 0,

the critical value, so we can’t specify a minimum interval over which a solutionexists and is continuous. However, y = 1 is clearly a solution to the giveninitial value problem and is continuous for all x.

(i) (i) (1,∞), (ii) y =x2

2− x2

4 log(x).

2. (i) Yes, (ii) No, (iii) No, (iv) Yes.

3. No. The functions y ≡ 0 for all x and y = 0 for x ≤ π

2and

1

4cos2 x for x >

π

2are

two of the infinitely many correct solutions. The Fundamental Theorem does not

apply because∂

∂y(√

y sin(x)) is not continuous at x =π

2, y = 0 (why not?).

4. Here f(x, y) = x(x + y) and so fy(x, y) = x. Both f and fy are continuous for allx and y and hence in a rectangle containing the point (2, 5). So there is an interval(2− h, 2 + h), for some h > 0, in which there is a unique solution.

5. For this initial value problem

(a) The interval is (−∞, 1) as it must contain 0 and1

x− 1must be continuous in

it.(b) An integrating factor is

I(x) = eR

dx2(x−1) = e

12

log |x−1| =√|x− 1| = √

1− x in (−∞, 1).

Thend

dx

(y√

1− x)

= 3√

1− x so y√

1− x =

∫3(1− x)

12 dx = −2(x− 1)

32 + K.

Since y(0) = 1, K = 3, so y√

1− x = −2(1− x)32 + 3, and y = −2(1− x) +

3√1− x

.

(c) This solution is continuous for x < 1, i.e. on (−∞, 1).

Page 91: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 89

6. (a) The only constant solution is y = −2. Separating the variables we get∫dy

(y + 2)2=

∫dx

x− 1hence − 1

y + 2= log |x− 1|+ C.

(b) Since y(0) = 0 we have C = −1

2, then − 1

y + 2= log(1 − x) − 1

2is the unique

solution on the interval (−∞, 1).

Page 92: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 90

3. Answers — Direction Fields

1. For the differential equation y′ =y − 2

(x− 1)2the equation makes no sense at the point

(1, 2) which means we can discard solution (B). The sign of y′ depends only on thevalue of y − 2. We can see that y′ negative for y < 2 and positive for y > 2. Onlysolution (A) has this quality and so is the correct answer. The other direction fieldswere

(B) y′ =y + 2

(x− 1)2, (C) y′ =

y − 2

(x− 1), (D) y′ = − y − 2

(x− 1)2.

2. (i) The direction fields are:(a)

–1

0

1

2

3

y(x)

–1 1 2 3 4 5 6

x

(b)

–3

–2

–1

0

1

y(x)

–1 1 2 3 4 5 6x

(c)

–1

0

1

2

3

y(x)

–1 1 2 3 4 5 6

x

(d)

–3

–2

–1

0

1

y(x)

–1 1 2 3 4 5 6x

(e)

–2

–1

0

1

2

y(x)

–1 1 2 3 4 5 6

x

(f)

–2

–1

0

1

2

y(x)

–1 1 2 3 4 5 6

x

(ii) The long term behaviors are:(a) For y0 ≤ 0, y(x) → 0, and for 0 < y0 < ∞, y(x) → 2.

Page 93: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 91

(b) For y0 < 0, y(x) → 0, for y0 = 0, y(x) ≡ 0, and for y0 > 0, y(x) → +∞.(c) For y0 < 0, y(x) → −∞, for y0 = 0, y(x) ≡ 0, and for y0 > 0, y(x) → 2.(d) For y0 < −2, y(x) → −∞, for y0 = −2, y(x) ≡ −2, for −2 < y0 ≤ 0,

y(x) → 0, and for y0 > 0, y(x) → +∞.(e) For y0 < −1, y(x) → −∞, for y0 = −1, y(x) ≡ −1, for −1 < y0 < 1,

y(x) → 0, for y0 = 1, y(x) ≡ 1, and for y0 > 1, y(x) → +∞.(f) For y0 < 0, y(x) → −1, for y0 = 0, y(x) ≡ 0, and for y0 > 0, y(x) → 1.

Page 94: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 92

4. Answers — Numerical Solutions of Differential Equations

1. The Euler, Runge Kutta and exact (if appropriate) values are:(a) −1.6, −1.6529, −1.65289 (exact)

(b) 1, 1.00033, 1.00033 (exact)

(c) y(0.1): 0.4, 0.3296, 0.329679 (exact), y(−0.1): −0.4, −0.4917, −0.4918(exact).

(d) y(0.1): 1.6, 1.69316, 1.69309 (exact), y(−0.1): 2.4, 2.56826, 2.56872 (exact).

(e) y(0.1): 1.14142, 1.14333 (no exact solution), y(−0.1): 0.85858, 0.86019 (noexact solution).

2. The Euler, Runge Kutta and exact (if appropriate) values are:(a) −0.46123, −0.50001, −0.5 (exact)

(b) y(1): 1.19094, 1.20917, 1.20917 (exact), y(2): 1.56201, 1.56997, 1.56997(exact)

(c) y(1): 0.99395, 0.98166, 0.98168 (exact) y(3): 1, 1, 0.99999 (exact)

(d) y(1): 1.04715, 1.07259, 1.07258 (exact) y(−0.3): 4.34503, 10.6517, 11.2341(exact)

(e) y(3): 5.33372, 5.32988 (no exact solution) y(−1): −0.39305, −0.39866 (noexact solution)

3. Stepsize 0.1; Euler: 8.6015, Runge-Kutta: 267.29. Stepsize 0.01; Euler 70.461,Runge-Kutta: 1.5× 1096. These numbers were computed using Excel.

These numbers are impressively different! They may lead one to wonderwhether y(1) is defined or not. Your answers may differ from the ones givenhere, depending on the precision of the program/computer you have used. Thereasons for the strange behaviour are not hard to find; just look at a directionfield plot for this differential equation and notice the steepness of the arrows forx = 1.

0

20

40

60

80

100

y(x)

0.2 0.4 0.6 0.8 1

x

4. (a) (a) 1.8207, (b) 2.0533.

(b) (a) 0.5315, (b) 0.5463.

(c) (a) 0.4198, (b) 0.4055.

(d) (a) 1.2194, (b) 1.333.

Page 95: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 93

5. Answers — Laplace Transform

1. The answers are

(a)1

s− 4,

(b)21

s2,

(c)7

s + 1,

(d)−8s

s2 + 9,

(e)4

s2 + 4,

(f)2

s− 1,

(g)1

s

(1− e−s

)

(h)e−s

s

(i)3

s2+

2

s− e−5s

(3

s2+

17

s

)

(j)1

s2

(e−3s(2s + 1) + s− 1

)

(k)1

s2 + 1

(e−s π

2 + s)

(l)1− e2πs

s2 + 1

(m)1

s

(1− 2e−10s

)

(n)1

s2+ e−2s

(1

s− 1

s2)

)

2. The answers are

(a)s

s2 − b2,

(b)b

s2 − b2,

(c)s− a

(s− a)2 − b2,

(d)b

(s− a)2 − b2.

3. The answers are

(a)3

s+

4× 4!

s5+

1

s + 2,

(b)s− 5

s2 − 10s + 29,

(c)−18

s2 + 4s + 13+

s

s2 + 1,

(d)2

(s− 3)3+

4

s2 + 16,

(e)8

(s2 + 4)2,

(f)4× 7!

(s + 2)8− 48s

(s2 + 9)2,

(g)2

s2 − 2s + 5,

(h)s− 1

s2 − 2s + 10,

(i)s + 2

s2 + 4s + 20,

(j)5

s2 + 2s + 26,

Page 96: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 94

(k)1

(s− 3)2,

(l)2

(s + 12)3

,

(m)8s

s2 − 16,

(n)s2 − 9

(s2 + 9)2,

(o)14s

(s2 + 49)2,

(p)6s

(s2 + 1)2,

(q)s

(s2 + 9)2,

(r)120

(s + 4)6,

(s)1

s2 − 2s,

(t)s− 7

s2 − 14s + 48,

(u)7

s2 + 4s + 53s,

(v)s− 5

s2 − 10s + 74,

(w)4

s2 + 16+

4s2 − 64

(s2 + 16)2

=8s2

(s2 + 16)2,

(x)1

s+

5

s2 + 25.

4. The answers are

(i) 2e−5t,

(ii) t,

(iii)1

7!t7,

(iv) te2t,

(v)1

2t2e−6t,

(vi)1

5!t5e5t,

(vii) 4te3t,

(viii) −2e−3t + 3e2t,

(ix) 2 cos(3t) +7

3sin(3t),

(x) 3 cos(2t)− 5

2sin(2t),

(xi) e−7t − e−8t,

(xii) cos(4t),

(xiii)5

6t3e3t,

(xiv) 2e3t cos(2t) +11

2e3t sin(2t),

(xv)2

9e−2t +

7

9e7t,

(xvi)1

2e−t − 1

2e−5t,

(xvii)1

2e7t − 1

2e5t,

(xviii)1

5e−6t sin(5t),

(xix)1

3sin(3t),

(xx)1

2+

1

2e4t,

Page 97: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 95

(xxi) e−t

(1− 2t +

1

2t2

),

(xxii) e−t/2 cos(4t),

(xxiii)1

2e6t +

1

2e8t,

(xxiv) −1

8e−2t +

1

8e6t,

(xxv) et sin(t),

(xxvi) et cos(7t),

(xxvii)1

10e4t − 1

10e−6t,

(xxviii) e−6t sin(t),

(xxix) e7t cos(t),

(xxx) e−t cos(6t),

(xxxi) e−2t cos(2t),

(xxxii) cos 3t− t sin(3t),

(xxxiii)1

8t sin(4t),

(xxxiv)1

32(sin(4t)− 4t cos(4t)),

(xxxv) 3e−t + 3e−2t − 6e−3t,

(xxxvi) −16e−t + 3te−t + 23e−2t.

5. The values of Y (s) are

(a)2s− 7

s2 − 3s + 2+

12

s3(s2 − 3s + 2).

(b)s4 − 3s3 + 2

s3(s2 − s + 1).

(c)1

(s− 3)2(s2 + s + 2)− s− 1

s2 + s + 2.

6. The solutions to the initial value problems are(a) −2et + e3t + tet.

(b)1

2e−t + 2e2t +

1

2et.

(c) −3et cos(2t) + 5et sin(2t) + e−3t.

(d) 2e−4t − et.

(e) e2t − et + 0.1 cos(t)− 0.3 sin(t).

(f)3

5e−8t − 8

5e−3t.

(g) −3

7e−5t − 4

7e2t.

(h) 2 cos(2t).

(i)1

156

(2 cos(2t) + 154e6t cos(2t) + 3 sin(2t)− 456e6t sin(2t)

).

(j) −47

70e−3t − 1

10e2t − 53

238e4t − 1

170cos(t) +

13

170sin(t).

Page 98: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 96

7. As combinations of unit step functions the piecewise continuous functions are:(a) uπ cos(t),

(b) u2(t)− u3(t),

(c) u1(t)− 4u3(t) + 7u4(t),

(d) t2u0(t)− (t− 3)2u3(t).

(e) 3u0(t) + (t− 3)u2(t),

(f) 4u0(t) + (t− 3)u7(t),

(g) 3u0(t) + (t2 − 3)u2(t) + (e−t − t2)u5(t).

8. The answers are(a) y(t) = 5(1− e1−t).u1(t).

(b) y(t) = uπ2(t).

(−5e(t−π

2) + 2e2(t−π

2) + 3 cos

(t− π

2

)+ sin

(t− π

2

))+ e2t.

(c) y(t) = e−t − e−2t + u2(t).

[1

2+

1

2e−2(t−2) − e−(t−2)

].

(d) (t) = 3− 3 cos t + uπ(t) [(π − 2) cos(t) + sin(t) + t− 2].

(e) y(t) =1

6(2 sin(t)− sin(2t)) (1− u2π(t)).

(f) y(t) = cos(2t)− 1

6sin(2t).u2π(t) +

1

3sin(t).u2π(t).

(g) y(t) = sin(t) + (1 + cos(t))uπ(t)− (1− cos(t))u2π(t).

(h) y(t) = (5− 5e−t).u1(t)

(i) y(t) = −1

4+

1

2t +

1

4e−2t − 1

4

[1 + 2t− e−2t

]u1(t).

(j) y(t) = cos(2t) +

[1

6sin(2t) +

1

3sin(t)

]u2π(t).

(k) y(t) =

{1− e−t for 0 ≤ t < 1

t− 1 + (e− 1)e−t for 1 ≤ t.

(l) y(t) =1

6t3.u1(t)− 1

3t3.u2(t) +

1

6t3.u3(t).

(m) y(t) =1

π2t− 1

π3sin(πt)−

(1

π2t +

1

π3sin(πt)

)u1(t).

Page 99: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 97

6. Answers — the Fourier Transform

1. The answers are

i)

–3

–2

–1

1

2

3

–8 –6 –4 –2 2 4 6 8

x

ii)

0

2

4

6

8

10

–8 –6 –4 –2 2 4 6 8

x

iii)

0

5

10

15

20

–8 –6 –4 –2 2 4 6 8

x

iv)

–1

–0.5

0

0.5

1

y

–8 –6 –4 –2 2 4 6 8

x

v)0.5

11.5

22.5

3

–8 –6 –4 –2 2 4 6 8

x

2. The answers are

i) a0 = a1 = 0. b1 = 2. General formula: an = 0, bn = − 2

ncos(nπ) =

(−1)n−1 × 2

n.

ii) a0 =π2

3. a1 = −4. b1 = 0.

iii) a0 =e2π − 1

πeπ. a1 =

1− e2π

πeπ. b1 =

e2π − 1

πeπ.

iv) a0 =1

2. a1 = 0. b1 =

2

π. General formula:

an =sin(πn)

πn= 0, bn =

1− cos(πn)

πn=

{0 if n is even2

nπif n is odd.

Page 100: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 98

v) a0 =π

2. a1 =

4

π. b1 = 0.

3. The answers arei) c0 = 0. c1 = −i. c−1 = i.

ii) c0 =π2

3. c1 = −2. c−1 = −2.

iii) c0 =e2π − 1

2πeπ. c1 =

(i + 1)(1− e2π)

4πeπ. c−1 =

(1− i)(1− e2π)

4πeπ.

iv) c0 =1

2. c1 = − i

π. c−1 =

i

π.

v) c0 =π

2. c1 =

2

π. c−1 =

2

π.

Page 101: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 99

7. Answers — Wronskians

1. The sets are

(a) Linearly independent.

(b) Linearly dependent.

(c) Linearly dependent.

(d) Linearly independent.

(e) Linearly independent.

(f) Linearly independent.

(g) Linearly independent.

(h) Linearly independent.

(i) Linearly independent.

(j) Linearly dependent.

(k) Linearly dependent.

2. The sets S are

(a) a fundamental set of solutions.

(b) a fundamental set of solutions.

(c) not a fundamental set of solutions because there are not enough functions.

(d) a fundamental set of solutions.

(e) not a fundamental set of solutions as e2t is not a solution.

(f) not a fundamental set of solutions as they are not linearly independent.

3. No, they are not linearly independent.

4. No, the sin(2t) solution comes from a root of 2i of the characteristic equation.Since the coefficients of the characteristic equation are real, this means that −2iis also a root, and then the characteristic equation must have 6 roots, which isimpossible for a degree 5 equation.

5. No, there are not enough functions for a fundamental set of solutions.

6. No, there are too many functions. The set indicates that the characteristicequation has 5 roots, which is impossible for a degree 4 equation.

7. Yes. The roots of the characteristic equation would be 2, 14,−1± i.

8. No, the functions e−t cos(t) and et sin(t) point to two non-conjugate solutionsto the characteristic equation. Hence the characteristic equation would have tohave 6 solutions which is impossible for a fourth order equation.

9. Missing answer

Page 102: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 100

8. Answers — Series

1. The values of k are: (a) 5, (b) 3.2. The intervals are: (a) (−4, 4), (b) (−∞,∞), (c) (−∞,∞), (d) (−e, e), (e)

there is no such interval, (f) (−5,−1).3. The solutions are:

(a) an+2 = − (n−2n+2

)an, a2 = a0, a3 = −a1

3, a4 = 0, a5 = a1

15. In general a2k = 0

for k > 1, a2k+1 = (−1)k+1a1

(2k−1)(2k+1). y(x) = a0y1(x)+a1y2(x) where y1(x) = 1+x2

converges for all x and y2(x) converges for −1 ≤ x ≤ 1.

(b) an+2 = − (an

n+2

), a2 = −a0

2, a3 = a1

3, a4 = a0

8, a5 = a1

15. In general a2k =

(−1)ka0

2kk!, a2k+1 = (−1)ka12kk!

(2k+1)!. y(x) = a0y1(x) + a1y2(x) where y1, y2 converge

for all x.

(c) an+2 =( −2

n+1

)an, a2 = −2a0, a3 = −a1, a4 = 4

3a0, a5 = 1

3a1. In general

a2k = (−1)k22kk!(2k)!

a0, a2k+1 = (−1)k

k!a1. y(x) = a0y1(x) + a1y2(x), where y1, y2

converge for all x.

(d) an+1 =(

n−1(n+1)(n+2)

)an, a2 = −1

2a0, a3 = 0, a4 = −1

24a0, a5 = 0. In general

a2k = −1(2k−1)2kk!

a0, a2k+1 = 0 if k > 0. y(x) = a0y1(x) + a1y2(x) where

y2(x) = x and y1(x) converge for all x.

(e) an+2 =(−(n+2)2(n+1)

)an, a2 = a0, a3 = 3

4a1, a4 = 2

3a0, a5 = 15

32a1. In gen-

eral a2k = (−1)kk!1.3.5....(2k−1)

a0 and a2k+1 = (−1)k1.3.5....(2k+1)22kk!

a1. y(x) = a0y1(x) +

a1y2(x), where y1, y2 converge for |x| < √2.

4. y(x) = a0y1(x)+a1y2(x) where y1(x) = 1−x2 and y2(x) = x−∑∞n=1

x2n+1

(2n+1)(2n−1),

which converges for |x| < 1. The solution to the initial value problem is y(x) =3y2(x), then y(0.5) ≈ 1.36, we cannot determine y(2) as y2 diverges.

5. The solutions are:(a) y(x) = a0+a1x+(−15a0+

112a1)x

2+(−55a0+916a1)x

3+(−4554

a0+67124

a1)x4+. . .

(b) y(x) = a0 + a1x− 14a1x

3 + 316

a1x4 − 9

80a1x

5 + . . .

(c) y(x) = a0 + a0x + 12a0x

2 + 13!a0x

3 + 14!a0x

4 + . . .

(d) y(x) = a0 + 13a0x

3 + 118

a0x6 + 1

333!a0x

9 + 1344!

a0x12 + . . .

(e) y(x) = a0 + a1x− 12a0x

2 − 13a1x

3 + (−1)2

222!a0x

4 + (−2)22!5!

a1x5 + . . .

(f) y(x) = a0 + a1x + 12a0x

2 + −18

a0x4 + (−1)2(6−3)!

26−23!(3−2)!a0x

6 + . . .

(g) y(x) = x +∑∞

n=1(−1)n2252...(3n−1)2

(3n+1)!x3n+1

(h) y(x) = 1 + 13x4 + 1

42x8 + 1

1386x12 + 1

83160x16 + . . .

(i) y(x) =∑∞

n=0x2n

2nn!

(j) y(x) =∑∞

n=0(−2)nn!(2n+1)!

x2n+1

Page 103: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 101

9. Answers — Reduction of Order and Variation of Parameters

1. The second linearly independent solution and the general solutions are

(a) y = e−2x, y = Ce−2x + De6x.

(b) y = e2x, y = Ee3x + Fe2x.

(c) y = 12x5, y = Cx5 + Dx3.

(d) y = 2x− 1, y = Ae−2x + B(2x− 1).

(e) y = sin(2x), y = C cos(2x) + D sin(2x).

(f) y = x log x, y = Ax + Bx log(x).

(g) y = −1 +x

2log

(1 + x

1− x

), y = Dx + C

(−1 +

x

2log

(1 + x

1− x

)).

(h) y = x3ex, y = Cex + Dx3ex.

2. The answers are

(a) yp(x) = ue−2x+ve−3x where u′e−2x+v′e−3x = 0 and −2u′e−2x−3v′e−3x = 6,so yp(x) = 1.

(b) yp(x) = uex + ve−x where u′ex + v′e−x = 0 and u′ex − v′e−x = 4e2x, so

yp(x) =4

3e2x.

(c) yp(x) = uex + ve−x where u′ex + v′e−x = 0 and u′ex − v′e−x = 2ex, so

yp(x) = xex− 1

2ex. The −1

2ex term can be absorbed into the complementary

function.

(d) yp(x) = uex + ve−2x where u′ex + v′e2x = 0 and u′ex + 2v′e2x = cos(x), soyp(x) = 0.1(cos(x) − 3 sin(x)). Solution to initial value problem is y(x) =−ex + e2x + 0.1(cos(x)− 3 sin(x)).

(e) yp(x) =x4

4− 4x3

3+ 4x2− 8x.

(f) y(x) = xe2x +1

5e−3x − 1

5e2x.

(g) yp(x) = −1

te2t.

(h) yp(x) = −2.

(i) yp(x) = x4 − 4x3.

(j) yp(x) = x12 .

(k) y(x) =x2

2e−x ln(x)− 3x2

4e−x +

3

4xe−x.

(l) yp(x) = x sin(x) + ln(cos(x)) cos(x).

(m) yp(x) = ex ln(1 + e−x) + e2x ln(1−xe )− 1,

(n) yp(x) =1

2ex

∫ex

xdx− 1

2e−x

∫ex

xdx.

Page 104: FullNotes - ODE

MATH 2310 – Ordinary Differential Equations Strand 102

3. The solutions are(a) r = 2 and then y(x) = Ax2 + Bx2 ln(x) + ln(x).

(b) y(x) = Ax + Bx2 + 4x2 ln(x).

(c) y(x) = Aex + Bx− 1

2(2x− 1) e−x.

(d) m = 5 and then y(x) = −1

5x2 − 2

25x− 2

125+ A

(−x

5− 1

25

)+ Be5x.