EQUATIONS OF ORDER ONE
Here we will study several elementary methods for solving first-order differential equations.
We begin our study of the methods for solving first-order differential equations by studying an
equation of the form Mdx + Ndy = 0 ; where M and N maybe functions of both x and y.
Some equations of this type are so simple that they can be put in the form A(x)dx + B(y)dy = 0.
Variable Separable Equations
Consider a differential equation that can be written in the form M( x )dx + N( y )dy = 0
where M is a continuous function of x alone and N is a continuous function of y alone. For this
type of equation, all x terms can be collected with dx and all y terms with dy, and a solution can
be obtained by integration. Such equations are said to be variable separable equations, and the
solution procedure is called separation of variables.
Example:
1) Find the general solution of the differential equation ( x2 + 4 ) y’ = xy.
Solution:
( x2 + 4 ) = xy ; ( x2 + 4 ) dy = xydx
xydx - ( x2 + 4 ) dy = 0 [ divide both terms by y and ( x2 + 4 ) ]
- = 0 ; ∫ - ∫ = ∫0
Since the equations are separable, integrating yields to:
ln ( x2 + 4 ) - ln( y ) = C
Simplifying further:
ln ( x2 + 4 ) - ln( y )2 = 2C ; lnA - lnB = ln and 2C = C1
ln = C1 ; = C2 ; x2 + 4 = C2y2
C3 ( x2 + 4 ) = y2
y = 𝑪𝟑 ( 𝒙𝟐 + 𝟒 )
𝒙𝟐
2) Find the particular solution of the equation xydx + 𝒆 ( y2 - 1 )dy = 0 with initial
condition of y(0) = 1.
Solution:
𝒙𝟐
Separating the variables: ( divide both terms by y and 𝒆 )
( )
+ = 0
( y - )dy = - x𝑒 dx ; ∫( 𝑦 − ) dy = - ∫ 2𝑥 𝑒 dx
- ln ( y ) = - 𝑒 + C
and from the initial condition y( 0 ) = 1
- ln ( 1 ) = - e0 + C
- 0 = - ( 1 ) + C thus C = 1
Therefore, the particular solution yields to:
y2 - ln ( y2 ) = - 𝑒 + 2(1)
Simplifying further;
𝟐
y2 - ln ( y2 ) + 𝒆𝒙 = 2
( 𝒚𝟐 𝟏 ) 𝒅𝒚
3) Find the general solution of the differential equation 𝒙𝒅𝒙
+ ylnx = 0
Solution:
( y2 + 1 ) + ylnx = 0 ; ylnx dx + ( y2 + 1 ) = 0 ( multilplied by )
Separating the variable, we have:
( )
x lnx dx + = 0 ; x lnx dx + ( y + ) dy = 0
Integrating both sides will yield to:
∫( 𝑦 + ) dy = + lny
∫ 𝑥 𝑙𝑛𝑥 dx ( by parts ) ; ∫ 𝑢𝑑𝑣 = 𝑢𝑣 − ∫ 𝑣𝑑𝑢
let u = lnx du = ; dv = x dx v =
thus: ∫ 𝑥 𝑙𝑛𝑥 dx = lnx - ∫ ( ) = lnx - ∫ dx = lnx -
Therefore, final answer will yields to:
+ lny + lnx - = C or 2y2 + lny4 + 2x2lnx - x2 = C1
4) Find the general solution of the differential equation
sec 2x ( 3y2 + 2y + 4 ) y’ = ( y3 + 4y )
( y3 + 4y ) dx - sec 2x ( 3y2 + 2y + 4 ) dy = 0
( )
cos2x dx - dy = 0 ;
( )
∫ 𝑐𝑜𝑠2𝑥 ( 2𝑑𝑥 ) - ∫ ( )
dy = ∫ 0
( ) ( )
sin2x - ∫ ( )
dy = sin2x − ∫ ( )
Integration by rational fraction:
( )
∫ = + [ multiplied by y ( y2 + 4 ) ]
( )
3y2 + 2y + 4 = ( y2 + 4 ) A + ( By + C ) y
3y2 + 2y + 4 = Ay2 + 4A + By2 + Cy
y2 ; 3 = A + B (1)
y ; 2 = C (2)
C ; 4 = 4A (3)
Solving simultaneously ; A = 1 B = 2 C = 2
Therefore:
( ) ( )
∫ dy = ∫ + ∫
( )
= ∫ + ∫ + 2∫
∫ ( u = y ; du = dy ) = ln y
∫ ( u = y2 + 4 ; du = 2y ) = ln ( y2 + 4 )
2∫ ( u= y a = 2 du = dy ) ; ∫ = tan-1
2∫ = 2 tan-1 = tan-1
Therefore, final solution will be:
sin2x - ln y - ln ( y2 + 4 ) - tan-1 = C
𝒚
sin2x - ln y2 - ln ( y2 + 4 )2 - 2 tan-1 𝟐
= C1
Exercise No. 5
Obtain the general/particular solution of the following variable separable differential
equations:
1) ( 1 - x ) y’ = y2
2) 2xyy’ = 1 + y2 when x = 2 ; y = -3
3) xy3dx + 𝑒 𝑑𝑦 = 0
4) x2dx + y ( x - 1 ) dy = 0 when x = -1 ; y = 1
5) ( xy + x ) dx = ( x2y2 + x2 + y2 + 1 ) dy
Homogeneous Equations
Some differential equations that are not separable in x and y can be make separable by a
change of variables. This is true for differential equations of the form y’ = f ( x, y ), where f is a
homogeneous function. The function given by f ( x, y ) is homogeneous of degree n if:
f ( ty, tx ) = tn f ( x, y )
where n is an integer.
A homogeneous differential equation is an equation of the form:
M ( x, y ) dx + N ( x, y ) dy = 0
where M and N are homogeneous functions of the same degree.
If M ( x, y ) dx + N ( x, y ) dy = 0 is homogeneous, then it can be transformed into a
differential equation whose variables are separable by the substitution,
y = vx and dy = vdx + xdv
or x = vy and dx = vdy + ydv
where v is a differentiable function of x or y .
Example:
1) Find the general solution of ( x2 - y2 ) dx + 3xydy = 0.
Solution:
Said equation are both homogeneous of degree 2, let y = vx ; dy = vdx + xdv ; by
substitution yields to:
( x2 - v2x2 ) dx + 3x ( vx ) ( vdx + xdv ) = 0
x2dx - v2x2dx + 3x2v2dx + 3x3vdv = 0
Re-arranging and separating the variables yields to:
x2 ( 1 + 2v2 ) dx + 3x3vdv = 0 dividing the terms by ( 1 + 2v2 ) and x3 ;
+ ( )
= 0 and integrating both sides yield to:
ln ( x ) + ln ( 1 + 2v2 ) = C
Simplifying the terms: 4 ln ( x ) + 3 ln ( 1 + 2v2 ) = C1
ln x4 + ln ( 1 + 2v2 )3 = C1 ; ln ( x4 ) ( 1 + 2v2 )3 = C1
x4 ( 1 + 2v2 )3 = C2 ; but v =
thereby:
x4 ( 1 + )3 = C2 ; x4 ( )3 = C2
Simplifying further yields to:
( x2 + 2y2 )3 = x2C2
Alternate solution : let : x = vy ; dx = ydv + vdy
( x2 - y2 ) dx + 3xydy = 0.
[ v2y2
- y2 ] [ ydv + vdy ] + 3 ( vy ) ydy = 0
v2y3dv + v3y2dy - y3dv - vy2dy + 3vy2dy = 0
y2dy ( v3 + 2v ) + y3dv ( v2 - 1 ) = 0 [ divide both terms by ( v3 + 2v ) and y3 ]
𝒅𝒚 𝒗𝟐 𝟏
+ dv = 0
𝒚 𝒗𝟑 𝟐𝒗
= = +
( )
v2 - 1 = Av2 + 2A + Bv2 + Cv
v2 ; 1 = A + B (1)
v ; 0 = C (2)
C ; -1 = 2A (3)
Solving simultaneously will results to: A =- B = and C = 0
( )
dv = - + then integrate:
ln v + ln ( v2 + 2 )
Final solution will be:
ln y - ln v + ln ( v2 + 2 ) = C ; ln y4 - ln v2 + ln ( v2 + 2 )3 = C1
( )
= C2 ; but v =
y4 ( + 2 )3 = ( ) C2 ; y4 ( )3 = ( ) C2
( )
= ( ) C2 ; ( x2 + 2y2 )3 = x2C2
2) Find the particular solution of example 1 if y ( 2 ) = -1
Solution:
Substitute value of x and y to the general solution { 22 + 2 ( -1 )2 }3 = ( 2 )2C2
( )
Giving the value of C2 as = = 54 that yields to a particular solution :
( x2 + 2y2 )3 = 54x2
3) Find the general solution of ( 2xy + y2 ) dx + ( x2 - xy ) dy = 0
Solution:
Let x = vy ; dx = vdy + ydv
[ 2 ( vy ) y + y2 ] [ vdy + ydv ] + [ ( vy )2 - ( vy ) y ] dy = 0
2v2y2dy + 2vy3dv + vy2dy + y3dv + v2y2dy - vy2dy = 0
3v2y2dy + y3 ( 2v + 1 ) dv = 0 by separation, multiply both terms by :
( )
dy + dv = 0 or 3 + (2 + 𝑣 dv ) = 0
Integrating both sides will results to:
3lny + 2lnv - = C but v = ; lny3 + ln ( )2 - = C
𝒚
ln ( y3 ) ( ) - = C ; ln x2y - = C
𝒙
Alternate solution:
Let y = vx ; dy = vdx + xdv
( 2xy + y2 ) dx + ( x2 - xy ) dy = 0
[ 2x ( vx ) + ( vx )2 ] dx + [ x2 - x ( vx ) ] [ vdx + xdv ] = 0
2vx2dx + v2x2dx + vx2dx + x3dv - v2x2dx - vx3dv = 0
3vx2dx + x3 ( 1 - v ) dv = 0 ( divide both terms by v and x3 )
( )
3 + = 0 ; 3 + - dv = 0
By integration it will results to:
3 lnx + lnv - v = C or lnx3 + lnv - v = C
But v = ; lnx3 + ln ( ) - = C
𝒚
ln x3 ( ) - = C ; ln x2y - = C
𝒙
Exact Equations
A differential equation of the form M ( x, y ) dx + N ( x,y ) dy = 0 is said to be as an exact
equations if M , N , and are continuous functions of x and y and if:
𝝏𝑴 𝝏𝑵
=
𝝏𝒚 𝝏𝒙
Let us now show that if this condition satisfies the equation, let ∅ ( 𝑥, 𝑦 ) be a function for
∅
which = M. The function ∅ is the result of integrating Mdx with respect to while holding y
∅ ∅
constant. Now = ; hence if = , then also = .
Let us integrate both sides of this last equation with respect to x, holding y fixed. In the
integration with respect to x, the “arbitrary constant “ maybe any function of y. Let us call it
B’(y), for ease in indicating its integral. Then integration of it with respect to x yields to:
∅
= N + B’(y)
Now a function F can be exhibited, namely,
F = ∅ ( x,y ) - B( y ) for which:
∅ ∅
dF = dx + dy - B’( y ) dy
= M dx + [ N + B’( y ) } dy - B’( y ) dy
= M dx + N dy
Hence, it is exact equation.
Example:
1) Solve the general solution of the given differential equation:
3x ( xy - 2 ) dx + ( x3 + 2y ) dy = 0
Solution:
= 3x2 and = 3x2 thus it is exact.
Therefore, its solution is F = c, where = M = 3x2y - 6x and = N = x3 + 2y .
Let us attempt to determine F from M from the equation = 3x2y - 6x. Integration of
both sides with respect to x, holding y constant yields to F = x3y - 3x2 + T( y ), where the
usual arbitrary constant in indefinite integration is now necessarily a function T( y ), as yet
unknown. To determine T( y ), we use the fact that the function F with T( y ) must also satisfy
the equation = x3 + 2y . Hence; x3 + T’( y ) = x3 + 2y and T’( y ) = 2y.
No arbitrary constant is needed in obtaining T( y ), since one is being introduced on the right
in the solution F = c. Then, T( y ) = y2. Thus, F = x3y - 3x2 + y2.
Finally, a set of solutions of the said equation is defined by:
x3y - 3x2 + y2 = C
2) Solve the general solution of the given differential equation:
( 3x2y - 2ycosx + 1 ) dx - ( 2sinx - x3 - y ) dy = 0
Solution:
= 3x2 - 2cosx and = - 2cosx + 3x2 ( exact )
Simpler solution will be, integrate both sides with respect to each derivatives,
∫( 3x2y - 2ycosx + 1 ) dx - ∫( 2sinx - x3 - y ) dy = ∫ 0
[ 3 y - 2y ( sin x ) + x ] - ( 2ysinx - x3y - ) = C
( x3y - 2ysinx + x ) + ( x3y - 2ysinx + ) = C
Eliminate one of the term/s common to both x and y and then simplify:
2x3y - 4ysinx + 2x + y2 = C
Exercise No. 6:
Find the general/particular solution of the given differential equation:
1) y’ = ( x - 2y )
2) ( 6x + y2 ) dx + y ( 2x - 3y ) dy = 0
3) ( y2 - 2xy + 6x ) dx - ( x2 - 2xy + 2 ) dy = 0
4) x ( 3xy - 4y3 + 6 ) dx + ( x3 - 6x2y2 - 1 ) dy = 0 ; y ( -1 ) = 2
5) ( cosxcosy - cotx ) dx = sinxsiny dy
6) [ 2x + ycos( xy ) ] dx + xcos( xy ) dy = 0
7) ( y - 𝑥 + 𝑦 ) = xy’ ; y ( 4 ) = -2
8) ( x3siny - x2 + 4y ) dy = ( 3x2cosy + 2xy - 3 ) dx