MA3264CHAP1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 59

MA3264 LECTURE NOTES

CHAPTER 1
DIFFERENTIAL EQUATIONS
1.1 Introduction
A di erential equation is an equation that
contains one or more derivatives of a di eren-
tiable function.
The order of a d.e. is the order of the equa-
tion's highest order derivative; and a d.e. is
linear if it can be put in the form

any (n)(x)+an 1y (n 1)
(x)+  +a1y (1)(x)+a0y (x) = F;

where ai; 0  i  n, and F are all functions of


1
x.

For example, y 0 = 5y and xy 0 sin x = 0 are


rst order linear d.e.; (y 000)2 + (y 00)5 y 0 = ex is
third order, nonlinear.

We observe that in general, a d.e. has many


solutions, e.g. y = sin x + c, c an arbitrary
constant, is a solution of y 0 = cos x.

Such solutions containing arbitrary constants


are called general solution of a given d.e.. Any
solution obtained from the general solution by
giving speci c values to the arbitrary constants
is called a particular solution of that d.e. e.g.
y = sin x + 1 is a particular solution of y 0 =

2
cos x.
Basically, di erential equations are solved us-
ing integration, and it is clear that there will
be as many integrations as the order of the DE.
Therefore, THE GENERAL SOLUTION OF
AN nth-ORDER DE WILL HAVE n ARBI-
TRARY CONSTANTS.

1.2 Separable equations


A rst order d.e. is separable if it can be writ-
ten in the form M (x) N (y )y 0 = 0 or equiva-
lently, M (x)dx = N (y )dy . When we write the
d.e. in this form, we say that we have separated

3
the variables, because everything involving x is
on one side, and everything involving y is on the
other.

We can solve such a d.e. by integrating w.r.t.


x:

Z Z
M (x)dx = N (y )dy + c:

Example 1. Solve y0 = (1 + y2)ex.


Solution. We separate the variables to obtain
x 1
e dx = dy:
1 + y2
Integrating w.r.t. x gives

ex = tan 1
y + c;
4
or

tan 1
y = ex c;

or

y = tan(ex c):

Example 2. Experiments show that a ra-


dioactive substance decomposes at a rate pro-
portional to the amount present. Starting with
2 mg at certain time, say t = 0, what can be
said about the amount available at a later time?

Example 2 12 . Stephen Hawking discovered


that black holes lose their mass at a rate given
by
dM h c4
= ;
dt 15360G2M 2
5
where t is time, M is the mass of the black hole,
and h ; G; c are certain constants which physics
students will recognise. Stephen knew how to
separate variables, so he could compute the time
it takes for a black hole to disappear completely,
that is, the lifetime of a black hole:
5120G2M 3
T = :
c
h 4

For a black hole about 3 times as massive as the


Sun, this turns out to be around 1068 years (!)

Example 3. A copper ball is heated to


100C. At t = 0 it is placed in water which
is maintained at 30C. At the end of 3 mins the
temperature of the ball is reduced to 70C. Find
6
the time at which the temperature of the ball is
31C.

Physical information: Experiments show that


the rate of change dT =dt of the temperature T
of the ball w.r.t. time is proportional to the dif-
ference between T and the temp T0 of the sur-
rounding medium. Also, heat ows so rapidly
in copper that at any time the temperature is
practically the same at all points of the ball.

7
Example 4. Suppose that a sky diver falls
from rest toward the earth and the parachute
opens at an instant t = 0, when sky diver's
speed is v (0) = v0 = 10 m/s. Find the speed of
the sky diver at any later time t.

Physical assumptions and laws:


weight of the man + equipment = 712N,
air resistance = bv 2, where b = 30 kg/m.

Using Newton's second law we obtain


dv
m = mg bv 2:
dt
dv b 2 mg
Thus = (v k ); k =
2 2
. Sepa-
dt m b
rate the variables and you get
0 1
1 v
@ A=
bk
v2 d dt
k2 1 k m
8
The integral can be done using HYPERBOLIC
FUNCTIONS | if you don't know them, there
is a very nice wikipedia article about them. They
are very simple and very useful. The answer is
0 1
B bkt C
v = k coth @ c ;
A
m
where coth is the hyperbolic cotangent and c
is the constant of integration. As t ! 1 the
coth function tends to 1, so v tends to k  4:87
m/sec. Of course c is found by setting v = 10
m/sec when t = 0. Since we know b and m,
we now know everything on the right side. k is
called the terminal velocity; if all goes well, it is
the speed at which the parachutist reaches the
ground. We can see this as follows: the number
9
against which t is measured is m=(bk ), which
of course has units of time (check it!). Now
m=(bk ) = mg=(bkg ) where g is the accelera-

tion due to gravity,  9:8 m/sec , and we are


2

told mg = 712N, so we know all these numbers.


You will nd that m=(bk )  0:497 seconds. So
the time scale of the problem is about half a
second. But the length of a parachute fall is
vastly longer than that, typically about 5 min-
utes. So in e ect t is indeed e ectively in nite
by the time you reach the ground. And it feels
like it too.

Example 5. The orbit of a planet is the

10
shape it traces out as it moves around the Sun.
The best way to describe an orbit is by using
plane polar coordinates [please revise if nec-
essary!]. These give the position of a point in
the plane by specifying its distance r from the
origin together with the angle  made by its po-
sition vector with the x axis. A shape or graph
in the plane is given by a function of the form
r() [just as, in Cartesian coordinates, a graph

is given by a function y (x)]. Using his own laws


of motion, Isaac Newton discovered that every
planet has an orbit which satis es an equation
of the following form:
 du 2
+ (u A)2 = B 2;
d
11
where u() is the reciprocal of r() and where
A; B are positive constants [with the same units

as u, namely 1/[length]] with B=A < 1. Solve


this equation.

Solution. This is a separable equation:


du=B
d = s ;
1 ( u BA )2
and so we have
u A
 + C = arcsin ;
B
where C is the constant of integration. Recall-
ing the de nition of u we get nally
A 1
r = B :
1 + A sin( + C )
If you sketch this you will nd that it is an
egg-shaped curve called an ellipse. [Note that
12
it is important here that B=A < 1; otherwise
you will get other shapes, such as a hyperbola].
Thus all of the planets have ellipse-shaped or-
bits. This is called Kepler's First Law.

Reduction to separable form


Certain rst order d.e. are not separable but
can be made separable by a simple change of
variable. This holds for equations of the form
y
y0 = g( ) (1)
x
y y
where g is any function of . We set = v ,
x x
then y = vx and y 0 = v +xv 0. Thus (1) becomes
v + xv 0 = g (v ), which is separable. Namely,
dv dx
= . We can now solve for v , hence
g (v ) v x
13
obtain y .

Example 6.
Solve 2xyy 0 y 2 + x2 = 0. [x2 + y 2 = cx]
Linear Change of Variable
A d.e. of the form y 0 = f (ax + by + c),
6 0 (if b = 0, the
where f is continuous and b =
equation is separable) can be solved by setting
u = ax + by + c.

Example 7. (2x 4y +5)y0 + x 2y +3 = 0.


Set x 2y = u, we have
1
(2u + 5) (1 u0) + u + 3 = 0;
2
(2u + 5)u0 = 4u + 11:

14
Separating variables and integrating :
0 1
B 1 C
@ 1 A du = 2dx:
4u + 11
1
Thus u `nj4u + 11j = 2x + c1,
4
or 4x + 8y + `nj4x 8y + 11j = c.

15
1.3 Linear First Order ODEs
A d.e. which can be written in the form
dy
+ P (x)y = Q(x) (1)
dx
where P and Q are functions of x, is called a
linear rst order d.e. Relation (1) above is the
standard form of such a d.e.

To solve (1), de ne a new function R(x) by


Rx
R(x) = e P (s)ds and note that R0 = RP by

the chain rule. So (Ry )0 = RP y + Ry 0. Hence


if we multiply both sides of (1) by R we get

Ry 0 + RP y = RQ

16
or
(Ry )0 = RQ:

Now you can integrate both sides and then di-


vide by R to obtain y . The function R is called
the INTEGRATING FACTOR for this equa-
tion.

Example 8. Solve
(i) xy 0 3y = x2; x > 0.

(ii) y 0 y = e2x.

Example 9. At time t = 0 a tank contains 20


lbs of salt dissolved in 100 gal of water. Assume
17
that water containing 0.25 lb of salt per gallon
is entering the tank at a rate of 3 gal/min and
the well stirred solution is leaving the tank at
the same rate. Find the amount of salt at any
time t.

Solution. Let the amount of salt at time t be


dQ
Q(t). The time rate of change equals the
dt
in ow minus the out ow.
dQ 3Q
We obtain
dt

= 3 0:25
100
, with Q(0) =
3t
20. Solving, Q(t) = 25 5e 100 . Note that
lim Q(t) = 25. Thus after suciently long
t!1
time, the salt concentration remains constant
at 25 lbs/100 gal.

18
Example 10A. A tank contains, at time t =
1 second, 100 cubic metres of pure water. At
that instant, salty water with a concentration
of 10 kilograms per cubic metre begins to be
pumped in at a rate of 10=t cubic metres per
second, and the mixed solution is pumped out
at the same rate. How many kilograms of salt
are there in the tank after 1010 seconds?

Solution. Proceed as above.


dQ 100 Q
We obtain = , with Q(1) =
dt t 10t
0. Solving (the integrating factor this time is
exp( ln10(t) ) = t1=10), we get Q(t) = 1000+Kt 1=10,

where K is the arbitrary constant. Q(1) = 0

19
implies that K = 1000; so Q(1010) = 1000
100 = 900 kg. Note that, again, after a suf-
ciently long time, the salt concentration ap-
proaches 10 kg/m3.

Example 10B. You may be tempted to think


that these examples are somewhat frivolous. But
think again: consider an experiment in which
one takes a planet with a nice clean atmosphere,
and then begins to pump in 50 billion tons a
year of carbon dioxide. The carbon dioxide
mixes with the air, and the mixture is removed
by biological and geological e ects so that the
volume of the atmosphere hardly changes. In

20
view of what we have been learning here, the
concentration of CO2 will rise exponentially quickly
towards a limiting value. Does this sound fa-
miliar? Let us go on. Warned by their sci-
entists, the inhabitants of the planet immedi-
ately1 reduce the concentration of the CO2 in
the gases they inject into their atmosphere at
a rapid rate, proportional to the reciprocal of
time. What will happen? Now consider this
problem: A tank contains, at time t = 1 second,
100 cubic metres of pure air (negligible CO2).
At that instant, polluted air with a concentra-
tion of 10/t litres of CO2 per cubic metre begins
1 OK, this part may not sound familiar

21
to be pumped in at a rate of 10 cubic metres per
second, and the mixed solution is pumped out
at the same rate. Give a graph of the quantity
of CO2 in the tank as a function of time.

Solution. Proceed as above.


dQ 100 Q
We obtain = , with Q(1) =
dt t 10
0. Solving (the integrating factor this time is
t )), we get
exp( 10
0 10 0 1 0 11
B tC B B t C 1 CC
B
Q(t) = 100exp @ A @Ei @ A Ei @ AA ;
10 10 10
where Ei(x) is the \exponential integral func-
tion", basically the integral of ex=x. What you
will nd is that the amount of CO2 in the tank
*increases* for some time, even while the con-
22
centration in the gas entering the tank is de-
creasing. It reaches a rather high maximum,
and only then begins to decrease, rather slowly.
This is the dreaded \momentum e ect": even
if we start drastic reductions of CO2 release
*now*, the amount of it in the atmosphere will
go on increasing for a long time and will only
be reduced to safe levels in the distant future.
Alas.
Use Wolfram Alpha to graph 100(Ei(x=10)
Ei(1=10))=exp(x=10) from 1 to 30; and google

Representative Concentration Pathway.

Example 11. In Example 2 in Section 1.2,

23
we saw that radioactive substances typically de-
cay at a rate proportional to the amount present.
Sometimes the product of a radioactive decay
is itself a radioactive substance which in turn
decays (at a di erent rate). An interesting ex-
ample of this is provided by Uranium-Thorium
dating, which is a method used by palaeontolo-
gists to determine how old certain fossils [espe-
cially ancient corals] are. Corals lter the sea-
water in which they live. Sea-water contains a
tiny amount of a certain kind of Uranium [Ura-
nium 234] and the corals absorb this into their
bodies. Uranium 234 decays, with a half-life of
245000 years, into Thorium 230, which itself de-

24
cays with a half-life of 75000 years. Thorium is
not found in sea-water; so when the coral dies,
it has a certain amount of Uranium in it but no
Thorium [because the lifetime of a coral polyp
is negligible compared with 245000 years]. It
is possible to measure the ratio of the amounts
of Uranium and Thorium in any given sample.
From this ratio we want to work out the age
of the sample [the time when it died]. This is
important if we want to know whether global
warming is causing corals to die now. [Maybe
they die o regularly over long periods of time
and the current deaths have nothing to do with
global warming.]

25
Let U(t) be the number of atoms of Uranium
in a particular sample of ancient coral and let
T(t) be the number of atoms of Thorium. Be-
cause each decay of one Uranium atom produces
one Thorium atom, Thorium atoms are being
born at exactly the same rate at which Uranium
atoms die: so we have

dU
= kU U; (1)
dt
dT
= +kU U kT T; (2)
dt
where kU ; kT are constants [related to the half-
6 kT , and U (0) = U0, T (0) = 0.
lives] with kU =
We want to nd t given that we know the ratio
of T(t) to U(t) at the present time.
26
Solving (4) with the given data gives U =
U0 e kU t: From this we see that U0=2 = U0 e kU 245000

so kU = ln(2)=245000 and similarly kT = ln(2)=75000.


So we know these numbers. Notice that kU is
smaller than kT .

Now (5) becomes

dT
+ kT T = kU U0e kU t:
dt
An integrating factor is ekT t. Solving, with
T (0) = 0, gives
kU
T (t) = U0(e kU t e kT t).
kT kU
Unfortunately we don't know U0 but luckily
that goes away when we take the ratio:
kU
T =U = [1 e(kU kT )t]:
kT kU
27
[Check that the expression on the right side is
positive after t = 0; note also that while both
U and T tend to zero, their ratio does not.] So
now if we measure the ratio T/U at the present
time, we can solve this for t and we have our
answer. This method is good for coral fossils
up to about half a million years old.

Reduction to linear form


Certain nonlinear d.e.s can be reduced to a
linear form. The most important class of such
equations are the Bernoulli equations of the form
y 0 + p(x)y = q (x)y n where n is any real number.

If n = 0 or 1, the equation is linear, otherwise

28
it is nonlinear. To solve, we rewrite this as
y ny 0 + y 1 np(x) = q (x), and set y 1 n = z .

Then (1 n)y ny 0 = z 0, and the given d.e.

becomes z 0 +(1 n)p(x)z = (1 n)q (x), which


is a rst order linear d.e.

Examples. To solve
(i) y 0 Ay = By 2; A; B constants.

Solution. (i) Observe that n = 2. Set


z = y 1 2 = y 1. Then y 2y 0 = z 0. (i)

becomes z 0 + Az = B , which is separable.


B
Solving, z = + ce Ax.
A
 1 1
 y=
z
= B + ce Ax
.
A

29
(ii) y 0 + y = x2y 2. [y (Aex + x2 + 2x + 2) = 1]

Other Kinds of First-Order Models


So far we have always obtained our di eren-
tial equations by studying rates of change which
depend on things that are happening in the
present. But very often, the rate of change of
something NOW depends on what happened in
the PAST. This often happens with diseases:
the rate at which people are getting sick now
depends on what they were doing two weeks
ago. Here is a concrete example.
30
Potato plants often su er from a disease called
potato blight, caused by a microscopic fungus-
like organism. Some spores are blown into a
eld by the wind. But what happens then is
complicated: it turns out that the infected plants
do not become infectious right away. Instead,
there is a *latency period* of length p during
which the plants are sick but *not* infectious.
Then they become infectious for a period q .
After that, they are still sick but *not* infec-
tious! The point is: plants which are getting
infected NOW do not a ect the rate of infec-
tion NOW. Instead, the rate of infection NOW
is controlled by the number of infected plants

31
in the PAST. On the other hand, the plant can
get sick only once (they never recover). So once
*many* plants have been infected, the rate of
infection goes down, simply because there are so
few new plants to infect. (If the fraction of in-
fected plants is x(t), this means that the rate of
infection now depends on the fraction of healthy
plants, that is, 1 x(t).) So you end up with

an equation of the form


dx
= K [1 x(t)][x(t p) x(t p q )];
dt
where K measures how infectious the plants are
when they *are* infectious. This may look sim-
ple, but it is surprisingly hard to solve these
things, even with a computer. One question
32
you can solve: what fraction of the plants will
be infected *in the long run*? This is a tuto-
rial problem. [Hint: the answer is *not* usually
100%!! Remark: this is not an easy problem.]

1.4 Second order linear di erential


equations
The general form of a second order linear d.e.
is
y 00 + p(x)y 0 + q (x)y = F (x): (1)

If F (x)  0, the linear d.e. is called homoge-


neous otherwise it is called nonhomogeneous.

33
The d.e.
y 00 + 4y = e x sin x

is a nonhomogeneous linear second order d.e.;


(1 x2)y 00 2xy 0 + 6y = 0 or in the above
2x
0+ 6
standard form y 00 y y = 0 is
1 x 2
1 x 2

homogeneous; whereas x(y 00y +(y 0)2)+2y 0y = 0


r
00
and y = 1 + (y 0)2 are nonlinear. Note that
(1) is linear in the sense that it is linear in y
and its derivatives.

A solution of a second order d.e. on some in-


terval I is a function y = h(x) with derivatives
y 0 = h0(x) and y 00 = h00(x) satisfying the d.e.

for all x in I .

34
Homogeneous d.e.s
The general solutions of homogeneous equa-
tions can be found with the help of the Su-
perposition or linearity principle, which is
contained in the following theorem.

Theorem. For a homogeneous linear d.e.


y 00 + p(x)y 0 + q (x)y = 0; (2)

any linear combination of two solutions on an


open interval I is also a solution on I . In par-
ticular for such an equation, sums and constant
multiples of solutions are again solutions.

Proof. Let y1 and y2 be solution of (2) on I .


Then y100 + py10 + qy1 = 0 and y200 + py20 + qy2 = 0.

35
Substituting y = c1y1 + c2y2 in the left of (2),
we get

(c1y1 + c2y2)00 + p(c1y1 + c2y2)0 + q (c1y1 + c2y2)


= c1y100 + c2y200 + pc1y10 + pc2y20 + qc1y1 + qc2y2
= c1(y100 + py10 + qy1) + c2(y200 + py20 + qy2)
= c1  0 + c2  0 = 0:

Thus c1y1 + c2y2 is also a solution of (2).

Caution
The above result does not hold for nonhomo-
geneous or nonlinear d.e.s. For example, y =
1 + cos x and y = 1 + sin x are solutions of the
nonhomogeneous linear d.e. y 00 + y = 1, but
2(1 + cos x) and 2 + cos x + sin x are not its
36
solutions. Similarly, y = 1 and y = x2 are solu-
tions of the nonlinear d.e. yy 00 xy 0 = 0. But
x2 and x2 + 1 are not its solutions.

Example 12. Solve the initial value problem


y 00 y = 0, y (0) = 5, y 0(0) = 3.

Solution. It is easy to see that ex and e x


are solutions of y 00 y = 0. Thus y = c1ex +
c2e x is also a solution. From y (0) = 5 we get

c1 + c2 = 5, and y 0(0) = 3 gives c1 c2 = 3.

Solving, c1 = 4, c2 = 1. The required solution


is y = 4ex + e x.

General solution of homogeneous lin-

37
ear second order d.e.
Let y1(x) and y2(x) be de ned on some inter-
val I . Then y1 and y2 are said to be linearly
dependent on I if one of them is a CONSTANT
MULTIPLE OF THE OTHER ONE. Other-
wise they are LINEARLY INDEPENDENT.

A general solution of y 00 + py 0 + qy = 0 on
an open interval I is y = c1y1 + c2y2, where y1
and y2 are linearly independent solutions of the
d.e. and c1, c2 are arbitrary constants.

A particular solution of the d.e. on I is ob-


tained if speci c values are assigned to c1 and
c2 .

38
For example, y1 = cos x and y2 = sin x are
linearly independent solutions of y 00 + y = 0. A
general solution is y = c1 cos x + c2 sin x.

A particular solution is, for example, y =


2 cos x + sin x, (which satis es y (0) = 2 and
y 0(0) = 1).

Homogeneous d.e. with constant coef-


cients
Consider

y 00 + ay 0 + by = 0; a; b constants: (1)

Recall that a rst order linear d.e. y 0 + ky = 0,


k constant, has y = e kx as a solution. We now

try the function y = ex as a solution of (1).


39
Substituting y = ex in (1) we obtain (2 +
a + b)ex = 0, which implies that ex is a

solution if  is a solution of

2 + a + b = 0: (2)

This equation is called the characteristic equa-


tion (or auxiliary equation) of (1).

The roots of (2) are


p
1 = (
1
a+ a 2
4 b );
p
2

2 = 12 ( a a2 4b ):

We obtain e1x and e2x as solutions of (1).

Depending on the sign of a2 4b, equation (2)


will have

Case 1: two real roots if a2 4b > 0,


40
Case 2: a real double root (i.e. 1 = 2) if

a2 4b = 0,

Case 3: complex conjugate roots if a2 4b <


0.

Case 1. (2) has two distinct real roots 1 and


2.

In this case e1x and e2x are linearly indepen-


dent solutions of (1) on any interval. The corre-
sponding general solution of (1) is y = c1e1x +
c2e2x.

Example 13. Solve y00 + y0 2y = 0, with


y (0) = 4, y 0(0) = 5.

41
Solution. The characteristic equation is 2+
2 = 0 ( a2 4b = 9 > 0). The roots are 1 = 1
and 2 = 2. The general solution is y =
c1ex + c2e 2x. Initial conditions y (0) = 4 and

y 0(0) = 5 give c1 + c2 = 4 and c1 2c2 = 5.


Solving: c1 = 1, c2 = 3. Thus y = ex + 3e 2x

is the solution.

Case 2. (2) has a real double root 1 (= 2).

This occurs when a2 4b = 0, and 1 = 2 =


a, ax
2
from which we get one solution y1 = e 2 .
ax
To nd a second solution y2, we try y2 = xe 2 .
This does work: y 0 = e 2 a xe 2 , and
ax ax
2 2

y200 = a e ax a e ax 2 ax
2
2
2
2 + a4 xe 2

42
!
= a+ a2 x e ax
2
4

So
" #
y200 + ay20 + by2 = a+ a2 x + a
4
a2 x + bx e ax
2
2

" #
= b a2 xe ax
2 =0
4

because b = a2 .
4

Thus in this case when a2 4b = 0, a linearly


independent pair of solutions of y 00 +ay 0 +by = 0
ax ax
on any interval is e 2 , xe 2 . The correspond-
ax
ing general solution is y = (c1 + c2x)e 2 .

Example 14.
(i) Solve y 00 + 8y 0 + 16y = 0.

43
(ii) Solve the initial problem y 00 4y 0 + 4y = 0,
y (0) = 3, y 0(0) = 1.

Case 3. (2) has two complex roots 1; 2.

This happens when a2 4b < 0. We set w =


s
b a2 . Then you can easily show that 1, 2 =
4

a
2
 iw, where i 2
= 1. We try
ax
y1 = e 2 coswx
ax
y2 = e 2 sinwx

We leave it to you to show by substitution that


these are solutions of y 00 + ay 0 + by = 0. The
point to remember is that a , the REAL part of
2

44
 ax 
1 and 2, goes into the exponential part e 2

while the IMAGINARY part w goes into the cos


and sin part, cos(wx) and sin(wx). For example
if 1, 2 = 1  2i, then y1 = e xcos(2x) and
y2 = e xsin(2x).

To conclude: set

ax
y1 = e 2 cos wx;
ax
y2 = e 2 sin wx:

Then y1 and y2 are linearly independent. The


corresponding general solution is

y = c1y1 + c2y2
ax
= e 2 (c1 cos wx + c2 sin wx):
45
Example 15.
(i) Solve y 00 + 2y 0 + 5y = 0.

(ii) Solve y 00 +2y 0 +5y = 0, y (0) = 1, y 0(0) = 5.

Nonhomogeneous equations
We consider

y 00 + p(x)y 0 + q (x)y = r(x); r (x) 6 0: (1)

The corresponding homogeneous equation is

y 00 + p(x)y 0 + q (x)y = 0: (2)

Let y1 and y2 be any two solutions of (1). Then

y100 + p(x)y10 + q (x)y1 = r(x); (3)

and
46
y200 + p(x)y20 + q (x)y2 = r(x): (4)

Subtracting (4) from (3):

y100 y200+p(x)(y10 y20 )+q (x)(y1 y2) = r(x) r(x) = 0:

Thus (y1 y2)00 + p(x)(y1 y2)0 + q (x)(y1 y2) =


0, i.e. y1 y2 is a solution of (2).

On the other hand, if y0 is a solution of (2)


and y1 a solution of (1), then clearly y1 + y0
is again a solution of (1). This suggests the
following de nition:

De nition. A general solution of the non-


homogeneous d.e. (1) is of the form

y (x) = yh(x) + yp(x); (5)

where yh(x) = c1y1(x) + c2y2(x) is a general


47
solution of the homogeneous d.e. (2) and yp(x)
is any solution of (1) containing no arbitrary
constants.
Thus to solve (1), we have to solve the ho-
mogeneous equation (2) and nd a (particular)
solution of (1). The sum of these two is what
we want.

Determination of yp(x)
Method of undetermined coecients
This method applies to equations of the form
y 00 + ay 0 + by = r(x), where a and b are con-

stants, and r(x) is a polynomial, exponential


function, sine or cosine, or sums or products of

48
such functions.

We denote y 00 + ay 0 + by by L(y )(x), where


a and b may be complex numbers. We'll make

use of the Principle of super-position:

If y1(x) is a solution of L(y )(x) = g1(x) and


y2(x) is a solution of L(y )(x) = g2(x), then for

any constants c1 and c2, y = c1y1(x)+ c2y2(x) is


a solution of L(y )(x) = c1g1(x)+c2g2(x). Using
this principle, the problem is reduced to nd-
ing a particular solution of L(y )(x) = p(x)ekx,
where p(x) is a polynomial in x and k is a real
or complex constant. Method of undetermined
coecients is adequately described by consider-
ing the following three cases, which we illustrate
49
with examples.

1. Polynomial case
In this case k = 0. The method begins with
\try a polynomial with unknown coecients".

Example 16.
y 00 4y 0 + y = x2 + x + 2:

Try y = Ax2 + Bx + C where A, B , C are


constant. Then we have, after substitution,

2A 4(2Ax + B ) + Ax2 + Bx + C = x2 + x + 2

or

Ax2 + (B 8A)x + 2A 4B + C = x2 + x + 2:

50
Comparing coecients, we have

A = 1

B 8A = 1 ) B = 9
2A 4B + C = 2 ) C = 36

So Ax2 + Bx + C = x2 + 9x + 36 is a particular
solution.

Example 17. y00 2y = 2x3. Try Ax3 +


Bx2 + Cx + D, and we get

6Ax + 2B 2Ax3 2Bx2 2Cx 2D


= 2x3 + 0x2 + 0x + 0:

This means

2A = 2 ) A = 1
2B = 0 ) B = 0
51
6A 2C = 0 ) C = 3
2B 2D = 0 ) D = 0

So y = x3 3x is a particular solution.

2. Exponential case
Here k is real but not zero. The method be-
gins with \put y = uekx, where u = u(x)."
This substitution will remove ekx from the equa-
tion and reduce the problem to the polynomial
case 1 (above).

Example 18.

y 00 4y 0 + 2y = 2x3e2x: (1)

52
Substituting y = ue2x, we get

y0 = u0e2x + 2ue2x
y 00 = u00e2x + 4u0e2x + 4ue2x:

Thus (1) becomes:

u00e2x 2ue2x = 2x3e2x;

or

u00 2u = 2x3:

Using the result of example 17, u = x3 3x.

Thus a particular solution is yp(x) = ( x3


3x)e2x.

53
Example 19.

y 00 4y 0 + 4y = 20x3e2x:

Set y = ue2x, we get as above u00 = 20x3.


Integrating twice, u = x5 + Ax + B . We may
set
A = 0 = B and take a particular solution

yp = x5e2x.

3. Trigonometric case
Here we use complex exponentials. Recall:
es+it = es(cos t + i sin t). We only need the

di erentiation property of ecx, c complex.

Recall also: if y = u(x) + iv (x) is a complex


valued solution of L(y )(x) = h1(x) + ih2(x)
54
(where u(x), v (x), h1(x) and h2(x) are real val-
ued functions), then

(u00 + iv 00) + a(u0 + iv 0) + b(u + iv )


= h1 + ih2;
) (u00 + au0 + bu) + i(v00 + av0 + bv)
= h1 + ih2:

Equating real and imaginary parts:

u is a solution of L(y )(x) = h1(x)

v is a solution of L(y )(x) = h2(x)

Example 20. Solve

y 00 + 4y = 16x sin 2x: (1)

We solve instead
55
z 00 + 4z = 16xei2x: (2)

By the above discussion, the imaginary part


of a solution of (2) will be a solution of (1).
Set z = uei2x, u = u(x). (recall case 2 above)
computing z 0 and z 00 and substituting in (2) give

u00 + 4iu0 = 16x:

Solving this, we get u = 2ix2 + x. Thus z =


( 2ix2 + x)ei2x, and a particular solution of (1)
is
y = Imz = x sin 2x 2x2 cos 2x:

Example 21.

56
y 00 + 2y 0 + 5y = 16xe x cos 2x: (1)

Solve instead

z 00 + 2z 0 + 5z = 16xe( 1+2i)x
: (2)
1+2i)x
Re (z ) will be a solution of (1). Put z = ue( ,
u = u(x). [Solution is y = Ae( x)cos(2x) +

Be( x)sin(2x) + xe( x)[2xsin(2x) + cos(2x).]

1.5 Some Remarks on More Dicult


Cases
In general, a second order ODE need not have
a simple right hand side, and the method of un-
determined coecients may not work. In that
case, you can use the method of VARIATION
57
OF PARAMETERS, which works (in theory)
for ANY right hand side. Google it.
A more serious problem is that the coecients
need not in general be constants: recall that the
general form of a second order linear ODE is

y 00 + p(x)y 0 + q (x)y = F (x):

In this case there are various other tricks that


can be used, such as the method of POWER
SERIES SOLUTIONS OF ODEs. Google it!
One nal remark: in the homogeneous case,
with F(x) = 0, this equation has a canonical
form, as follows: change the variable y to a vari-

58
able z(x), de ned by
1Z
ln(z )  ln(y ) + p(x):
2
It can then be shown (by a very tedious but
in principle elementary) calculation that z(x)
satis es
z 00 + Q(x)z = 0:

In other words, if you understand *this* equa-


tion, then you understand *all* linear second
order ODEs. For example, google \Mathieu
equation". Here
1 1 0
Q(x)  q(x) 4
p(x)2
2
p (x ):

59

You might also like