You are on page 1of 53

Solutions of Homework for Chapter (2)

First-Order Ordinary Differential Equations


Example (3):
dy 6 x 2  2 x  1
Solve the differential equation  .
dx cos y  e y

Solution
* The given differential equation is
dy 6 x 2  2 x  1
 .
dx cos y  e y

* By separating variables , we obtain


cos y  e  dy  6 x
y 2

 2 x  1 dx .
* Integrating both sides
  cos y  e  dy    6 x 
 2 x  1 dx .
y 2

Remember that :
x n 1
*  x dx  n
 C , n  1
n 1
*  cos x dx  sin x  C
 e dx  e  C
x x
*

* The general solution is


sin y  e y  2 x 3  x 2  x  C
where C is an arbitrary constant .

1
Example (4):
Solve the differential equation
 
3e x tan y dx  1  e x sec 2 y dy  0 .
Solution
* The given differential equation is
 
3e x tan y dx  1  e x sec 2 y dy  0 .
* By separating variables , we obtain
1  e  sec
x 2
y dy  3e x tan y dx .
1
* Multiplying both sides by
 1  e  tan y
x

sec 2 y 3 e x
dy  dx
tan y 1e x

sec 2 y 3ex
dy  x dx .
tan y 
e 1 
* Integrating both sides
sec 2 y ex
 tan y dy  3  e x  1 dx
Remember that :
2
g'  x 
*  g  x  dx  ln g  x   C
ln tan y  3 ln e x  1  ln C
where C is an arbitrary constant .
Remember that :
* ln x r  r ln x
* ln  ab   ln a  ln b

 
3
ln tan y  ln e  1 x
 ln C

 
3
ln tan y  ln C e  1 x

 
3
ln C e x 1
e ln t an y
e .
Remember that :
* e ln x  x , x  0
* The general solution is

 
3
tan y  C e  1 x
.

3
Example (6):
Solve the initial-value problem (IVP)
 
y '  1  y 2 tan x , y 0   3 .
Solution
* The given differential equation is
dy
dx

 1  y 2 tan x .
* By separating variables , we obtain
1
dy  tan x dx .
1 y 2

* Integrating both sides


1
 1  y 2 dy   tan x dx .
Remember that :
1 1 1  x 
*  2 dx  tan    C
a x 2 a a 
*  tan x dx  ln sec x  C

* The general solution is


tan1 y  ln sec x  C
where C is an arbitrary constant .
* To find the value of the constant C , we use the initial
condition y 0   3 , i.e. y  x when x  0
tan 1 3  ln sec 0  C
Remember that :
4

* sec 0  1 , ln 1  0 , tan 1 3  60 
3

 
 0 C  C  .
3 3
* Then the particular solution is

tan1 y  ln sec x  .
3

Equations Reducible to Separable :


Procedure for Solving Equations Reducible to Separable (2.4) :

Example (9):
Solve the differential equation y '   8 x  2 y  1  .
2

Solution
* The given differential equation is
y '  8 x  2 y  1  .
2

* Put z  8 x  2 y  1 , then
5
dz dy dy 1  dz 
8 2     8 .
dx dx dx 2  dx 
* Substituting in the given equation
1  dz 
  8   z 2
2  dx 
dz
 2z 2 8 .
dx
* By separating variables , we obtain
dz
 dx .
2z 82

* Integrating both sides


1 1

2 z 4 2
dz   dx

Remember that :
x n 1
*  x dx 
n
C , n  1
n 1
1 1 1  x 
*  2 dx  tan   C
a x 2 a a 
1 z 
t an 1    x  C 1
4 2 
where C 1 is an arbitrary constant .
z 
tan 1    4 x  C .
2 
* Put z  8 x  2 y  1 , then the general solution is

6
8 x  2 y 1 
tan 1    4 x C
 2 
where C is an arbitrary constant .

2.2 Homogeneous Equations :


.

Example (11):
Solve the differential equation

 
x 3  y 2 y 2  x 2 dx  xy x 2  y 2 dy  0 .

Solution
* The given differential equation is

 
x 3  y 2 y 2  x 2 dx  xy x 2  y 2 dy  0 .

* Since the two functions


M x , y   x 3  y 2 y 2  x 2 , N  x , y   x y x 2  y 2
homogeneous of the same degree n  3 , then the given
differential equation is homogeneous , and we can put it in the
form


xy x 2  y 2 dy  x 3  y 2 y 2  x 2 dx 
dy x 3  y 2 y 2  x 2
 . 1 
dx xy x  y
2 2

7
y
* Put v , then
x
dy dv
yvx  v x .
dx dx
* Substituting in equation  1 

dv x 3  v 2 x 2 v 2 x 2  x 2
v x 
dx x vx x 2  v 2 x 2
1 v 2 v 2  1

v v 2 1
1
 v .
v v 1
2

* By separating the two variables x and v , we obtain


dv 1
x 
dx v v 2  1
1
v v 2  1 dv  dx .
x
* Integrating both sides
1 1
   
2
2 v v 1 dv dx
2 x
Remember that :
n 1
 g  x  
*   g  x   . g'  x  dx 
n
 C , n  1
n1
g'  x 
*  dx  ln g  x   C
g  x
8
 
3/ 2
1 v
2
1
 ln x  ln C
2 3
2
where C is an arbitrary constant .
Remember that :
* ln  ab   ln a  ln b
1
 
3/ 2
v 2 1  ln C x .
3
y
* Put v  , then the general solution is
x
3/ 2
 y  
 x   1   3 ln C x .
  

Example (13):
Solve the initial-value problem (IVP)
y  y 
y '  sec    , y 1   .
x x 2
Solution
* The given differential equation is
dy y  y
 sec    . 1 
dx x x
* Equation  1  is homogeneous .
y
* Put v , then
x

9
dy dv
yvx  v x .
dx dx
* Substituting in equation  1 
dv
v x  sec v  v .
dx
* By separating the two variables x and v , we obtain
dv
x  sec v
dx
dv dx

sec v x
1
cos v dv  dx .
x
* Integrating both sides
1
 cos v dv   x dx
Remember that :
*  cos x dx  sinv  C
1
*  x dx  ln x  C
sinv  ln x  C
where C is an arbitrary constant .
y
* Put v  , then the general solution is
x
 y
sin    ln x  C .
 x
11
* To find the value of the constant C , we use the initial
 
condition y  1   , i.e. y  when x  1 .
2 2
 / 2 
sin    ln 1  C
 1 
Remember that :

* sin  1 , ln 1  0
2
1  0 C  C  1.
* Then the particular solution is
 y
sin    ln x  1 .
 x
Equations Reducible to Either Homogeneous or
Separable :

Example (17):
Solve the differential equation
2 x y 4
  
 sin y dx  4 x 2 y 3  x cos y dy  0 .
Solution
* The given differential equation is
2 x y 4
  
 sin y dx  4 x 2 y 3  x cos y d y  0 .
* Comparing the given equation with the equation
M  x , y  dx  N  x , y  dy  0 .
* Then

11
M  x , y   2 x y 4  sin y , N  x , y   4 x 2 y 3  x cos y .
* Since
 M  x , y    N  x , y  
  8 xy  cos y   
3
 8 xy  cos y  ,
3

  y    x 
then the given equation is exact .
* The solution of given equation can be put in the form
F  x , y   C , where
F  x , y    M  x , y  dx  g  y 

 
  2 xy 4  sin y dx  g  y 
 x 2 y 4  x sin y  g  y  .
Remember that :
x n 1
*  x dx 
n
 C , n  1
n 1
F  x , y 
* To find g  y  put  N x , y 
y
4 x 2 y 3  x cos y  g'  y   4 x 2 y 3  x cos y .
* Then g'  y   0 , and
g y  C1
where C 1 is an arbitrary constant .
* The general solution is F  x , y   C , then

x 2 y 4  x sin y  C .

12
Example (19):
Solve the initial-value problem (IVP)
 1 
tan y  2  dx   x sec 2
y   dy  0 , y 0   1 .
 y 
Solution
 1
tan y
 2  dx   x sec 2 y   d y  0 .
 y 
* Comparing the given equation with the equation
M  x , y  dx  N  x , y  dy  0 .
1
* Then M  x , y   tan y  2 , N  x , y   x sec 2 y  .
y
* Since
 M  x , y    N  x , y  
  sec 2
y     sec 2
y  ,
 y   x 
then the given equation is exact .
* The solution of given equation can be put in the form
F  x , y   C , where
F  x, y    M  x, y  dx  g  y 
   tan y  2  dx  g  y 
 x tan y  2 x  g  y  .
Remember that :
x n 1
*  x dx 
n
 C , n  1
n 1

13
F  x , y 
* To find g  y  put  N x , y 
y
1
x sec 2 y  g'  y   x sec 2 y  .
y
1
* Then g'  y   , and
y
1
g y    dy  ln y .
y
Remember that :
1
*  dx  ln x  C
x
* The general solution is F  x , y   C , then

x tan y  2 x  ln y  C .
* To find the value of the constant C , we use the initial
condition y 0   1 , i.e. y  1 when x  0 .
0  t an 1  2 0   ln 1 C
Remember that :
* ln 1  0
0 0 0  C  C 0 .
* Then the particular solution is
x tan y  2 x  ln y  0

14
Example (23):
Solve the differential equation
1 dy 2
 2 y  x ex .
x dx x
Solution
* The given differential equation is
1 dy 2
 2 y  x ex .
x dx x
* Multiplying both sides of the given equation by x
dy 2
 y  x2 ex . 1 
dx x
* Comparing equation  1  with the standard form of linear
equation
dy
 P x  y Q x  . 2 
dx
2
* Then P x    , Q x   x 2 e x .
x
* Then the integrating factor is
P  x  dx
  x  e 
2 1
 x dx 2 ln
1 1
 x   e  e  2 ln x  e ln x
e x2  2
 2
.
x x
Remember that :
g'  x 
*  dx  ln g  x   C
g  x

15
* ln x r  r ln x
* e ln x  x , x  0
n 
 x
n
, n is an even int eger
* x  xn 
  x , n is an odd int eger
 n

* Then the general solution is

1
y     x  Q  x  dx  C 
  x
where C is an arbitrary constant .
1   1  2 x 
y  
 1    x 2 
x e dx  C 

 2
x 
 x 2   e x d x  C 
Remember that :
1
*  e ax b dx  e ax b  C
a
* Then 
y  x2 e x  C  .

Example (25):
Solve the initial-value problem (IVP)
1
y '  y  3 x 2 , x  0 , y 1   1 .
x
Solution
* The given differential equation is
16
1
y'  y  3x2 . 1 
x
* Comparing equation  1  with the standard form of linear
equation
dy
 P x  y Q x  . 2 
dx
1
* Then P x   , Q x   3 x 2 .
x
* Then the integrating factor is
P  x  dx
  x  e 
1
 dx
  x  e x  e ln x
 x  x , x0 .
Remember that :
g'  x 
*  dx  ln g  x   C
g  x
* e ln x  x , x  0
x , x 0
* x 
x , x 0
* Then the general solution is
1
y     x  Q  x  dx  C 
  x
where C is an arbitrary constant .
1
y     x  3 x 2 d x  C 
x

17
1
   3 x 3 dx  C  .
x 
Remember that :
x n 1
*  x dx 
n
 C ,n  1
n1

1 3 4 
* Then y   x C  .
x 4 
* To find the value of the constant C , we use the initial
condition y  1   1 , i.e. y  1 when x  1 .
1 3 
1   1 4
C 
1 4 
3 1
1  C  C  .
4 4
* Then the particular solution is

y 
1
4x

3 x4  1  .

Example (27):
Solve the initial-value problem (IVP)
x y '  y   y 2 ln x , x  0 , y 1   1 .
Solution
* The given differential equation is
x y '  y   y 2 ln x .
18
* Dividing both sides by x
1 ln x 2
y' 
y y . 1 
x x
* The given equation  1  is Bernoulli  n  2 
dy
 P x  y  Q x  y n , n  1
dx
* Dividing both sides of equation  1  by y 2
dy 1 1 ln x
y 2  y  . 2 
dx x x
* Putting z  y 1 n  y  1

Remember that :
d n 1
 g  x    n  g  x   . g'  x 
n
*
dx
dz 2 dy 2 dy dz
y  y  .
dx dx dx dx
* Substituting in equation  2 
dz 1 ln x

 z  .
dx x x
* Multiplying both sides by  1
dz 1 ln x
 z  . 3 
dx x x
* Equation  3  is linear in z , and comparing with the standard
form of linear equation

19
dz
 P  x z  Q  x .
dx
1 ln x
* Then P x   , Q x   .
x x
* Then the integrating factor is
P  x  dx
  x  e 
1
 x dx
  x  e  e ln x
 x  x , x0 .
Remember that :
g'  x 
*  dx  ln g  x   C
g  x
* e ln x  x , x  0
x , x 0
* x 
x , x 0
* Then the general solution of  3  is
1
   x  Q  x  dx  C 
  x  
z

where C is an arbitrary constant .


1  ln x 
z   x dx  C 
x  x 
1
   ln x dx  C  .
x
* To evaluate the last integral we use the integration by parts
Let I   ln x dx
21
u  ln x dv  dx
1
du  dx v x
x
Remember that :
x n 1
*  x dx n
 C , n  1
n1
*  u dv  uv   v du
I  u v   v du
 x ln x   dx
 x ln x  x .
* Then
1
z   x ln x  x   C 
x
C
z  ln x  1  .
x
* Substituting z  y 1
* Then the general solution of  1  is
C
y 1  ln x  1  .
x
* To find the value of the constant C , weuse the initial
condition y  1   1 , i.e. y  1 when x  1 .
C
 1  1  ln 1  1 
1
Remember that :
* ln 1  0
21
C  2.
* Then the particular solution is
1 2
y  ln x  1  .
x

Example (30):
Solve the differential equation
dy
dx

 8 xy 2  4 x 4 x  1  y  8 x 3  4 x 2  1 ; 
if f  x   x is a given solution .
Solution
* The given differential equation is
dy
dx

 8 xy 2  4 x 4 x  1  y  8 x 3  4 x 2  1 .  1 
* Equation  1  is in the form of Riccati equation :
dy
 A x  y 2  B x  y C x  .
dx
* Since f  x   x is a given solution , we use the transformation
1
y  f x   , then
v
1 dy 1 dv
y x  and 1 2 .
v dx v dx
Remember that :
d n 1
        . g'  x 
n
* g x  n g x
dx
22
* Substituting in equation  1 
2
1 dv  1  1
1 2  8 x  x    4 x  4 x  1   x  
v dx  v  v

 8 x2 4 x 1 
 2x 1   2 4x 1
 8 x  x 2   2   4 x  4 x   x  
 v v   v v

 8 x3 4 x2 1 
16 x 2 8 x 16 x 2 4x
 8 x 3
 2  16 x 
3
4x2 
v v v v
8 x3 4 x2 1
8 x 4 x
 2
 1.
v v
1 dv  8 x 4 x
* Then  2  2  .
v dx v v
* Multiplying both sides by  v 2
dv
 8 x  4 xv
dx
dv
 4 x  2 v  . 2 
dx
* Equation  2  is linear in v , and we notice that it is separable
equation in the same time .
* By separating variables , we obtain
dv
 4 x dx .
2 v
23
* Integrating both sides
1
 2  v dv   4  x dx

Remember that :
g'  x 
*  dx  ln g  x   C
g x 
x n 1
*  x dx 
n
 C , n  1
n1
ln 2  v   2 x 2  ln C
where C is an arbitrary constant .
ln 2  v  ln C   2 x 2
2 v
ln  2 x2
C
Remember that :
a 
* ln    ln a  ln b
b 
* e ln x  x
2 v
ln
 2 x2
e e
C

2 v 2 x2
e
C
2 x2
2 v  C e .

24
1 1
* Since y  x  , then substituting v  .
v y x
* Then the general solution of  1  is

1 2 x2
2  C e .
y x

25
Solutions of Homework for Chapter (4)
Higher-Order Linear Differential Equations
with Applications
Example (4):
d3y d 2 y dy
Solve the differential equation 3
2 2
 2y 0 .
dx dx dx
Solution
* The given differential equation
y '''  2 y ''  y '  2 y  0 1 
is homogeneous linear differential equation with constant
coefficients .
* The characteristic equation (auxialiary equation) of the given
differential equation is
m3  2m2 m  2  0 2 
* Factorizing , we get
m 2 m  2   m  2   0
m  2  m 2 
1  0
 m  2  m  1  m  1   0
Remember that :
* a 2  b 2   a  b  a  b 
* The roots of  2  are m 1  2 , m 2  1 , m 3  1 . They are
distinct real roots .
* Then the general solution of  1  is

26
y  c1 e m 1 x  c 2 e m 2 x  c 3 e m 3 x
y  c1 e 2 x  c 2 e x  c 3 e  x
where c1 ,c 2 ,c 3 are arbitrary constants .

Example (6):
Solve the initial-value problem (IVP)
y ''  y  0 , y 0   5 , y ' 0   3 .
Solution
* The given differential equation
y ''  y  0 1 
is homogeneous linear differential equation with constant
coefficients .
* The characteristic equation (auxialiary equation) of the given
differential equation is
m2 1  0 2 
* Factorizing , we get
 m  1  m  1   0
* The roots of  2  are m 1  1 , m 2  1 . They are distinct
real roots .
* Then the general solution of  1  is

y  c1 e m 1 x  c 2 e m 2 x

y  c1 e x  c 2 e  x 3 
27
where c1 ,c 2 are arbitrary constants .
* To find the values of the two constants c1 ,c 2 we use the two
initial conditions .
* Using the first initial condition y 0   5 , i.e.
y  5 when x  0 , from  3  we get
5  c1 e 0  c 2 e 0
Remember that :
* e0  1
5  c1  c 2 4 
* Differentiating equation  1  , we obtain
y '  c1 e x  c 2 e  x 5 
* Using the second initial condition y ' 0   3 , i.e.
y '  3 when x  0 , from  5  we get
3  c1 e 0  c 2 e 0
3  c1  c 2 6 
* To find the values of the two constants c1 ,c 2 we solve the two
equations 4  and 6  .
* Adding 4  and 6  yields
8
8  2 c1  c1  4
2
* From 4  we obtain
c 2  5  c1  5  4  1
* Then the particular solution is
28
y  4 e x  e x .

Example (8):
d3y d 2y dy
Solve the differential equation 3
 4 2
 5 2y 0 .
dx dx dx
Solution
* The given differential equation
y '''  4 y ''  5 y '  2 y  0 1 
is homogeneous linear differential equation with constant
coefficients .
* The characteristic equation (auxialiary equation) of the given
differential equation is
m3 4m 2  5 m  2  0 2 
* To factorize , note that m  1 is one of the root of  2  as
m  1 satisfies it
Remember that :
Integer zero theorem :
* If a polynomial with int eger coefficients has an int eger
root , then this root is a factor of the cons tan t term .
* Using long division by the linear factor  m  1 

29
m2 3m  2
m 1 m3 4m 2  5 m  2

m3  m2
3m2  5 m 2
3m2  3m
2m  2
2m  2
0

* Equation  2  takes the form


m  1  m 2  3 m  2   0
 m  1  m  1  m  2   0
* The roots of  2  are  m 1  m 2  1  m    m 3  2  . They
are two equal real roots and one distinct real root .
* Then the general solution is
y  c 1  c 2 x  e m x  c 3 e m 3 x

y  c 1  c 2 x  e x  c 3 e 2 x
where c1 ,c 2 ,c 3 are arbitrary constants .

31
Example (10):
Solve the initial-value problem (IVP)
y ''  8 y '  16 y  0 , y 0   2 , y ' 0   1 .
Solution
* The given differential equation
y ''  8 y '  16 y  0 1 
is homogeneous linear differential equation with constant
coefficients .
* The characteristic equation (auxialiary equation) of the given
differential equation is
m 2  8 m  16  0 2 
* Factorizing , we get
 m  4  m  4   0
* The roots of  2  are m 1  m 2  4  m . They are equal real
roots .
* Then the general solution is
y  c 1  c 2 x  e m x

y  c 1  c 2 x  e 4 x 3 
where c1 ,c 2 are arbitrary constants .
* To find the values of the two constants c1 ,c 2 we use the two
initial conditions .
* Using the first initial condition y 0   2 , i.e.
y  2 when x  0 , from  3 

31
2  c 1  0  e 0
Remember that :
* e0  1
c1  2 4 
* Differentiating equation  3  , we obtain
y '  c1  c 2 x  4e 4 x  c 2 e 4 x
y '  4 c1  c 2 x   c 2  e 4 x 5 
* Using the second initial condition y ' 0   1 , i.e.
y '  1 when x  0 , from  5 
1  4 c1  0   c 2  e 0
 1  4 c1  c 2
c 2  1  4 c1
* From 4 
c 2  1  4  2   9
* Then the particular solution is
y  2  9 x  e4 x .

Example (12):
d 2 y dy
Solve the differential equation 2
  y 0 .
dx dx
Solution
* The given differential equation
y ''  y '  y  0 1 
32
is homogeneous linear differential equation with constant
coefficients .
* The characteristic equation (auxialiary equation) of the given
differential equation is
m2 m 1 0 2 
* This quadratic equation is not factorable using integers as its
descrimenant b 2  4 ac   3 is not positive perfect square ,
we use the quadratic formula
Remember that :
If ax 2  bx  c  0 ,
*
b  b 2  4 ac
then x 
2a
* 1  i
a 1 , b 1 , c 1

b  b  4 ac
2 1   1  2  4  1  1 
m 
2a 2 1 
1  3 1  i 3 1 3
    i
2 2 2 2
1 3
* The roots of  2  are m 1 ,2   i    i  . They are
2 2
conjugate complex roots .
* Then the general solution is
y  e  x c1 sin  x  c 2 cos  x 

33


1
x 3 3 
y e  c1 sin
2 x  c 2 cos x
 2 2 
where c1 ,c 2 are arbitrary constants .

Example (14):
Solve the differential equation y 4   13 y ''  36 y  0 .
Solution
* The given differential equation
y 4   13 y ''  36 y  0 1 
is homogeneous linear differential equation with constant
coefficients .
* The characteristic equation (auxialiary equation) of the given
differential equation is
m 4  13 m 2  36  0 2 
* Factorizing , we get
m 2
4  m 2

9 0
Remember that :
a 2  b 2   a  b  a  b 
*
a 2  b 2   a  i b  a  i b 
 m  2 i  m  2 i  m  3 i  m  3 i   0
* The roots of  2  are
m 1 ,2   i 2  1  i 1 , m 3 ,4   i 3   2  i  2 .
They are two distinct pairs of conjugate complex roots .
34
* Then the general solution is

y  e 1 x c1 sin  1 x  c 2 cos 1 x 


 e  2 x c 3 sin  2 x  c4 cos  2 x 
y  e 0 x c1 sin 2 x  c 2 cos 2 x 
 e 0 x c 3 sin 3 x  c4 cos 3 x 
Remember that :
* e0  1
y  c1 sin 2 x  c 2 cos 2 x  c 3 sin 3 x  c4 cos 3 x
where c1 ,c 2 ,c 3 ,c4 are arbitrary constants .

Example (16):
Solve the boundary-value problem (BVP)
 
y ''  2 y '  2 y  0 , y 0   1 , y '   0 .
2 
Solution
* The given differential equation
y ''  2 y '  2 y  0 1 
is homogeneous linear differential equation with constant
coefficients .
* The characteristic equation (auxialiary equation) of the given
differential equation is
m2  2m  2  0 2 

35
* This quadratic equation is not factorable using integers as its
descrimenant b 2  4 ac   4 is not positive perfect square ,
we use the quadratic formula
Remember that :
If ax 2  bx  c  0 ,
*
b  b 2  4 ac
then x 
2a
* 1  i
a 1 , b  2 , c  2

 b  b  4 ac
2 2   2  2  4  1  2 
m 
2a 2 1 
2  4 2  i 2
   1  i
2 2
* The roots of  2  are m 1 ,2  1  i    i  . They are
conjugate complex roots .
* Then the general solution is
y  e  x c1 sin  x  c 2 cos  x 

y  e  x c1 sin x  c 2 cos x  3 


where c1 ,c 2 are arbitrary constants .
* To find the values of the two constants c1 ,c 2 we use the two
initial conditions .
36
* Using the first condition y 0   1 , i.e. y  1 when x  0 ,
from  3 
1  e 0 c1 sin 0  c 2 cos 0 
Remember that :
* e 0  1 , sin 0  0 , cos 0  1
1  1 c 1 0  c 2 1 
c2  1 4 
* Differentiating equation  3  , we obtain
y '  e  x c1 cos x  c 2 sin x   e  x c1 sin x  c 2 cos x  3 
 
* Using the second condition y'   0, i.e.
2 

y '  0 when x  , from  3 
2
 
       
0 e 2
 c1 cos  c 2 sin   e
2
 1
c sin  c 2 cos 
 2 2  2 2
Remember that :
 
* sin  1 , cos 0
2 2


0 e 2   c1  c 2   0  c1  c 2  c1   c 2
Remember that :
* ex  0 , x 
* From 4 
c 1  1
37
* Then the particular solution is
y  e  x   sin x  cos x  .

Example (18):
Use the undetermined coefficients method to solve the
d 2y
nonhomogeneous differential equation 2
 y  x 2
.
dx
Solution
* The given differential equation
y ''  y  x 2 1 
is nonhomogeneous linear differential equation with constant
coefficients .
Step 1 :
* To solve equation  1  we obtain y c the complementary
function .
* The associated homogeneous differential equation of  1  is
y ''  y  0 2 
* The characteristic equation of the homogeneous differential
equation is
m2 1  0 3 
* Factorizing , we get
 m  1  m  1   0
* The roots of  3  are m 1  1 , m 2  1 . They are distinct
real roots .
* The complementary function is
38
y c  c1 e m 1 x  c 2 e m 2 x
y c  c1 e x  c 2 e  x
where c1 ,c 2 are arbitrary constants .
Step 2 :
* We obtain y p the particular solution .
* Since F  x   x 2 a polynomial of degree n  2 , then
y p  x k Q x  where Q  x  is a polynomial of the same
degree as F  x  , and since zero is not included in the roots of
characteristic equation  3  , then k  0 , and
y p  A x 2  B x C
y 'p  2 A x  B
y ''p  2 A
* Substituting in the given nonhomogeneos differential equation
 1  , we obtain

2 A  A x 2  B x C  x 2  4 
* Equating coefficients in both sides of identity 4 
coefficient of x 2 :  A  1  A  1
coefficient of x : B  0  B 0
constant term : 2 A  C  0  C  2 A  2  1   2

y p  x 2  2 .
Step 3 :

39
* Then the general solution of the given nonhomogeneous
equation  1  is
y  yc  y p

y  c1 e x  c 2 e  x  x 2  2 .

Example (20):
Use the undetermined coefficients method to solve the
nonhomogeneous differential equation
d 2y dy
2
 2  3 y  4 e x
.
dx dx
Solution
* The given differential equation
y ''  2 y '  3 y  4e x 1 
is nonhomogeneous linear differential equation with constant
coefficients .
Step 1 :
* To solve equation  1  we obtain y c the complementary
function .
* The associated homogeneous differential equation of  1  is
y ''  2 y '  3 y  0 2 
* The characteristic equation of the homogeneous differential
equation  2  is
m2  2m 3  0 3 
* Factorizing , we get
41
 m  1  m  3   0
* The roots of  3  are m 1  1 , m 2  3 . They are distinct
real roots .
* The complementary function is

y c  c1 e m 1 x  c 2 e m 2 x
y c  c1 e x  c 2 e 3 x
where c1 ,c 2 are arbitrary constants .
Step 2 :
* We obtain y p the particular solution .
* Since F  x   4e 1 x exponential function , then
y p  A x k e x , and since   1 is included in the roots
of characteristic equation  3  , then k  1 , and
y p  A x ex

y 'p  A  x e x  e x   A  x  1  e x

y ''p  A  x  1  e x  e x   A  x  2  e x
Remember that :
d g x 
* e  e g  x  . g'  x 
dx
* Substituting in the given nonhomogeneos differential equation
 1  , we obtain
A  x  2  e x  2 A  x  1  e x  3 Ax e x  4 e x  e x

41
Remember that :
* ex  0 , x 
4
4 A 4  A 1
4
y p  x ex .
Step 3 :
* Then the general solution of the given nonhomogeneous
equation  1  is
y  yc  y p

y  c1 e x  c 2 e 3 x  x e x .

Example (22):
Use the undetermined coefficients method to solve the
nonhomogeneous differential equation
d 2y dy
2
2  y  2 cos 3 x .
dx dx
Solution
* The given differential equation
y ''  2 y '  y  2 cos 3 x 1 
is nonhomogeneous linear differential equation with constant
coefficients .
Step 1 :
* To solve equation  1  we obtain y c the complementary
function .
42
* The associated homogeneous differential equation of  1  is
y ''  2 y '  y  0 2 
* The characteristic equation of the homogeneous differential
equation is
m2  2m 1  0 3 
* Factorizing , we get
 m  1  m  1   0
* The roots of  3  are m 1  1 , m 2  1 . They are equal
real roots .
* The complementary function is
y  c 1  c 2 x  e m x
y c  c 1  c 2 x  e  x
where c1 ,c 2 are arbitrary constants .
Step 2 :
* We obtain y p the particular solution .
* Since F  x   2 cos 3 x , then y p  x k  A sin  x  B cos  x  ,
and since  i 3 is not included in the roots of characteristic
equation  3  , then k  0 , and
y p  A sin 3 x  B cos 3 x
y 'p  3 Acos 3 x  3 B sin 3 x
y ''p   9 A sin 3 x  9 B cos 3 x
Remember that :

43
sin  g  x    cos  g  x   . g'  x 
d
*
dx
cos  g  x     sin  g  x   . g'  x 
d
*
dx
* Substituting in the given nonhomogeneos differential equation
 1  , we obtain
 9 A sin 3 x  9 B cos 3 x   2  3 A cos 3 x  3 B sin 3 x 
  A sin 3 x  B cos 3 x   cos 3 x
 8 A  6 B  sin 3 x  6 A  8 B  cos 3 x
4 
 0 sin 3 x  2 cos 3 x
* Equating coefficients in both sides of identity 4 
coefficient of sin 2 x : 8 A  6 B  0  4 A  3 B  0 5 
coefficient of cos 2 x : 6 A  8 B  2  3 A  4 B  1 6 
* Multiplying equation  5  by 4 and equation 6  by 3
16 A  12 B  0 7 
9 A  12 B  3 8 
* Adding 7  and  8 
3
25 A  3  A  9 
25
* From  5  and  9 
4 4 3  4
3 B  4 A  B   A    
3 3  25  25
3 4
yp  sin 3 x  cos 3 x .
25 25
44
Step 3 :
* Then the general solution of the given nonhomogeneous
equation  1  is
y  yc  y p

3 4
y  c 1  c 2 x  e  x  sin 3 x  cos 3 x .
25 25

Example (25):
Use the undetermined coefficients method to solve the
nonhomogeneous differential equation
y ''  3 y '  2 y  e x sin x .
Solution
* The given differential equation
y ''  3 y '  2 y  e x sin x 1 
is nonhomogeneous linear differential equation with constant
coefficients .
Step 1 :
* To solve equation  1  we obtain y c the complementary
function .
* The associated homogeneous differential equation of  1  is
y ''  3 y '  2 y  0 2 
* The characteristic equation of the homogeneous differential
equation  2  is
m2 3m  2  0 3 
* Factorizing , we get
45
 m  1  m  2   0
* The roots of  3  are m 1  1 , m 2  2 . They are distinct
real roots .

* The complementary function is

y c  c1 e m 1 x  c 2 e m 2 x
y c  c1 e x  c 2 e 2 x
where c1 ,c 2 are arbitrary constants .
Step 2 :
* We obtain y p the particular solution .
* Since F  x   e x sin x , and since 1  i is not included in the
roots of characteristic equation  3  , then k  0 , and
y p  e x  A sin x  B cos x   A e x sin x  B e x cos x

  
y 'p  A e x cos x  e x sin x  B e x sin x  e x cos x 
  A  B  e x sin x   A  B  e x cos x


y ''p   A  B  e x cos x  e x sin x 

  A  B   e x sin x  e x sin x 
 2 A e x sin x  2 A e x cos x
* Substituting in the given nonhomogeneos differential equation
 1  , we obtain

46
 2 A e x sin x  2 A e x cos x 
 
3  A  B  e x sin x   A  B  e x cos x  2 
2  A e x sin x  B e x cos x   e x sin x

* Dividing both sides of equation 2  by e x

  A  B  sin x    A  B  cos x  sin x  0 cos x 3 


* Equating coefficients in both sides of identity  3 
coefficient of sin x :  A  B  1 4 
coefficient of cos x :  A  B  0 5 
* Adding 4  and  5 
1
2 A  1  A   6 
2
* From  5  and 6 
1
B  A  B 
2
 y p2  sin 2 x  cos 2 x

1 x
* Then yp  e   sin x  cos x  .
2
Step 3 :
* Then the general solution of the nonhomogeneous equation is

y  yc  y p

47
1 x
y  c1 e  c 2 e
x 2x
 e   sin x  cos x  .
2

Example (27):
Use the variation of parameters method to solve the
nonhomogeneous equation y ''  9 y  3 sec 3 x .
Solution
* The given nonhomogeneous differential equation
y ''  9 y  3 sec 3 x . 1 
Step 1 :
* To solve equation  1  we obtain y c the complementary
function .
* The associated homogeneous differential equation is
y ''  9 y  0 .
* The characteristic equation of the homogeneous differential
equation is
m2 9 0 .
* Factorizing
 m  3 i  m  3 i   0 .
Remember that :
a 2  b 2   a  b  a  b 
*
a 2  b 2   a  ib  a  ib 
* The roots are m 1  3 i , m 2  3 i , two conjugate complex
roots , m 1 ,2    i   0  3 i .
* The complementary function
48
y c  x   e  x c1 sin  x  c 2 cos  x 
y c  x   e 0 x c1 sin 3 x  c 2 cos 3 x 

y c  x   c1 sin 3 x  c 2 cos 3 x 2 
where c1 ,c 2 are arbitrary constants .
Step 2 :
* Since y 1  x   sin 3 x , y 2  x   cos 3 x
* Find the Wronskian
y1 y2 sin 3 x cos 3 x
W y1 ,y 2   ' 
'
y1 y2 3 cos 3 x  3 sin 3 x
  3 sin 2 x  3 cos 2 x
 
 3 sin 2 x  cos 2 x  3 .
Remember that :
* sin 2 x  cos 2 x  1
* Find
y 2 F x   cos 3 x 3 ses 3 x
v1 x    dx   dx
W y1 ,y 2  3
 1 
  cos 3 x   dx   1 dx  x .
 cos 3 x 
* Find
y 1 F x  sin 3 x 3 sec 3 x
v 2 x    dx   dx
W y1 ,y 2  3
1 3 sin 3 x
 
3 cos 3 x
dx
49
1
 ln cos 3 x .
3
Remember that :
g'  x 
*  dx  ln g  x   C
g x 
* Then the particular solution of nonhomogeneous equation will
be
y p x   v 1 x  y 1 x  v 2 x  y 2 x 
1
y p  x   x sin 3 x  ln cos 3 x cos 3 x
3
1
y p  x sin 3 x  ln cos 3 x cos 3 x . 3 
3
* From  2  and  3  , then the general solution of the
nonhomogeneous equation is
y x   y c x   y p x 
1
y  x   c1 sin 3x  c2 cos 3x  ln cos 3x cos 3x .
3

Example (29):
Use the variation of parameters method to solve the
nonhomogeneous equation y ''  y '  12 y  2 sinh 2 x .
Solution
* The given nonhomogeneous differential equation
y ''  y '  12 y  2 sinh 2 x . 1 
Step 1 :
51
* To solve equation  1  we obtain y c the complementary
function .
* The associated homogeneous differential equation is
y ''  y '  12 y  0 .
* The characteristic equation of the homogeneous differential
equation is
m 2  m  12  0 .
* Factorizing
 m  3  m  4   0 .
* The roots are m 1  3 , m 2  4 , two distinct real roots .
* The complementary function
y c  x   c1 e m 1 x  c 2 e m 2 x

y c  x   c1 e 3 x  c 2 e 4 x 2 
where c1 ,c 2 are arbitrary constants .
Step 2 :
* Since y 1  x   e 3 x , y 2  x  e4 x .
* Find the Wronskian
y1 y2 e 3 x e4 x
W y1 ,y 2   
y '1 y '2  3 e 3 x 4e4 x


 e 3 x 4e    3e e 
4x 2 x 4x

 4e x  3 e x  7 e x .
Remember that :
* e a e b  e a b
51
* Find

v1 x   
y 2 F x 
dx  
 
 e 4 x 2 sinh 2 x
dx
W y1 ,y 2  7e x

2 3x

7  e sinh 2 x dx

Remember that :
1
* sinh x  e x  e  x
2
 
1 x
 
2 3x x 2

7  e  2 e  e  dx


2 3x
7  e 4 
1 2 x
e  e 2 x
 2

 dx 
 e 
1
 5x
 e x  2e 3 x dx
14
Remember that :
1
*  e ax b dx  e ax b  C
a
1  1 5 x 2 3x 
  e  e ex  .
14 5 3 
* Find
y F x 
v 2 x    1
e  2 sinh
3 x 2
x
W y1 ,y 2 
dx   7e x
dx

2 2 x
 
2
e sinh x dx
7
52
2 2 x
 e
7
1 x

 2 e  e
x 2 

 dx


2 2 x
7  e 4 e
1 2 x
 e 2 x
 2

 dx 

1
14 
1  2e 2 x
 e 4 x
dx 
1  2 x 1 4 x 
 x e  e .
14  4 
* Then the particular solution of nonhomogeneous equation
will be
y p x   v 1 x  y 1 x  v 2 x  y 2 x 

y p x   
 1 5 x 2 3x

3
1
14
e 
3
e  e x 


e 3 x
 

1 
14 
 x  e 2 x

4
1 4 x  4 x
e  e

 
1 1 2  1  4x 1
   e 2 x   e 2 x    x e  e 2x
 
14  3 3  14  4
1  4x 2 2x 1 2 x 
yp   x e  e   e  . 3 
14  3 4 
* From  2  and  3  , then the general solution of the
nonhomogeneous equation is
y x   y c x   y p x 

1  4x 2 2x 1 2 x 
y  x   c1 e 3 x
 c1 e 4x
  x e  e   e  .
14  3 4 

53

You might also like