0% found this document useful (0 votes)
24 views10 pages

M1120 DEs (V) Lecture

Lecture Notes

Uploaded by

maxfnq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views10 pages

M1120 DEs (V) Lecture

Lecture Notes

Uploaded by

maxfnq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Math1120 - Mathematics II

Differential Equations (V): Non-Homogeneous Second Order Linear DEs


Recall that a 2nd order linear DE is a differential equation of the form

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.

§1 Non-Homogeneous First Order Linear DEs

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)).

Example 1: Find the general solution to the DE


y  y  x .
Multiplying both sides of this DE via the integrating factor I ( x)  e 
1 dx
 e x
gives
d x
dx
 e y   xe  x .
Using integration by parts gives the general solution as
y ( x)  Ae x  x  1 .
There are two interesting facts about this general solution. To discuss these facts write
the solution as
y ( x)  yc ( x)  y p ( x )
where
yc ( x )  Ae x and y p ( x )   x  1 .

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.

Example 2: Find the general solution to the DE


y   y  cos( x) .

Solving via an integrating factor gives the general solution as


1 1
y ( x)  Ae x  sin( x)  cos( x) .
2 2
Once again writing this as
y ( x)  yc ( x)  y p ( x )
where
1 1
yc ( x )  Ae x and y p ( x)  sin( x )  cos( x ) ,
2 2

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 .

The general solution to this DE, found via an integrating factor, is


y ( x)  Ae x  xe x .
Letting
yc ( x )  Ae x and y p ( x )  xe 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

ET 1*: If yc ( x) is the general solution to


ay  by  0
and y p ( x) is any particular solution to
ay  by  f ( x)
show that
y ( x)  yc ( x)  y p ( x )
is also a solution to
ay  by  f ( x) .

§2 The Method of Undetermined Coefficients

We return now to the problem of finding solutions to non-homogeneous second order


linear DEs with constant coefficients, i.e. to DEs of the form

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.

It is easy to show that y ( x)  yc ( x)  y p ( x ) is a solution to the non-homogeneous DE


but how do we know that we have found all such solutions, i.e. that we have found the

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 (   yp )  b(   y p )  c(  y p )
 (a   b   c )  (ayp  byp  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.

Thus to solve a non-homogeneous second order DE with constant coefficients we have


to first find the complementary solution, then find any particular solution and then add these
solutions together. We already know how to find the complementary solution (see DEs (IV))
so all that remains is to work out how to find a particular solution, y p . The method of
undetermined coefficients tries to find y p by guessing that the form that y p should take is a
linear combination of the non-homogeneous term, f ( x ) , and its derivatives.

Example 4: Find a particular solution to the DE


y   2 y  3 y  4 x 2 .

Here the non-homogeneous term is f ( x)  4 x 2 . This is a 2nd degree polynomial. The


first and second derivatives of this will be a linear polynomial and a constant
respectively. Thus we guess that a particular solution can found of the form
y p ( x)  Ax 2  Bx  C , (1)
where A, B and C are coefficients to be determined by substituting into the DE. Now,
from (1)
y p  2 Ax  B
y p  2 A .
Substituting into the DE gives
yp  2 yp  3 y p  4 x 2
(2 A)  2(2 Ax  B)  3( Ax 2  Bx  C )  4 x 2
(3 A) x 2  (4 A  3B) x  (2 A  2 B  3C )  4 x 2 .
Thus for y p to be a solution

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 .

Non-Homogeneous Term Form of Particular Solution

f ( x )  ae kx y p ( x )  Ce kx

f ( x )  a sin(kx) y p ( x)  C1 sin(kx)  C2 cos(kx )

f ( x)  a cos( kx) y p ( x)  C1 sin(kx)  C2 cos(kx )


n n
f ( x )   an  i x n  i y p ( x)   Cn i x n i
i 0 i 0

( ) = a linear combination
( ) of ( ) and its derivatives
( )
i.e. y ( ) = ( )

Table 1

Example 5: Find the general solution to



x  6 x  8 x  8sin(2t ) .

The first step is to find the general solution to the homogeneous DE



x  6 x  8 x  0 .
The characteristic equation for this DE is
r 2  6r  8  0
which has solutions
r  2, 4 .
Thus the complementary solution is
xc (t )  Ae 2 t  Be 4 t .
The next step is to find a particular solution to the non-homogeneous DE. Using the
method of undetermined coefficients we try a particular solution of the form
x p (t )  C1 sin(2t )  C2 cos(2t )
where C1 and C2 are the coefficients to be determined. Now

Page 49
Differential Equations (V) - Lecture Notes

x p (t )  2C1 cos(2t )  2C2 sin(2t ) ,



x p (t )  4C1 sin(2t )  4C2 cos(2t ) .
For x p (t ) to be a solution

x p  6 x p  8 x p  8sin(2t )
and so, on substituting
{4C1 sin(2t )  4C2 cos(2t )}
6{2C1 cos(2t )  2C2 sin(2t )}
8{C1 sin(2t )  C2 cos(2t )}  8sin(2t )
which simplifies to
(4C1  12C2 ) sin(2t )  (12C1  4C2 ) cos(2t )  8sin(2t ) .
Equating coefficients on each side of the equation gives
4C1  12C2  8
12C1  4C2  0 .
Solving these equations gives
1 3
C1  , C2  
5 5
and so a particular solution is
1 3
x p (t )  sin(2t )  cos(2t ) .
5 5
Combining the particular solution with the complementary solution gives the general
solution
1 3
x(t )  Ae 2 t  Be 4t  sin(2t )  cos(2t ) .
5 5

Example 6: Solve the initial-value problem
y   3 y  5e 2 x
y (0)  1 , y(0)  2 .

To solve the initial-value problem we have to begin by finding the general


solution to the DE. Since this DE is a non-homogeneous second order DE with constant
coefficients we have to first find the general solution to the associated homogeneous
DE
y   3 y   0 .
The characteristic equation for this DE is
r 2  3r  0
which has solutions
r  0, 3 .
Thus the complementary solution is
yc ( x)  A  Be3 x .
For the particular solution try a function of the form
y p ( x)  Ce 2 x .
Then
y p ( x )  2Ce 2 x

Page 50
Math1120 - Mathematics II

y p ( x )  4Ce 2 x .
For this to be a solution
y p  3 yp  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  Be3 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

If the non-homogeneous term f is itself a solution to the associated homogeneous DE


then the form that we guess for the particular solution has to change. Guided by our
experience from non-homogeneous first order constant coefficient DEs (see §1, Example 3)
what we try for the particular solution is to multiply the usual form by x (or x 2 , x3 etc. if
necessary) so that no term in the particular solution is itself a solution to the homogeneous
DE.

Example 7: Find the general solution to


d 2 u du
  2u  et .
dt 2 dt

The general solution to the associated homogeneous DE, i.e.


d 2u du
  2u  0 ,
dt 2 dt
is the complementary solution to the given DE. Thus
uc (t )  Aet  Be2 t .
We can see here that the non-homogeneous term f ( x)  e x is a solution to the
homogeneous DE (put A  1 and B  0 into uc (t ) ). Obviously then, trying a particular
solution of the form

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

Example 8: Solve the initial-value problem


y   y  x
y (0)  1 , y(0)  1 .

The associated homogeneous DE is


y   y  0 .
Thus the complementary solution is
yc ( x )  Ae  x  B .
Since the non-homogeneous term is f ( x )  x the usual form that we would try for the
particular solution would be
y p ( x )  C1 x  C2 .
However this contains a constant term and we can see from the complementary solution
(put A  0 ) that a constant will satisfy the homogeneous DE. Thus the constant term in
the particular solution will not work and we must modify the particular solution. So
instead try a particular solution of the form
y p ( x)  C1 x 2  C2 x .
Thus
y p ( x )  2C1 x  C2 ,
y p ( x)  2C1 ,
Substituting into the DE gives

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

ET 1: Find the general solution to the DE


y   3 y   10 y  10 x 2  4 x

ET 2: Find the general solution to the DE


r   r  sin( x )

ET 3: Solve the initial-value problem


y   y  6 y  sinh( x) , y (0)  1 , y(0)  0

ET 4*: Find the general solution to the DE


u   u  xe x  3sin( x )

Page 53
Differential Equations (V) - Lecture Notes

Page 54

You might also like