You are on page 1of 12

MA2001N Differential Equations

Lecture Notes for Week 2



[3. 2nd order, linear odes, reducible
to 1st order form]
[4. 2nd order odes with constant
coefficients]

3. 2nd order, linear odes, reducible to 1st order form

3.1 The general solution

Consider the 2nd order, linear ode of the following special form:

) ( ) ( x f y x q y = ' + ' ' . (15)

Note: there is no term in y present in (15).

Equation (15) can be solved after making the substitution:

v y = ' , (16)

where v is simply a function of x representing the derivative.

Differentiating (16) gives

v y ' = ' ' . (17)

Substituting (17) and (16) into (15) gives

) ( ) ( x f v x q v = + ' . (18)

Equation (18) is a first order, linear ode, in the variable v , and can be solved
for v , by using the integrating factor method.

Having found v , the dependent variable, y , follows from (16) by carrying out
another integration. After doing such an integration, we would have:


}
+ = A dx v y ,

where A is a constant.

So far, we have outlined the general idea behind reducing the order of an equation
of the form of (15). A worked example is now needed to clarify the approach.


1
MA2001N: Lecture Notes for Week 2 (continued)

3.1 The general solution (continued)

Worked Example: A reducible equation

Find the general solution of

1 2
2
= ' + ' ' y x y x , 1 > x . (19)
________________________

Using the substitution v y = ' , from (16), and following the method
outlined above, equation (19) becomes


2
1 2
x
v
x
v = + ' . (20)

Equation (20) can be solved by the integrating factor method. So,

] ln 2 exp[ ]
2
exp[ x dx
x
I = =
}

and

2
x I = .

After multiplying through by I , equation (20) becomes

1 2
2
= + ' v x v x
and
1 ) (
2
= v x
dx
d
.

Integrating gives


1
2
c x v x + = ,

where
1
c is a constant, and it follows that


2
1
1
x
c
x
v + = .

But we know that y v ' = and so


2
1
1
x
c
x
y + = ' . (21)

2
MA2001N: Lecture Notes for Week 2 (continued)

3.1 The general solution (continued)

Worked Example: A reducible equation (continued)

Integrating (21) now gives


2
1
ln c
x
c
x y + = (22)

where
2
c is a second constant.
___________________________________________________

That concludes the worked example. Notice how two constants have
appeared in (22). Now try Example Sheet 2(a)(i).

3.2 Initial conditions and initial value problems

The general solution of a 2nd order ode will always contain two arbitrary
constants. The worked example in section 3.1 has given a demonstration
of this, where equation (22) contains the constants
1
c and
2
c . These two
constants can be evaluated, provided suitable conditions are given.

As a common example of such conditions, we introduce what are called
initial conditions. These conditions are referred to as initial, because
they are given at the start of a process. They are given in the form:


0
y y = at
0
x x =
and

0
y y ' = ' at
0
x x = ,

where
0
y ,
0
y' and
0
x are given constants.

An alternative way to write these conditions is


0 0
) ( y x y = and
0 0
) ( y x y ' = ' .

An initial value problem is one in which a given ode has to be solved
together with the appropriate number of given initial conditions.

The worked example in section 3.1 can now be extended to form an
initial value problem, thus showing how such initial conditions can be
used to evaluate the arbitrary constants in (22).


3
MA2001N: Lecture Notes for Week 2 (continued)

3.2 Initial conditions and initial value problems (continued)

Worked Example: An initial value problem

Solve the following initial value problem:

1 2
2
= ' + ' ' y x y x , 1 > x ,

subject to the two conditions

0 = y at 1 = x and 0 = ' y at 1 = x .

For succinctness, this initial value problem would be stated as:

1 2
2
= ' + ' ' y x y x , 0 ) 1 ( = y , 0 ) 1 ( = ' y , 1 > x . (23)
___________________________________________________

We have already found the general solution of the ode in (23). In
summary, from (22) and (21), we have

(22):
2
1
ln c
x
c
x y + = ; (21):
2
1
1
x
c
x
y + = '

Now using the given conditions from (23), namely

0 ) 1 ( = y and 0 ) 1 ( = ' y ,

in conjunction with (22) and (21) respectively, we have
two simultaneous equations:


2 1
) 1 ln( 0 c c + = and
1
1 0 c + = .

From these, the two constants can be found as:

1
1
= c and 1
1 2
= = c c .

So, from (22), the solution of the initial value problem is

1
1
ln + =
x
x y .
___________________________________________________

That concludes the worked example. Now try Example Sheet 2(a)(ii).

4
MA2001N: Lecture Notes for Week 2 (continued)

4. 2nd order odes with constant coefficients

In this section (4), we will consider the case when the 2nd order ode is homogeneous,
that is, the right-hand side is zero. We will also be assuming that the coefficients on
the left-hand side of the general linear form, given in (2), are all constants.

So, let the 2nd order, homogeneous ode with constant coefficients be:

0
2
= + + y c Dy b y D a , (24)

where a , b and c are given constants.

A solution, y , is now required, which satisfies equation (24). Because a ,
b and c are all constants, we are looking for a solution in which the form of
y , Dy and y D
2
can differ only by a constant factor. The general exponential
function has this property. So, let the solution, y , be the general exponential
form:

x
e k y
o
= , (25)

where k is a non-zero constant and o is also a constant.

We now need to see whether this assumption about the form of the solution
works out satisfactorily. So, differentiating (25) gives


x
e k Dy
o
o = (26)
and

x
e k y D
o
o
2 2
= . (27)

Substituting (27), (26) and (25) into (24) gives

0
2
= + +
x x x
e k c e k b e k a
o o o
o o
or
0 ) (
2
= + + c b a e k
x
o o
o
.

Since
x
e k
o
is not zero, we must have

0
2
= + + c b a o o . (28)

Equation (28) is called the auxiliary equation.

Equation (28) must be satisfied if the form we have suggested in (25), for the
solution of (24), is indeed correct.

5
MA2001N: Lecture Notes for Week 2 (continued)

4. 2nd order odes with constant coefficients (continued)

Equation (28) is, of course, a quadratic equation and so it can be solved for
o as:

a
ac b b
2
4
,
2
2 1

= o o , (29)

where
2 1
,o o are the two roots of equation (29), depending on which sign
respectively is chosen.

As usual with quadratic equations, there are three possible cases to consider:

Case 1: Roots of (29),
1
o ,
2
o , are real and distinct;

Case 2: Roots of (29),
1
o ,
2
o , are both complex;

Case 3: Roots of (29),
1
o ,
2
o , are real and equal.

Each of these cases will now be dealt with in turn.

4.1 Case 1: Roots of (29): real and distinct

When ac b 4
2
> , equation (29) will give real and distinct values for
1
o and

2
o . Equation (25) then gives the two solutions


x
e k y
1
1 1
o
=
and

x
e k y
2
2 2
o
=

corresponding to the two roots
2 1
,o o . The general solution of (24) is then
the sum of
1
y and
2
y , which gives


x x
e k e k y
2 1
2 1
o o
+ = , (30)

with
2 1
,o o from (29).

4.2 Case 2: Roots of (29): both complex

When ac b 4
2
< , equation (29) will give complex number values for
1
o and

2
o . To develop this further, write equation (29) as follows:

(continues overleaf)

6
MA2001N: Lecture Notes for Week 2 (continued)

4.2 Case 2: Roots of (29): both complex (continued)


a
b ac
i
a
b
2
4
2
2
1

+ = o
and

a
b ac
i
a
b
2
4
2
2
2

= o ,

where i is the unit imaginary number, 1 = i , and where it should be
noticed that, by reversing signs, the term
2
4 b ac is now real. We also
take the term to be strictly positive.

The roots,
2 1
,o o , may be abbreviated as

o i + =
1
, o i =
2
, (31)

where

a
b
2
= ,
a
b ac
2
4
2

= , (32)

The general solution can now be found by combining (30), which still applies
even though the roots are now complex, and (31). This gives:


x i x i
e k e k y
) (
2
) (
1
+
+ = . (33)

Taking out the common factor,
x
e

, (33) becomes

) (
2 1
x i x i x
e k e k e y

+ = . (34)

It is important to realise that the solution, y , as given in (34), is a complex number.
We are, however, looking for a real solution. To find such a solution, we need to
develop the terms in (34), using the theory of complex numbers.

After using the theory of complex numbers, it can be shown that (34) can be written:

) sin cos (
2 1
x k x k e y
x

+ = , (35)

where
1
k and
2
k are now real valued constants and and have been defined
in (32). Note that in (35), y is now a real valued solution, which is what we are
seeking. But, how does equation (34) become (35)?

7
MA2001N: Lecture Notes for Week 2 (continued)

4.2 Case 2: Roots of (29): both complex (continued)

An aside: How does equation (34) become (35)?

In equation (34), y ,
1
k and
2
k are, in fact, all complex: y is the
complex solution, say,
2 1
y i y + , whereas
1
k and
2
k are complex
constants. It is therefore more appropriate to write (34) as:

) ) ( ) ( (
2 2 1 1 2 1
x i x i x
e b i a e b i a e y i y

+ + + = + .

where
1
a ,
1
b ,
2
a and
2
b are real constants.

By expressing the exponential term,
x i
e

, as a series expansion and then
collecting together all real terms and all imaginary terms, it is possible to
identify two further series expansions, one for x cos and one for x sin .
In this way, it is possible to derive the standard trigonometrical form:

x i x e
x i

sin cos + = .

Bearing in mind that,

x i x e
x i

sin cos =

,

it is now possible to write
2 1
y i y + in the following form:

) sin cos (
4 3 2 1
x k x k e y i y
x

+ = +
) sin cos (
6 5
x k x k e i
x

+ + , (36)

where we could, if we wished to go to extremes, identify
2 1 3
a a k + = ,

1 2 4
b b k = ,
2 1 5
b b k + = and
2 1 6
a a k = . But, it is important to realise that
it is not strictly necessary to know precisely how these constants are composed.
It is sufficient simply to know that they are arbitrary and that they are real.

Now equating the real part of equation (36) (or indeed the coefficient of the
imaginary part of (36), which gives the same), it is possible to write:

) sin cos (
2 1
x k x k e y
x

+ = ,

where the subscript on y has been dropped (because here
2 1
y y = ) and where
the real constants
1
k and
2
k have been reintroduced to be consistent with (35).

End of the aside: Equation (34) has now become (35).

8
MA2001N: Lecture Notes for Week 2 (continued)

4.3 Case 3: Roots of (29): real and equal

When ac b 4
2
= , equation (29) will give real and equal values for
1
o and

2
o . It follows from equation (29) that
1
o (
2
o = ) is given by:


a
b
2
1
= o . (37)

Since
1
o is now the one and only root of (29), it follows that equation (25)
will give one (and only one) solution, which will be:


x
e k y
1
1 1
o
= , (38)

where ) 2 /(
1
a b = o has been given in (37).

But, since we are solving equation (24), that is, a 2nd order ode, we know there
must be another solution,
2
y . Somehow, we must find
2
y .

To do this, we make an assumption that the second solution,
2
y , takes the form


1 2
y v y = , (39)

where v is an as yet unknown function of x , but
1
y is the known solution we
have already found in (38). Now we find v , such that
2
y , from (39), satisfies
the original equation (24) that we are trying to solve.

After doing this, it is possible to show that v must be a general linear function
of x , which can be written

x c c v
2 1
+ = . (40)

Now by forming the product of v from (40) and
1
y from (38), the second
solution,
2
y , can be found from (39). It follows that


x
e k x c c y
1
1 2 1 2
) (
o
+ = . (41)

Since the general solution, y , is the sum of
1
y , from (38), and
2
y , from (41),
it follows that


x
e x k k y
1
) (
2 1
o
+ = , (42)

where
1
k and
2
k can be thought of as combinations of other arbitrary constants
previously defined. But, in this case, how do we derive (40) from (39)?

9
MA2001N: Lecture Notes for Week 2 (continued)

4.3 Case 3: Roots of (29): real and equal (continued)

An aside: How do we derive equation (40) from (39)?

We must substitute
2
y from (39) into the equation we are trying to
solve, which is (24). To do this, we need to find the derivatives
2
y'
and
2
y ' ' . So, from (39), after differentiating various products, we have


1 1 2
y v y v y ' + ' = ' (43)
and

1 1 1 2
2 y v y v y v y ' ' + ' ' + ' ' = ' ' . (44)

Substituting (44), (43) and (39) into (24) now gives

) 2 (
1 1 1
y v y v y v a ' ' + ' ' + ' '
) (
1 1
y v y v b ' + ' +
) (
1
y v c + 0 = .

Now collect together all terms in v , in v' and in v ' ' , to give

) (
1 1 1
y c y b y a v + ' + ' '
) 2 (
1 1
y b y a v + ' ' +
0 ) (
1
= ' ' + y a v . (45)

Considering the v term in (45), we know that
1
y is a solution of (24).
So, immediately we know that
1
y can replace y in (24) to give

0
1 1 1
= + ' + ' ' y c y b y a . (46)

Already it can be seen that (45) is greatly simplified.

Now considering the v' term in (45), we can evaluate the factor
) 2 (
1 1
y b y a + ' as follows. Since, from (38),
x
e k y
1
1 1 1
o
o = ' , where,
from (37), ) 2 /(
1
a b = o , it follows that

0 ) )
2
( 2 ( 2
1
1 1 1
= + = + ' b
a
b
a e k y b y a
x o
(47)

Equations (46) and (47) show that, in (45), both the term in v and the
term in v' are zero. Equation (45) therefore reduces to the very simple
form:

0 ) (
1
= ' ' y a v .

10
MA2001N: Lecture Notes for Week 2 (continued)


4.3 Case 3: Roots of (29): real and equal (continued)

An aside (continued)

For non-trivial solutions, 0
1
= y , we therefore have

0 = ' ' v .

Integrating twice now gives

x c c v
2 1
+ = ,

showing that, in this case, v must indeed be a general linear function,
as has already been suggested in equation (40).

End of the aside: We have now derived equation (40) from (39)?

The approach used here to derive (40) and then (41), that is, to find a second
solution,
2
y , when a first solution,
1
y , is known, is a particular example of a
powerful general method called the method of Reduction of Order. This
will be studied further in section 5.

4.4 Concluding comment in summary of section 4

In practice, when doing problems in 2nd order odes with constant coefficients,
it should be realised that only very few steps need to be written down.
Note, in particular:

Case 2: having found and , equation (35) is used directly;

Case 3: having found
1
o , equation (42) is used directly.

The process is best illustrated by worked example, as follows.

Worked Example: 2nd order odes with constant coefficients

Solve the 2nd order ode

0 4
2
= + + y c y D y D , (48)

for the three cases 3 = c , 5 = c and 4 = c .
____________________________________________________

(continues overleaf)

11
MA2001N: Lecture Notes for Week 2 (continued)

Case 1: 3 = c (This will generate the case in section 4.1.)

From (48), write down the auxiliary equation directly.
(Compare (24) and (28) in the general derivation.) So, in this case:

0 3 4
2
= + + o o .

Solve this to give two distinct real roots

3
1
= o , 1
2
= o .

For this case, equation (30) applies. So, directly from (30), we have


x x
e k e k y

+ =
2
3
1
.

Case 2: 5 = c (This will generate the case in section 4.2.)

From (48), write down the auxiliary equation directly as:

0 5 4
2
= + + o o . (49)

Solving (49) gives the complex roots

2 / ) 5 4 16 4 ( ,
2 1
= o o ,
or
i + = 2
1
o , i = 2
2
o .

These are in the form of (31) and so and can be identified as

2 = , 1 = .

For this case, equation (35) applies. So, directly from (35), we have

) sin cos (
2 1
2
x k x k e y
x
+ =

.

Case 3: 4 = c (This will generate the case in section 4.3.)

From (48), write down the auxiliary equation directly as:

0 4 4
2
= + + o o .

This equation has two equal roots,
2 1
o o = , and after solving it

2
1
= o .

For this case, equation (42) applies. So, directly from (42), we have


x
e x k k y
2
2 1
) (

+ = .

That concludes the worked example. Now try Example Sheet 2(b).

12

You might also like