Chapter 01
Chapter 01
Chapter 01
Chapter 1
DIFFERENTIAL EQUATIONS OF FIRST ORDER
Differential Equation
Definition: - A differential equation is an equation involving an unknown function and its derivatives.
For example
dy
(i) y cos x sin x
dx
2
d2y dy
(ii) xy 0
dx 2 dx
z z
(iii) x y nx
x y
Ordinary Differential Equation
Definition: - A differential equation is an ordinary differential equation (ODE) if the unknown function
depends on only one independent variable. For example
dy
(i) y cos x sin x
dx
2
d2y dy
(ii) xy 0
dx 2 dx
Partial Differential Equation
Definition: - A differential equation is a partial differential equation (PDE) if the unknown function
depends on two or more independent variable. For example
z z
(i) x y nx
x y
2u 2u
(ii) a 2 0
x2 t
Order of Differential Equation
Definition: - The order of the differential equation is the order of the highest derivative that occurs in
the differential equation. For example
2
d2y dy
(i) xy 0 , is a second order ordinary differential equation.
dx
2
dx
4u 2u
(ii) a 0 , is 4th order partial differential equation.
x 4
t 2
Exercise: Determine whether theses differential equations are linear or not, give order of each.
1) (1 x) y 4 xy 5 y cos x . It is linear equation of order 2.
4 4
d3y d2y d2y
2) x 3 2 2 y 0 . It is non-linear equation because of 2 and has order 3.
dx dx dx
3) yy 2 y 1 x 2 . It is non-linear equation because of yy and has order 1.
d3y 2
2 d y dy
4) x 3
3
x 2
4x 3y 0 . It is linear equation of order 3.
dx dx dx
y 1 ( y)2 . It is non-linear equation because of y and has order 2.
2
5)
6) (sin x) y (cos x) y 2 . It is linear equation of order 3.
d 2r k 1
7) 2 . It is non-linear equation because of 2 and has order 2.
r
2
dt r
Solution of a Differential Equation
Definition: - Any function f defined on interval I, which when substituted into a differential equation
reduces the equation to an identity, is said to be a solution of the differential equation on the interval I.
Example Prove that y xe x is the solution of y 2 y y 0 .
Solution: - Given y xe x
Differentiate w.r.t x . y e x xe x and y 2e x xe x
L.H.S= y 2 y y (2e x xe x ) 2(e x xe x ) xe x 0
R.H.S.=0
Hence y xe is the solution of the given differential equation.
x
-2-
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
PROBLEM SET 1.1
Verify that the indicated function is a solution of the given differential equations, where c1 ,c2 are
constants.
1) 2 y y 0 , y e x / 2
2) y 20 y 24 , y 65 65 e 20x
3) y 6 y 13 y 0 , y e3 x cos 2 x
4) y y tan x , y (cos x) ln(sec x tan x)
5) y 25 y 2 , y 5 tan 5x
6) 2 y y 3 cos x , y (1 sin x) 1 / 2
7) y 4 y 4 y 0 , y c1e2 x c2 xe 2 x
8) y y(1 y) , y 1cece x
x
SEPARABLE EQUATIONS
Definition: A differential equation of the type
F ( x)G( y)dx f ( x) g ( y)dy 0 (1)
is called variable separable or simply a separable equation.
How to find solution of Separable equation
Eq.(1) can be written as
F ( x) g ( y)
dx dy 0
f ( x) G( y)
i.e all x-terms with dx & y-terms with dy . Integrate for general solution of differential equation.
dy x2
Example-1 Solve the differential equation:
dx y (1 x 3 )
dy x2
Solution: - Given
dx y (1 x 3 )
Separating the variables, we get,
x2
ydy
1 x3
1 3x 2
Integrating ydy
3 1 x3
y2 1
log(1 x3 ) c1 , where c1 is the constant of integration
2 3
3 y 2 2 log(1 x3 ) c where c 6c1
dy
Example-2 Solve the differential equation y 2 sin x 0
dx
dy
Solution: - Given y 2 sin x 0
dx
Separating the variables, we get,
1
dy sin xdx
y2
y dy sin x dx
2
Integrating
y 21
cos x c1 where c1 is the constant of integration
2 1
-3-
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
1
cos x c1
y
1
c cos x where c c1 .
y
1
y
c cos x
Example-3 Solve the differential equation: ( xy 2 x y 2)dx ( x 2 2 x)dy 0
Solution: - Given equation ( xy 2 x y 2)dx ( x 2 2 x)dy 0
can be written as ( x 1)( y 2)dx x( x 2)dy 0
Separating the variables, we get,
1 ( x 1)
dy dx
y2 x( x 2)
1 11 1
dy dx by partial fraction
y2 2 x x2
1 1 1 1
Integrating dy dx
y2 2 x ( x 2)
1
ln( y 2) [ln x ln( x 2)] ln c where ln c is the constant of integration
2
1
ln( y 2) ln( x( x 2)) ln c
2
ln( y 2) ln( x( x 2) ) ln c
c
ln( y 2) ln( )
x( x 2)
c
y2 by taking anti-log
x( x 2)
c
y 2
x( x 2)
Example-4 Solve the differential equation: xe y sin xdx ydy 0
Solution: - Given equation xe y sin xdx ydy 0
Separating the variables, we get,
ye y dy x sin x dx
ye dy x sin x dx
y
Integrating
ye e (1)dy x( cos x) ( cos x)(1) dx
y y
-4-
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
PROBLEM SET 1.2
GENERAL SOLUTION Answers
Find a general solution.
P-1. y cos 5x c
1
5
dy dy
P-1. sin 5 x P-2. ( x 1) 2
P-2. y 13 ( x 1) c
3
dx dx
P-3. dx e3 x dy 0 P-4. dy ( y 1)2 dx 0 P-3. y 13 e
3 x
c
dy dy
P-5. x 4 y P-6. 2 xy 2 0 P-4. y 1 1/( x c)
dx dx
P-5. y cx P-6. y 1 /( x c)
4 2
dy dy
P-7. e3 x 2 y P-8. ex y e y e 2 x y 2 y
P-7. 3e 2e c
3x
dx dx
x 3 x
P-8. ye e e 13 e c
y y
dx y 1
2
P-9. y ln x
dy x P-9. y 2 2 y ln | y | 13 x3 ln | x | 19 x3 c
1
2
dy 2 y 3
2
2 1
P-10.
dx 4 x 5 P-10. c
2 y 3 4x 5
P-11. cosecy dx sec2 xdy 0
P-11. 4 cos y 2 x sin 2 x c
P-12. sin 3x dx 2 y cos 3 3x dy 0
P-12. y 16 sec 3x c
2 2
P-13. (e y 1)2 e y dx (e x 1)3 e x dy 0 1
P-14. x(1 y 2 )1/ 2 dx y(1 x 2 )1/ 2 dy P-13. (e 1)
y
12 (e x 1)2 c
P-14. (1 y ) (1 x ) c
2 1/ 2 2 1/ 2
dS dQ
P-15. kS P-16. k (Q 70)
dr dt P-15. S ce kr
dP dN P-16. Q ce kt 70
P-17. P P 2 P-18. N Nte t 2
dt dt ce t
P-17. P
dy xy 3x y 3 1 ce t
P-19.
dx xy 2 x 4 y 8 P-18. ln |N | te t 2 et 2 t c
dy xy 2 y x 2 x4
5
P-20. P-19. ce x y
dx xy 3 y x 3
y 3
dy dy
P-21. x 1 y 2 P-22. (e x e x ) y 2 ( y 1) 2
dx dx P-20. ce x y
INITIAL VALUE PROBLEM ( x 3) 5
P-21. y sin( 12 x c)
2
Solve the initial value problem.
dx
P-23. 4( x 2 1) , x( / 4) 1 1
dt P-22. y 1
tan e x c
dy y 2 1
P-24. , y(2) 2 P-23. x tan(4t 34 )
dx x 2 1
y 1 x 1
P-25. x 2
dy
y xy , y(1) 1 P-24. or y x
dx y 1 x 1
11 / x 2t
P-26.
dy
2 y 1, y(0) 52 P-25. xy e , P-26. y 2e 12
dt
P-27. 1 y 2 dx 1 x 2 dy 0 , y(0) 3 / 2 P-27. y 12 x 1
2
3 1 x2
P-28. (1 x 4 )dy x(1 4 y 2 )dx 0 , y(1) 0
1
P-28. tan 2 y tan x
1 2 1
4
-5-
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
HOMOGENEOUS EQUATIONS
Homogeneous Function
Definition: A function f ( x, y) is called homogeneous of degree n , if
f (tx, ty ) t n f ( x, y) (1)
Where t is a non-zero real number.
x10 y10
Examples f ( x, y ) 2
x y2
(tx )10 (ty )10 t10 ( x10 y10 ) 8 x10 y10 8
f (tx , ty ) 2 2 t 2 t f ( x, y)
(tx ) 2 (ty ) 2 t (x y2 ) x y2
x10 y10
Thus f ( x, y ) is a homogeneous function of order 8.
x2 y2
Homogeneous Differential Equation
Definition: A first order differential equation
dy
f ( x, y ) (1)
dx
is said to be homogeneous if f ( x, y) is a homogeneous function of any degree.
If equation (1) is written in the form
M ( x, y) dx N ( x, y)dy 0 (1)
then it is called homogeneous if M ( x, y) and N ( x, y) are homogeneous functions of same degree.
The homogeneous differential equation can be transformed into a separable equation by making
substitution
y ux
along with its corresponding derivative
dy du
ux
dx dx
The resulting equation in variables u and x is solved as a separable differential equation, the required
solution is obtained by back substitution.
dy 2 y 4 x 4
Example-1 Solve the differential equation:
dx xy 3
dy 2 y 4 x 4
Solution: - Given (1)
dx xy 3
dy
This differential is not separable. Instead it has the form f ( x, y ) , with
dx
2 y 4 x4
f ( x, y )
xy 3
2(ty ) 4 (tx ) 4 t 4 (2 y 4 x 4 ) 0 2 y 4 x 4
where f (tx , ty ) t t 0 f ( x, y)
(tx )(ty )3 t 4 ( xy 3 ) xy 3
so it is homogenous of degree zero. Put y u x , along with its corresponding derivative
dy du
ux
dx dx
in Equation(1), we get
d u 2(ux) 4 x 4
ux
dx x(ux)3
-6-
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
d u 2u 4 1
ux
dx u3
d u 2u 4 1
x u
dx u3
d u u4 1
x 3
dx u
Separating the variables, we get,
u 3d u dx
u 4 1 x
u 3d u dx
Integrating 4 4 4
u 1 x
ln | u 1 | 4 ln | x | ln c
4
ln | u 4 1 | ln | cx 4 |
u 4 1 cx 4 by taking anti-log
4
y
1 cx
4
by back substitution u y / x
x
y 4 cx 8 x 4
dy x 2 y 2
Example-2 Solve the differential equation: , y(1) 2
dx xy
dy x 2 y 2
Solution: - Given (1)
dx xy
dy
This differential is not separable. Instead it has the form f ( x, y ) , with
dx
x2 y 2
f ( x, y )
xy
(tx ) 2 (ty ) 2 t 2 ( x 2 y 2 ) 0 x 2 y 2
where f (tx , ty ) 2
t t 0 f ( x, y)
(tx )(ty ) t ( xy ) xy
so it is homogenous of degree zero. Put y u x , along with its corresponding derivative
dy du
ux
dx dx
in Equation(1), we get
d u x 2 (ux) 2
ux
dx x(ux)
d u 1 u 2
ux
dx u
d u 1 u 2
x u
dx u
du 1
x
dx u
Separating the variables, we get,
dx
u du
x
-7-
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
dx
Integrating udu
x
2 u ln | x | c
1 2
u 2 2 ln | x | 2c
u 2 ln( x)2 k k 2c by taking anti-log
2
y
ln x k
2
by back substitution u y / x
x
y 2 x 2 ln x 2 kx2 (2)
Given condition y(1) 2 (3)
Using (3) in (2) we get
y(1)2 (1)2 ln(1)2 k (1)2
(2)2 ln(1) k
k 4
Hence solution to the initial value problem is
y 2 x 2 ln x 2 4 x 2
Example-3 Solve the differential equation: y 2dx ( x 2 xy y 2 )dy 0 , y(0) 1
dy y2
Solution: - Given equation can be written as 2 (1)
dx x xy y 2
dy
This differential is not separable. Instead it has the form f ( x, y ) , with
dx
y2
f ( x, y ) 2
x xy y 2
(ty ) 2 t 2 y2 y2
where f (tx, ty ) 2 2 t 2
0
t 0 f ( x, y)
(tx ) (tx )(ty ) (ty )
2 2
t ( x xy y )
2
x xy y 2
-8-
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
1 u u2 1 1
u (1 u ) 2
u (1 u ) 2
1 1 dx
u (1 u)2 du x
1
ln | u | ln | x | c
u 1
y 1
ln y ln x c by back substitution u y / x
x x 1
x
ln y ln x ln x c
yx
x
ln y c (2)
yx
Given condition y(0) 1 (3)
Using (3) in (2) we get
(0)
ln y(0) c
y (0) 0
ln 1 c
c0
Hence solution to the initial value problem is
x
ln y 0
yx
PROBLEM SET 1.3
-9-
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
PROBLEM SET 1.3
GENERAL SOLUTION
Find a general solution.
y
dy
P-1. Solve the differential equation: x y xe x
dx
y
dy y xe x
Solution: - Given equation can be written as (1)
dx x
dy
This differential is not separable. Instead it has the form f ( x, y ) , with
dx
y
y xe x
f ( x, y )
x
ty y y
(ty ) (tx )e t ( y xe ) 0 y xe
tx x x
where f (tx , ty ) t t 0 f ( x, y)
tx tx x
so it is homogenous of degree zero. Put y u x , along with its corresponding derivative
dy du
ux
dx dx
in Equation(1), we get
ux
d u ux xe x
ux
dx x
d u x(u eu )
ux u eu
dx x
du
x eu
dx
Separating the variables, we get,
dx
e u du
x
dx
e du x
u
Integrating
eu ln | x | c
y
e x
ln | x | c by back substitution u y / x
dx
P-2. Solve the differential equation: y x 4 ye 2 x / y
dy
dx x 4 ye 2 x / y
Solution: - Given equation can be written as (1)
dy y
dy
This differential is not separable. Instead it has the form f ( x, y ) , with
dx
x 4 ye 2 x / y
f ( x, y )
y
tx 4tye 2(tx ) /(ty ) t ( x 4 ye 2 x / y ) 0 x 4 ye 2 x / y
where f (tx, ty ) t t 0 f ( x, y)
ty ty y
so it is homogenous of degree zero. Put x u y , along with its corresponding derivative
- 10 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
dx du
u y
dy dy
in Equation(1), we get
d u uy 4 ye 2(uy) / y
u y
dy y
d u y (u 4e 2u )
u y u 4e2u
dy y
du
y 4e 2u
dy
Separating the variables, we get,
dy
e 2u du 4
y
dy
e du 4 y
2u
Integrating
1 2u
2e 4 ln | y | c
1
2 e2 x / y 4 ln | y | c by back substitution u x / y
P-3. Solve the differential equation: (2 xy y)dx xdy 0
dy (2 xy y )
Solution: - Given equation can be written as (1)
dx x
dy
This differential is not separable. Instead it has the form f ( x, y ) , with
dx
(2 xy y )
f ( x, y )
x
(2 (tx )(ty ) ty ) t (2 xy y) 0 (2 xy y) 0
where f (tx, ty ) t t f ( x, y)
tx tx x
so it is homogenous of degree zero. Put y u x , along with its corresponding derivative
dy du
ux
dx dx
in Equation(1), we get
d u (2 xux ux)
ux
dx x
d u x( 2 u u )
ux 2 u u
dx x
du
x 2 u 2u
dx
Separating the variables, we get,
du dx
2 u 2u x
du dx
Integrating 2 u 2u x
dx du
x 2 u (1 u )
ln | x | ln | 1 u | c
- 11 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
ln | x | ln | 1 y / x | c by back substitution u y / x
P-4. Solve the differential equation: 2 x3 ydx ( x 4 y 4 )dy 0
dy 2 x 3 y
Solution: - Given equation can be written as (1)
dx x 4 y 4
dy
This differential is not separable. Instead it has the form f ( x, y ) , with
dx
2 x3 y
f ( x, y ) 4
x y4
2(tx )3 (ty ) t 4 (2 x3 y) 0 2x y
3
where f (tx , ty ) 4 4 t 4 t 0 f ( x, y)
(tx ) (ty )
4 4
t (x y ) 4
x y 4
d u 2u
x u
dx 1 u 4
d u 3u u 5 u (3 u 4 )
x
dx 1 u4 1 u4
Separating the variables, we get,
1 u4 dx
du
u (3 u )
4
x
1 u4 dx
Integrating u(3 u 4 ) du x
By partial fraction
1 u4 1 1 2 u3
u (3 u 4 ) 3 u 3 (3 u 4 )
1 1 2 u3 dx
3 u 3 (3 u 4 ) du x
1 1 1 4u 3 dx
3 u 6 (3 u 4 ) du x
1 1
ln | u | ln | 3 u 4 | ln | x | c
3 6
1
3 ln | y / x | 16 ln | 3 y4
x4
| ln | x | c by back substitution u y / x
P-5. Solve the differential equation: ( x y)dx xdy 0
dy y x
Solution: - Given equation can be written as (1)
dx x
dy
This differential is not separable. Instead it has the form f ( x, y ) , with
dx
- 12 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
yx
f ( x, y )
x
ty tx t ( y x) 0 y x 0
where f (tx, ty ) t t f ( x, y)
tx tx x
so it is homogenous of degree zero. Put y u x , along with its corresponding derivative
dy du
ux
dx dx
in Equation(1), we get
d u ux x
ux
dx x
d u x(u 1)
ux u 1
dx x
du
x 1
dx
Separating the variables, we get,
dx
du
x
dx
Integrating du x
u ln | x | c
y
e x
ln | x | c by back substitution u y / x
P-6. Solve the differential equation: ( y 3xy )dx (4 x 2 xy )dy 0 , y(1) 1 .
2
dy y 2 3xy
Solution: - Given equation can be written as (1)
dx 4 x 2 xy
dy
This differential is not separable. Instead it has the form f ( x, y ) , with
dx
y 2 3xy
f ( x, y ) 2
4 x xy
(ty ) 2 3(tx )(ty ) t 2 ( y 2 3xy ) 0 y 2 3xy 0
where f (tx, ty ) t t f ( x, y )
4(tx ) 2 (tx )(ty ) t 2 (4 x 2 xy ) 4 x 2 xy
so it is homogenous of degree zero. Put y u x , along with its corresponding derivative
dy du
ux
dx dx
in Equation(1), we get
d u (ux) 2 3x(ux)
ux
dx 4 x 2 x(ux)
d u ux 2 (u 3) u (u 3)
ux 2
dx x (4 u ) (4 u )
d u u (u 3)
x u
dx (4 u )
du u
x
dx 4 u
Separating the variables, we get,
- 13 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
4u dx
du
u x
4 dx
Integrating u 1du x
4 ln | u | u ln | x | c
4 ln | y / x | x ln | x | c
y
by back substitution u y / x
Given condition y(1) 1
4 ln | y(1) /(1) | y 1(1) ln | 1 | c
4 ln | 1 | 11 ln | 1 | c c 1
Hence solution of the given equation is
4 ln | y / x | xy ln | x | 1
dy
P-7. Solve the differential equation: ( x xy ) x y x 1/ 2 y 3 / 2 , y(1) 1 .
dx
dy y x x 1 / 2 y 3 / 2
Solution: - Given equation can be written as (1)
dx x xy
dy
This differential is not separable. Instead it has the form f ( x, y ) , with
dx
y x x 1 / 2 y 3 / 2
f ( x, y )
x xy
ty tx (tx ) 1 / 2 (ty )3 / 2 t ( y x x 1 / 2 y 3 / 2 ) 0 y x x 1 / 2 y 3 / 2
where f (tx, ty ) t t 0 f ( x, y)
tx (tx )(ty ) t ( x xy ) x xy
so it is homogenous of degree zero. Put y u x , along with its corresponding derivative
dy du
ux
dx dx
in Equation(1), we get
d u ux x x 1 / 2 (ux)3 / 2
ux
dx x x(ux)
d u x(u 1 u 3 / 2 ) u 1 u 3 / 2
ux
dx x(1 u ) 1 u
d u u 1 u3/ 2
x u
dx 1 u
d u u 1 u 3 / 2 u (1 u )
x
dx 1 u
du 1
x
dx 1 u
Separating the variables, we get,
dx
(1 u )du
x
Integrating
1 u du x
dx
u 23 u 3 / 2 ln | x | c
- 14 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
3/ 2
y 2 y
ln | x | c by back substitution u y / x
x 3 x
Given condition y(1) 1
2
1 ln | 1 | c
3
c 52
Hence solution of the given equation is
3/ 2
y 2 y 5
ln | x |
x 3 x 2
dy
P-8. Solve the differential equation: ( x y 2 xy ) y , y(1) 1 .
dx
dy y
Solution: - Given equation can be written as (1)
dx x y 2 xy
dy
This differential is not separable. Instead it has the form f ( x, y ) , with
dx
y
f ( x, y )
x y 2 xy
ty ty y
where f (tx, ty ) t0 t 0 f ( x, y)
tx (ty ) (tx )(ty ) t ( x y xy )
2 2
x y xy
2
- 15 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
1 1
du
dx
2 1 u x
u 1
u
1 1 / 2 1 1 dx
1 du
u u 2
u x
1 1 / 2 1 1 dx
Integrating 1 u u 2 u du x
1
1
1 2
1
u ln | u | ln | x | c
1
1
2
1
2 1 ln | u | ln | x | c
u
1 2
2 u u ln | u x | c
u
2
x y y
2 ln | y | c by back substitution u y / x
y x x
Given condition y(1) 1
2
1 1 1
2 ln | 1 | c
1 1 1
c0
Hence solution of the given equation is
2
x y y
2 ln | y | 0
y x x
- 16 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
EXACT EQUATIONS
Definition: A differential equation
M ( x, y) dx N ( x, y)dy 0
M N
is an exact if
y x
Solution of an Exact Equation
If M ( x, y) dx N ( x, y)dy 0 (1)
is an exact equation, then there exist a function f ( x, y) c such that
f f
df dx dy 0
x y
M ( x, y) dx N ( x, y)dy 0
f f
Therefore, M ( x, y ) , N ( x, y ) .
x y
Integrating these equations and find f . Hence f ( x, y) c is the required solution of (1).
Example Solve the differential equation: 2 xydx ( x 2 1)dy 0
Solution: - Given 2 xydx ( x 2 1)dy 0 (1)
Let us compare (1) with M ( x, y) dx N ( x, y)dy 0 , we have
M ( x, y) 2 xy and N ( x, y) ( x 2 1) (2)
M N
2 x and 2x
y x
M N
i.e. .
y x
Hence the equation (1) is exact, so there exists a function f ( x, y) such that
f f
M ( x, y) and N ( x, y ) .
x y
f
Thus by (2) 2 xy (3)
x
f
and x2 1 (4)
y
Integrating (3) w.r.t x f x 2 y g ( y) , where g ( y) is constant of integration. Differentiate
this w.r.t y
f
x 2 g ( y) (5)
y
Comparing (4) and (5), we get g ( y) 1
Integrating g ( y) y .
Thus f ( x, y) x y y
2
- 17 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
( x, y)M ( x, y) dx ( x, y) N ( x, y)dy 0 (2)
is exact. the solution of (1) is obtained by solving the exact differential equation defined by (2). The
number of integrating factors of an equation may be infinite.
We list below (without proofs) some rules to find the integrating factors of equations of special types.
If M ( x, y) dx N ( x, y)dy 0 is not exact and
1 M N
P( x)
N y x
( x, y) e
p ( x ) dx
is a function of x alone, then
If M ( x, y) dx N ( x, y)dy 0 is not exact and
1 M N
P( y )
M y x
( x, y) e
p ( y ) dy
is a function of y alone, then
If M ( x, y) dx N ( x, y)dy 0 is not exact and is homogeneous with
xM y N 0
1
then ( x, y )
xM y N
If M ( x, y) dx N ( x, y)dy 0 is not exact and
M y f (xy ) , N x f (xy ) and x M y N 0
1
then ( x, y )
xM y N
Example Solve the differential equation: ( x 2 xy )dx dy 0
Solution: - Given ( x 2 xy )dx dy 0 (1)
Let us compare (1) with M ( x, y) dx N ( x, y)dy 0 , we have
M ( x, y) x 2 xy and N ( x, y) 1 (2)
M N M N
2 x and 0 i.e. .
y x y x
Hence the equation (1) is not exact. But
1 M N 2x 0
2 x P( x)
N y x 1
is a function of x alone. Now integrating factor is
( x, y) e e
p ( x ) dx 2 x dx
e x
2
( x 2 xy )e x dx e x dy 0
2 2
(3)
Let us compare (3) with M ( x, y) dx N ( x, y)dy 0 , we have
M ( x, y) ( x 2 xy )e x and N ( x, y) e x
2 2
(4)
M N M N
2 x e x and 2 x e x
2 2
i.e. .
y x y x
Hence the equation (4) is exact so there exists a function f ( x, y) such that
f f
M ( x, y) and N ( x, y ) .
x y
f
( x 2 xy )e x
2
Thus by (4) (5)
x
- 18 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
f
e x
2
and (6)
y
f ye x g ( x) ,
2
Integrating (6) w.r.t y where g (x) is constant of integration.
Differentiate this w.r.t x
f
2 xye x g ( x)
2
(7)
x
g ( x) xe x
2
Comparing (7) and (5), we get
g ( x) 12 e x .
2
Integrating
f ( x, y) ye x 12 e x
2 2
Thus
ye x 12 e x c
2 2
Hence general solution of (1) is
PROBLEM SET 1.4
Determine whether the given differential Answers
equation is exact. If it is exact, solve it.
P-1: x x 32 y 7 y c
2 2
P-1: (2 x 1)dx (3 y 7)dy 0
P-2: Not exact.
P-2: (2 x y)dx ( x 6 y)dy 0
P-3: 4 xy 52 x 2 2 y 4 c
P-3: (5x 4 y)dx (4 x 8 y 3 )dy 0
P-4: x sin y y cos x 12 y 2 c
P-4: (sin y y sin x)dx (cos x x cos y y)dy 0
P-5: (2 xy 2 3)dx (2 x y 4)dy 0 P-5: x 2 y 2 3x 4 y c
P-6: Not exact.
P-6: (2 y 1x cos 3x) y xy2 4 x3 3 y sin 3x 0
P-7: Not exact
P-7: ( x 2 y 2 )dx ( x 2 2 xy )dy 0 P-8: x ln x y ln x y c
P-8: (1 ln x xy )dx (1 ln x)dy P-9: xy 3 y 2 cos x x2 c
2
- 19 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
- 20 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
PROBLEM SET 1.5
Find the general solution of the following Answers
differential equations 3.5 x
P-1: y ce 0.8
P-1: y 3.5 y 2.8
P-2: y 4 y x P-2: y ce 14 x 161 .
4x
- 21 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
PROBLEM SET 1.5
GENERAL SOLUTION
Find a general solution.
dy
P-1 Solve the differential equation: 3.5 y 2.8
dx
dy
Solution: - Given equation is 3.5 y 2.8 (1)
dx
dy
Compare the equation (1) with p( x) y q( x) , we get
dx
p( x) 3.5
I .F e e
p ( x ) dx 3.5 dx
So integrating factor e3.5 x
Multiply (1) by e3.5 x , we get
dy
e3.5 x 3.5e3.5 x y 2.8e3.5 x
dx
d
( ye 3.5 x ) 2.8 e3.5 x
dx
Integrating both sides we get
ye3.5 x 2.8 e3.5 x dx
ye3.5 x 32..58 e3.5 x c
y e3.5 x (0.8 e3.5 x c)
y ce 3.5 x 0.8
dy
P-2 Solve the differential equation: 4y x .
dx
dy
Solution: - Given equation can be written as 4y x (1)
dx
dy
Compare the equation (1) with p( x) y q( x) , we get
dx
p( x) 4
I .F e e
p ( x ) dx 4 dx
So integrating factor e 4 x
Multiply (1) by e4 x , we get
d y 4 x
e 4 x e y xe 4 x
dx
d
( ye 4 x ) xe 4 x
dx
Integrating both sides we get
ye 4 x xe 4 x dx
ye 4 x x e4 e4 dx
4 x 4 x
ye 4 x 14 xe 4 x 161 e4 x c
y ce 4 x 14 x 161 .
dy
P-3 Solve the differential equation: ky e 2 kx .
dx
kx
Answer: - y ce 3k e , if k 0
1 2 kx
- 22 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
dy
P-4 Solve the differential equation: 6( y 2.5) tanh1.5 x .
dx
dy
Solution: - Given equation can be written as (6 tanh1.5 x) y 15 tanh1.5 x (1)
dx
dy
Compare the equation (1) with p( x) y q( x) , we get
dx
p( x) 6 tanh1.5x
I .F e e
p ( x ) dx 6 tanh1.5 xdx
So integrating factor e4 ln(cosh1.5 x ) sech 41.5x
Multiply (1) by sech 41.5x , we get
dy
sech 41.5 x 6 tanh1.5 x sech 41.5 x y 15 sech 41.5 x tanh1.5 x
dx
d
( y sech 41.5 x) 15sech 41.5 x tanh1.5 x
dx
Integrating both sides we get
y sech 41.5x (15sech 41.5x tanh1.5)dx
y sech 41.5x 10 sech 31.5x (1.5sech1.5x tanh1.5)dx
y sech 41.5x 10 sech41.5 x c
4
dx
dy
4 x 2 e 4 x / 3 y ( 4 x 2 x ) e ( 8 x 3 x ) / 6
3 3 3 2
e4 x / 3
dx
dy
( y e 4 x / 3 ) ( 4 x 2 x )e ( 8 x 3 x ) / 6
3 3 2
dx
Integrating both sides we get
(4 x 2 x)e(8 x 3 x
3 3 2
y e4 x /3 )/6
dx
e(8 x 3 x d ((8x3 3x 2 ) / 6)
3 3 2
y e4 x /3 )/6
e(8 x 3 x c
3 3 2
y e4 x /3 )/6
y e x ce 4 x
2 3
/2 /3
dy
P-6 Solve the differential equation: x3 3x 2 y 5 sinh 10 x .
dx
- 23 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
dy
Solution: - Given equation can be written as 3x 1 y 5 x 3 sinh 10 x (1)
dx
dy
Compare the equation (1) with p( x) y q( x) , we get
dx
p( x) 3x 1
I .F e e
p ( x ) dx 3 x 1dx
So integrating factor e3 ln x x3
Multiply (1) by x 3 , we get
dy
x3 3x 2 y 5 sinh 10 x
dx
d 3
( x y ) 5 sinh 10 x
dx
Integrating both sides we get
y x3 (5 sinh 10 x) dx
y x3 5 cosh1010x c
y ( 12 cosh10 x c) x 3
dy
P-7 Solve the differential equation: 1.25 y 5 , y(0) 6.6
dx
Answer: - y 2.6e1.25x 4
dy
P-8 Solve the differential equation: x2 3xy 1 / x , y(1) 1
dx
Answer: - y x 2 2 x 3
dy
P-9 Solve the differential equation: 2 y 4 cos 2 x , y( 14 ) 2
dx
Answer: - y cos 2 x sin 2 x e2 x / 2
dy
P-10 Solve the differential equation: 2 y sin 2 x 2ecos 2 x , y(0) 0
dx
Answer: - y 2 xe cos 2 x
dy
P-11 Solve the differential equation: tan x 2 y 8 , y( 12 ) 0
dx
Answer: - y 4 4 sin 2 x 4 cos 2 x
dy
P-12 Solve the differential equation: 4 y cot 2 x 6 cos 2 x , y( 14 ) 2
dx
Answer: - y sin 2 x 1/ sin 2 2 x
dy
P-13 Solve the differential equation: y tan x e 0.01x cos x , y(0) 0
dx
0.01x
Answer: - y 100(1 e ) cos x
dy
P-14 Solve the differential equation: y / x 2 2 xe1 / x , y(1) 13.86
dx
Answer: - y e ( x 4.1)
1/ x 2
dy
P-15 Solve the differential equation: cos 2 x 3 y 1 , y( 14 ) 43
dx
Answer: - y 13 e33 tan x
- 24 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
BERNOULLI EQUATION
Definition: A differential equation of the form
dy
p ( x) y q ( x) y n
dx
is called a Bernoulli differential equation.
How to solve Bernoulli Equation
dy
As p ( x) y q ( x) y n (1)
dx
is called Bernoulli equation. This equation is linear if first n 0 or 1 . Otherwise it is nonlinear. For n
is not zero or 1 equation (1) is reducible to linear equation. Dividing by y n , equation (1) becomes
dy
y n p( x) y1n q( x) (2)
dx
Let u y1n n 0 , n 1. (3)
Differentiate this w.r.t. x
du dy
(1 n) y n
dx dx
d y 1 d u
y n (4)
dx 1 n dx
Using (3) & (4) in (2), we get
1 du
p( x)u q( x)
1 n dx
du
(1 n) p( x)u (1 n)q( x)
dx
This is a linear in u and using u y1n we get solution.
dy
Example Solve the differential equation: Ay By 2
dx
dy
Solution: - Given equation can be written as Ay By 2 (1)
dx
This is a Bernoulli equation. Dividing by y n , (1) becomes
dy
y 2 Ay 1 B (2)
dx
Let u y 1 (3)
Differentiate this w.r.t. x
du dy
y 2
dx dx
d y du
y 2 (4)
dx dx
Using (3) & (4) in (2), we get
du
Au B
dx
du
Au B (5)
dx
du
This is a linear in u . Compare the equation (5) with p( x)u q( x) , we get
dx
- 25 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
p ( x) A
I .F e e e Ax
p ( x ) dx Adx
So integrating factor
Multiply (5) by e Ax , we get
du
e Ax e Ax Au Be Ax
dx
d
(ue Ax ) Be Ax
dx
Integrating both sides we get
ue Ax Be Ax dx
ue Ax B eA c
Ax
u ce Ax BA
Since u y 1 , this gives the general solution of (1)
y u1 ce Ax1 B
A
Answers
P-1: y 5.7 y 6.5 y 2 P-1: y 1/(ce 5.7 x
56..75 )
P-2: y y( xy 3 1) P-2: y 3 x 13 ce3 x
P-3: y 23 xy (e x sinh x) /(3 y 2 )
2
P-9: y 2 e x (1 3e2 x )
2
- 26 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
HOMOGENEOUS EQUATIONS
- 27 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.
AHMAD HASSAN (Lecturer) Department of Basic Sciences and Humanities
- 28 -
Faculty of Engineering & Technology, B. Z. University, Multan, Pakistan.