M1120 DEs (V) Lecture
M1120 DEs (V) Lecture
P ( x ) y Q( x ) y R ( x) y f ( x ) .
If the functions P, Q and R are all constant functions then the DE is said to have constant
coefficients. If f ( x ) 0 then the DE is said to be homogeneous. In the previous lecture (i.e.
DEs (IV)) we discussed how to find solutions to a second order linear homogeneous DE with
constant coefficients, i.e. to a DE of the form
ay by cy 0 .
In this lecture we are going to look at solving some non-homogeneous second order linear
DEs with constant coefficients, i.e. DEs of the form
ay by cy f ( x) .
Some insight into how we might solve such DEs can be gained by revisiting some relevant
first order examples.
Non-homogeneous first order linear DEs with constant coefficients take the form
ay by f ( x) .
We know that we can solve these DEs via an integrating factor, (see DE’s (III)).
The first fact to note is that yc ( x) is the general solution to the homogeneous
equation
y y 0
Page 45
Differential Equations (V) - Lecture Notes
and y p ( x) is one particular solution to the original non-homogeneous DE. The second
fact to note is that the form of the particular solution y p ( x ) x 1 is the same as that
of the non-homogeneous term f ( x ) x , that is they are both polynomials of degree 1.
☼
we see that yc ( x) is the general solution to the associated homogeneous DE and that
y p ( x) and f ( x ) are both trigonometric functions. In this case it seems reasonable that
yc ( x) contains both a cos( x) term and a sin( x) since to satisfy the DE we would
expect the particular solution to contain terms like f ( x) cos( x ) and its derivative
f ( x ) sin( x ) .
☼
Example 3: Find the general solution to the DE
y y e x .
we see that, once again, yc ( x) is the general solution to the associated homogeneous
DE but this time y p ( x) is not quite the same form as f ( x ) . The difference in this case
from the previous two examples is that here f ( x ) is the same form as yc ( x) , the
solution to the homogeneous DE and hence y p ( x) can’t also be of this form.
☼
The above examples all illustrate the following more general result.
Page 46
Math1120 - Mathematics II
The general solution to the non-homogeneous first order linear DE with constant
coefficients
ay by f ( x)
is
y ( x) yc ( x) y p ( x )
where yc ( x) is the general solution to the associated homogeneous DE
ay by 0
and y p ( x) is any particular solution to non-homogeneous DE.
Example Tasks
ay by cy f ( x) .
Since we don’t have any alternative method (such as using an integrating factor) for finding a
solution to this class of DE we are forced to use the method suggested by the previous
section.
The general solution to the non-homogeneous second order linear DE with constant
coefficients
ay by cy f ( x )
is
y ( x) yc ( x) y p ( x )
where yc ( x) , the complementary solution, is the general solution to the associated
homogeneous DE
ay by cy 0
and y p ( x) is any particular solution to non-homogeneous DE.
Page 47
Differential Equations (V) - Lecture Notes
general solution? (After all, y p ( x) is just one particular solution.) Let ( x ) be any solution
to the DE
ay by cy f ( x ) .
Then the function g ( x ) ( x) y p ( x) is a solution to the homogeneous DE
ay by cy 0 ,
since
ag bg cg a ( yp ) b( y p ) c( y p )
(a b c ) (ayp byp cy p )
f ( x) f ( x )
0 .
Now since yc ( x) is the general solution to the homogeneous DE, g ( x ) must be one of the
solutions in yc ( x) . Thus ( x) g ( x) y p ( x ) must be one of the solutions in
y ( x) yc ( x) y p ( x ) , or to put it the other way, y ( x) yc ( x) y p ( x ) contains all solutions to
the non-homogeneous DE.
Page 48
Math1120 - Mathematics II
3 A 4
4 A 3B 0
2 A 2 B 3C 0 .
Solving these equations gives
4 16 56
A , B , C .
3 9 27
Thus a particular solution to the DE is
4 16 56
y p ( x) x 2 x .
3 9 27
☼
The method of undetermined coefficients is only useful for finding the particular
solution when the non-homogeneous term is fairly simple. Table 1 gives a guide to the form
of the particular solution, y p , to try for various non-homogeneous terms f .
f ( x ) ae kx y p ( x ) Ce kx
( ) = a linear combination
( ) of ( ) and its derivatives
( )
i.e. y ( ) = ( )
Table 1
Page 49
Differential Equations (V) - Lecture Notes
Page 50
Math1120 - Mathematics II
y p ( x ) 4Ce 2 x .
For this to be a solution
y p 3 yp 5e 2 x
and so
4Ce 2 x 3(2Ce 2 x ) 5e 2 x
10Ce 2 x 5e 2 x .
On equating coefficients on both sides of this equation
1
10C 5 C .
2
Combining the complementary solution and this particular solution gives the general
solution as
1
y ( x ) A Be3 x e2 x .
2
On using the initial condition y (0) 1 we find
1
A B .
2
Since
y ( x) 3Be 3 x e 2 x ,
on using the initial condition y(0) 2 we find
B 1.
1
Thus A , B 1 and the solution to the initial-value problem is
2
1 1
y ( x ) e 3 x e 2 x .
2 2
☼
Page 51
Differential Equations (V) - Lecture Notes
u p (t ) Cet
will not work. Thus we try instead a solution of the form
u p (t ) Ctet .
For this function, using the product rule
du p
Ctet Cet
dt
and
d 2u p
2
Ctet 2Cet .
dt
Substituting into the DE gives
Ctet 2Cet Ctet Cet 2 Ctet et
3Cet et .
Notice that the tet terms will cancel out and so on equating the coefficients of the et
terms gives
1
C .
3
Thus, a particular solution is
1
u p (t ) tet
3
and hence the general solution is
1
u (t ) Aet Be 2t tet .
3
☼
Page 52
Math1120 - Mathematics II
2C1 2C1 x C2 x
(2C1 ) x (2C1 C2 ) x .
Equating coefficients yields
2C1 1
2C1 C2 0 ,
and hence
1
C1 , C2 1 .
2
Thus, a particular solution is
1 2
y p ( x) x x
2
and hence the general solution is
1 2
y ( x) Ae x B x x.
2
To solve the initial-value problem we need the derivative of y which is
y ( x) Ae x 2 x 1 .
Using y (0) 1
A B 1.
Using y(0) 1
A 1 1 .
Thus
A 2 , B 3 ,
and the solution is
1
y ( x) 3 2e x x 2 x .
2
☼
Example Tasks
Page 53
Differential Equations (V) - Lecture Notes
Page 54