You are on page 1of 41

Lecture Notes 2 – First-Order and First-Degree Differential Equations 1

Engr. Caesar Pobre Llapitan

Topics:
I. The method of separation of variables
II. The method of transformation of variables
1. The homogeneous equation
2. Other special transformation
III. Exact differential equation
IV. Equations made exact by suitable integrating factor
1. Integrating factor found by inspection
2. The determination of integrating factor
V. The linear first-order equation
1. Bernoulli’s equation
VI. Numerical Method

I. THE METHOD OF SEPARATION OF VARIABLES

Learning Objectives
At the end of this section, the students should be able to
1. Explain the process of separating variables with first-order first degree differential equations.
2. Solve first-order first degree differential equations using separation of variables.

The general equation for a first-order and first-degree differential equation is

M dx + N dy = 0 (1)

where M and N are functions of x and y.

dy
The differential equation of the form = f ( x , y) is called separable, if f(x, y) = h(x) g(y); that is,
dx
dy
= h ( x ) g ( y ) (2)
dx

In order to solve it, perform the following steps:


a) Solve the equation g(y) = 0, which gives the constant solutions of (2);

b) Rewrite the equation (2) as


dy
= h ( x ) dx (3)
g( y)

and, then, integrate


dy

g( y) 
= h ( x ) dx

to obtain
G ( y) = H ( x) + C

c) Write down all the solutions; the constant ones obtained from step (1) and the ones given in
step (2);
Lecture Notes 2 – First-Order and First-Degree Differential Equations 2
Engr. Caesar Pobre Llapitan

d) If you are given an IVP, use the initial condition to find the particular solution. Note that it may
happen that the particular solution is one of the constant solutions given in step (1). This is why
Step 3 is important.

Examples:
Solve the following differential equations subject to the given conditions if there is any.
dy
1. x − y = 2x 2 y
dx

Solution:
Rewrite the equation in the form (1): M dx + N dy = 0

dy
x − y = 2x 2 y
dx
x dy − y dx = 2 x 2 y dx
( 2x y + y ) dx − x dy = 0
2

y ( 2 x + 1 ) dx − x dy = 0
2
 Mdx + N dy = 0

Observe that M = y (2x2 +1) and N = -x are be expressed explicitly as factors 0f x and y alone. Therefore,
the differential equation it is separable.

Thus:
(
y 2 x 2 + 1 dx − x dy = 0)
2x 2 + 1 dy
dx − =0
x y
 1 dy
  2x + x  dx −  y =c

x 2 + ln x − ln y = c
x
ln = c − x2
y
x
= e c − x = e c e x = Ce x
2 2 2

y
2
x = C ye x

2
Answer: x = C ye x

dy x 2 + 1
2. = y = 4 when x = -3
dx 2− y

Solution:
Writing the equation in the form M dx + N dy = 0 we obtain
dy x 2 + 1
=
dx 2−y
(x 2
)
+ 1 dx − ( 2 − y ) dy = 0
Lecture Notes 2 – First-Order and First-Degree Differential Equations 3
Engr. Caesar Pobre Llapitan

The equation is already separated; therefore, solve the DE by integrating the whole equation. Thus,

 ( x + 1 ) dx −  ( 2 − y ) dy = c
2

x3 y2
+ x + c 1 − 2 y + + c2 = c
3 2

Lumping the constants as one, we obtain the general solution as


x3 y2
+ x − 2 y + = c − c 1 − c2
3 2
x3 y2
+ x − 2y + =C
3 2

The particular solution of the DE is obtained by determining the value of the constant at the given
condition. Thus, substituting y = 4 and x = -3:
( −3 )3 ( 4 )2
+ ( −3 ) − 2 ( 4 ) + =C
3 2
−9 − 3 − 8 + 8 = C
C = − 12

Hence, the particular solution is

x3 y2
+ x − 2y + = − 12 or 2x 3 + 3 y 2 + 6 x − 12 y + 12 = 0
3 2

Answer: 2x 3 + 3 y 2 + 6 x − 12 y + 12 = 0

dr sin  + e 2r sin 
3. = r = 0 when  = /2
d 3er + er cos 2

Solution:
The differential equation is in terms of the variable r and . Thus, writing the equation in the form
M dr + N d = 0 , we obtain
dr sin  + e 2r sin 
=
d 3er + er cos 2
( 3e r
) (
+ er cos 2 dr − sin  + e 2r sin  d = 0 )
Factor out explicitly f(r) and h() in the last equation:

(
er ( 3 + cos 2 ) dr − 1 + e 2r sin  d = 0 )
Now the variables are separated. Therefore, solving by integrating functions of r alone and functions of
 alone will result in the general solution of the differential equation. Thus,
er sin 
dr − d = 0
1+e 2r
3 + cos 2
Lecture Notes 2 – First-Order and First-Degree Differential Equations 4
Engr. Caesar Pobre Llapitan

er sin 
 1 + e 2r
dr −  3 + cos 2 d = c (A)

Transform the denominator of the second integral using the trigonometric identity for double angle:
cos2 = 2cos2  − 1

du
 1 + u2 = tan
−1
Use the integration formula: u+c

er er dr
 1 +e 2r
dr =  ( )
1+ e r
2
= tan −1 er + c1

sin  sin  d sin  d


 3 + cos 2 d =  3 + ( 2cos  − 1 ) =  2 + 2cos 
2 2

1 sin  d 1 − sin  d
= 
2 1 + cos 
2
=− 
2 1 + ( cos  )2
1
= − tan −1 ( cos  ) + c2
2

Thus, from (A):


1
tan −1 er + c1 + tan −1 ( cos  ) + c2 = c or
2

1
tan −1 er + tan −1 ( cos  ) = C  general solution
2

Substitute r = 0 and  = /2 to determine the value of C; and, of course, the particular solution:
1  
tan −1 e0 + tan −1  cos  = C
2  2
1
tan −1 1 + tan −1 0 = C
2

C=
4

Therefore, the final solution is


1  
tan −1 er + tan −1 ( cos  ) = or 2 tan −1 er + tan −1 ( cos  ) =
2 4 2


Answer: 2 tan −1 er + tan −1 ( cos  ) =
2

Classroom Activity 1
Solve the following differential equations subject to the given conditions if there is any.
dr r ( 1 + ln  )
1. = ;  = e2 where r = e Answer: 2 lnr + (lnr)2 = 2 ln + (ln)2 – 5
d  ( 1 + ln r )
2. sin x cos y dx + cos x sin y dy = 0 Answer: cos x cos y = c
Lecture Notes 2 – First-Order and First-Degree Differential Equations 5
Engr. Caesar Pobre Llapitan

dq p p2 − q2 2 2
3. = e Answer: e p − eq = c
dp q
ds 1 −t
4. = ; s = 0 where t = 1 Answer: (1 – s)3/2 – (1 – t)3/2 = 1
dt 1−s

Exercises 1:
I. Determine whether the given differential equation is separable.
dy dy ye x + y
1. − sin ( x + y ) = 0 4. =
dx dx x 2 + 2

2.
dy
dx
= 4 y2 − 3 y + 1 5. (
xy 2 + 3 y 2 dy − 2 x dx = 0 )
ds s + 1
3.
ds
dt
= t ln s2t + 8t 2 ( ) 6. s2 +
dt
=
st

II. Solve the following differential equations subject to the given conditions if there is any.
dy x dy
1. = 2 8. = ( 1 + y ) tan x , y ( 0 ) = 3
dx y 1 + x dx
dv 1 − 4 v 2 1 dy
2. x = 9. = 1 + y cos x , y ( ) = 0
dx 3v 2 dx
1 dy y sin 
3.
dx t
= t +2 x 10. = , y ( ) = 1
dt xe  d y 2 + 1
4. y −1 dy + yecos x sin x dx = 0 11. y dx + ( 1 + x ) dy = 0, y ( 0 ) = 1

5. ( x + xy ) dx + e
2 x2
y dy = 0 12.
dy
dx
= 8 x 3 e −2 y , y ( 1 ) = 0

dy ( y − 1 )( x − 2 )( y + 3 )
6 = 13. sin2 y dx + cos2 x dy = 0 y(/4) = /4
dx ( x − 1 )( y − 2 )( x + 3 )
dU U +1
7. = 14.  d  +  d +  ( 3 d + d  ) = 0
ds s + sU

II. THE METHOD OF TRANSFORMATION OF VARIABLES

Learning Objectives
1. Explain homogeneous differential equations.
2. Solve first-order first degree homogeneous differential equations by the method of
transformation of variables.
3. Solve other forms of first-order first degree differential equations by the method of
transformation of variables.

The most important ways of solving a given differential equation is to make an appropriate change or
transformation of variables so that the given equation reduces to some recognized type which can be
solved. The situation is very much analogous to the “ingenious devices” often used in calculus for
evaluating integrals by a change of variable. In some cases, the particular transformation of variables to
be used is suggested by the form of the equation. In other cases, the transformation may be less obvious.
Lecture Notes 2 – First-Order and First-Degree Differential Equations 6
Engr. Caesar Pobre Llapitan

A. Homogeneous Differential Equations

Definition of Homogeneous Function


The function f(x, y) is said to be homogeneous of degree k in x and y if, and only if,

f ( x,  y ) = k (x, y ) (4)

Examples:
1. 4x2 – 3xy + y2 is homogeneous of degree 2

Explanation:
Let f ( x , y ) = 4 x 2 − 3 xy + y 2
Then
f (  x ,  y ) = 4 (  x ) − 3 x y + (  y )
2 2

= 4  2 x 2 − 3 2 xy +  2 y 2

(
=  2 4 x 2 − 3 xy + y 2 )
=  f ( x, y )
2

From (4), k = 2; therefore, the equation is homogeneous of degree k = 2.

2. x3 – xy + y3 is not homogeneous

Explanation:
Let f ( x , y ) = x 3 − xy + y 3

Then,
f (  x ,  y ) = (  x ) − (  x )(  y ) + (  y )
3 3

=  3 x 3 −  2 xy +  3 y 3

(
=  2  x 3 − xy +  y 3 )
  k f (  x,  y )

Since in original equation does not satisfy (4), then it is not homogeneous.

3. exp(x/y) is homogeneous of degree 0

Explanation:
Let f ( x , y ) = exp ( x / y ) = e x/ y

Then,
f (  x ,  y ) = e  x / y
=  0 e x/ y
=  0 f ( x, y )

From (4), k = 0; therefore, the equation is homogeneous of degree k = 0.


Lecture Notes 2 – First-Order and First-Degree Differential Equations 7
Engr. Caesar Pobre Llapitan

Classroom Activity 2
Classify whether the following equations are homogeneous or not
1. 2y + x 2 + y 2 2. x ln x – y ln y

Theorem 1
If M(x, y) and N(x, y) are both homogeneous and of the same degree, the function
M(x, y)/N(x, y)

is homogeneous of degree zero.

Theorem 2
If f(x, y) is homogeneous of degree zero in x and y, f(x, y) is a function of y/x alone.

From the foregoing discussion, a homogeneous differential equation is one where M and N in the
differential equation M(x, y)dx + N(x, y)dy = 0 are both homogeneous.

M y
If = f   alone, then
N x

dy y
+ g  = 0 (5)
dx x

Equation (5) is called homogeneous differential equation.

The solution of the homogeneous DE is found by using the substitution

y/x = v or y = vx (a)

Then
dy dv
=v+x (b)
dx dx

Substituting (a) and (b) to the homogeneous DE, we get


dv
v + x + g(v) = 0
dx
 v + g ( v )  dx + xdv = 0
dx dv
+ =0
x v + g(v)

which is variable separable.

Examples:
Solve the following homogeneous DE.
dy x − y
1. =
dx x + y

Solution:
Writing in the form of Mdx + Ndy:
Lecture Notes 2 – First-Order and First-Degree Differential Equations 8
Engr. Caesar Pobre Llapitan

( x − y ) dx − ( x + y ) dy = 0 (a)

M = x – y and N = x + y are homogeneous of degree 1. Therefore, it is a homogeneous DE.

Let
x = vy
dx = v dy + y dv

Then substitute to (a)


( vy − y )( vdy − ydv ) − ( vy + y ) dy = 0
Expand and remove common factors:
y ( v − 1 )( vdy − ydv ) − y ( v + 1 ) dy = 0
( v − 1 ) v dy − y ( v − 1 ) dv − ( v + 1 ) dy = 0

Combine like terms with the same differential:


( v − 1 ) v dy − y ( v − 1 ) dv − ( v + 1 ) dy = 0
( v − 1 ) v − ( v + 1 )  dy − y ( v − 1 ) dv = 0

(v 2
)
− 2v − 1 dy − y ( v − 1 ) dv = 0 (b) (variable separable)

Solving (b) by the method of separation of variables:


v−1
( )
v 2 − 2 v − 1 dy − y ( v − 1 ) dv =
dy
y
− 2
v − 2v − 1
dv = 0

dy v−1
 y − v 2
− 2v − 1
dv = c

1 2(v − 1)
ln y + −
2 v 2
− 2v − 1
dv = 0

ln y −
1
2
(
ln v 2 − 2 v − 1 = ln c )
y
ln = ln c
( )
1/2
v 2 − 2v − 1
y
=c (c)
(v )
1/2
2
− 2v + 1

Substitute v = x/y in order to bring back the original variables.


y
1/2
=c
( x / y )2 − 2 ( x / y ) − 1 
 
y
1/2
=c
 x 2 2x 
 2− − 1
y y 
y
1/2
=c
 x 2 − 2 xy − y 2 
 
 y2 
Lecture Notes 2 – First-Order and First-Degree Differential Equations 9
Engr. Caesar Pobre Llapitan

y2
=c
(x )
1/2
2
− 2 xy − y 2

( )
1/2
y 2 = c x 2 − 2 xy − y 2 or

(
y 4 = c 2 x 2 − 2 xy − y 2 )
Answer: (
y 4 = C x 2 − 2 xy − y 2 )
2. ( x - y ln y + y ln x ) dx + x ( ln y -ln x ) dy = 0
Solution:
Let us simplify the given DE.
( x - y ln y + y ln x ) dx + x ( ln y -ln x ) dy = 0
 y y
 x − y ln x  dx + x ln x dy = 0 (a)
 

The last equation is homogeneous of degree 1. Therefore, solve the DE by the method of
homogeneous DE.

Let y/x = v or y=vx


dy = v dx + x dv

Substitute to (a)
( x − vx ln v ) dx + x ln v ( v dx + x dv ) = 0
( 1 − v ln v ) dx + v ln v dx + x ln v dv = 0
( 1 − v ln v + v ln v ) dx + x ln v dv = 0
dx + x ln v dv = 0 (b) (variable separable)

Solve (b) by the method of separation of variable.


dx + x ln v dv = 0
dx
+ ln v dv = 0
x
dx
 x 
+ ln v dv = c

ln x +  ln v dv = c (c)

Consider  ln v dv by integration by parts:


u = ln v dv = dv
dv
du = v=v
v
Lecture Notes 2 – First-Order and First-Degree Differential Equations 10
Engr. Caesar Pobre Llapitan

dv
 ln v dv = v ln v −  v  v
= v ln v −  dv
= v ln v − v

Returning back to (c), we obtain


ln x + v ln v - v = c

Bringing back the original variable, with y/x = v


y y y
ln x + ln − = c
x x x
y
x ln x + y ln − y = cx
x

Simplifying further the last equation, we obtain the normalized answer:


y
x ln x + y ln − y = cx
x
x ln x + y ( ln y − ln x ) = cx + y

Answer: ( x − 1 ) ln x + y ln y = cx + y
Classroom Activity 3
Solve the following homogeneous differential equations.
1. ( 3 x − 2 y ) y ' = 2xy ; x = 0, y = − 1
2 2
Answer x2 = 2y2(y + 1)

2. t ( s + t ) ds − s ( s − t ) dt = 0
2 2 2 2
Answer s2 = -st2 ln cst

B. Linear but not Homogeneous Coefficients

If the coefficient M and N from the differential equation M dx + N dy = 0 are

M = a1 x + b1 y + c1 
 Linear functions
N = a2 x + b2 y + c2 

Then we have following cases.

Case 1:
The equation (a1x + b1y + c1) dx + (a2x + b2y + c2) dy = 0 where
a1b2 – a2b1 = 0

is reduced by the transformation


a1 x + b1 y = t
dt − a1 dx
dy =
b1

to the form
P ( x,t ) dx + Q ( x,t ) dt = 0
Lecture Notes 2 – First-Order and First-Degree Differential Equations 11
Engr. Caesar Pobre Llapitan

in which the variables are separable.

Case 2
The equation (a1x + b1y + c1) dx + (a2x + b2y + c2) dy = 0 where
a1b2 – a2b1  0

is reduced to the homogeneous form


( a1 x ' + b1 y ') dx ' + ( a2 x ' + b2 y ') dy ' = 0
by the transformation
x = x' + h y = y' + k

in which x = h and y = k are the solutions of the equations

a1 x + b1 y + c1 = 0 and a2 x + b2 y + c2 = 0

Examples:
Solve the following DE.
1. (x + y) dx + (3x + 3y – 4) dy = 0

Solution:
Test: (x + y) dx + (3x + 3y – 4) dy = 0
M=x+y and N = 3x + 3y – 4

Using Case 1 test: (1)(3) – (3)(1) = 0

Hence, it is Case 1.

Let x+y=t
dx + dy = dt  dx = dt – dy (since dx has simpler coefficient)

Substituting to the given DE:


( x + y ) dx + ( 3 x + 3 y − 4 ) dy = 0
t ( dt − dy ) + ( 3t − 4 ) dy = 0
t dt − t dy + ( 3t − 4 ) dy = 0
t dt + ( −t + 3t − 4 ) dy = 0
t dt + ( 2t − 4 ) dy = 0 (a) (variable separable)

Solving (a) by the method of separation of variables:


t dt + ( 2t − 4 ) dy = 0
t
dt + dy = 0
2t − 4
t
 2t − 4 
dt + dy = c

1 (t − 2 ) + 2dt + y = c
2  t−2
Lecture Notes 2 – First-Order and First-Degree Differential Equations 12
Engr. Caesar Pobre Llapitan

1 dt 
2 dt + 2 
t − 2 
+y=c

1
t + ln ( t − 2 ) + y = c
2
t + 2ln (t − 2 ) + 2 y = 2c = C (b)

Bring back the original variables with x + y = t.


x + y + 2ln ( x + y − 2 ) + 2 y = C

Answer: x + 3 y + 2ln ( x + y − 2 ) = C

2. (2x – 5y + 3) dx − (2x + 4y – 6) dy = 0

Solution:
Test: (2x – 5y + 3) dx − (2x + 4y – 6) dy = 0

M = 2x – 5y + 3 and N = 2x + 4y – 6

Using Case 1 test: (2)(4) – (2)(-5)  0

Not Case 1; hence, it is Case 2

Following Case 2 solution, let us solve 2x – 5y + 3 = 0 and 2x + 4y – 6 = 0 simultaneously for the value
of x = h and y = k.
2x – 5y + 3 = 0 (i)
2x + 4y – 6 = 0 (ii)

Subtracting, we obtain
- 9y + 9 = 0  y=1=k

From (i): 2x – 5(1) + 3 = 0  x=1=h

Use the substitution


x = x' + 1 y = y' + 1 (iii)
dx = dx' dy = dy' (iv)

to transform the differential equation in the new variables x' and y'. Thus,
( 2x ' − 5 y ') dx ' − ( 2x ' + 4 y ' ) dy ' = 0 (a)

Equation (a) is a homogeneous DE; therefore, proceed solving (a) by the method of homogeneous DE.
Let
x ' = vy '
(v)
dx ' = vdy ' + y ' dv

Substitute to equation (a):


( 2vy ' − 5 y ' )( vdy ' + y ' dv ) − ( 2vy ' + 4 y ' ) dy ' = 0
( 2v − 5 )( vdy ' + y ' dv ) − ( 2v + 4 ) dy ' = 0
 v ( 2 v − 5 ) − ( 2 v + 4 )  dy ' + y ' ( 2 v − 5 ) dv = 0

( 2v2 − 7v − 4 ) dy ' + y ' ( 2v − 5) dv = 0 (b)


Lecture Notes 2 – First-Order and First-Degree Differential Equations 13
Engr. Caesar Pobre Llapitan

Equation (b) is variable separable; hence, solve by the method of separation of variables.
( 2v 2
)
− 7 v − 4 dy ' + y ' ( 2 v − 5 ) dv = 0
dy ' 2v − 5
+ 2 dv = 0
y' 2v − 7 v − 4
dy ' 2v − 5
 y'
+ 
2v − 7 v − 4
2
dv = c

2v − 5
ln y ' +  2v2 − 7 v − 4 dv = c (c)

2v − 5
Consider  2v 2 − 7 v − 4 dv . Since the denominator has a factor of (2v + 1)(v – 4), use the method of
partial fraction to evaluate the integral. Thus,
2v − 5 A B
( 2 v + 1 )( v − 4 )
dv =
2 v +1 
dv +  v − 4 dv (d)

By partial fraction method, determine the values of A and B.


2v − 5 A B
= +
( 2 v + 1 )( v − 4 ) 2 v + 1 v −4
2v − 5 = A ( v − 4 ) + B ( 2v + 1 ) (vi)

If v = 4, then B = 1/3
If v = -1/2, then A = 4/3

Hence, from (d)


2v − 5 4/3 1/3
 ( 2v + 1 )( v − 4 ) dv =  2v + 1dv +  v − 4 dv
2 1
= ln ( 2v + 1 ) + ln ( v − 4 )
3 3

Then, from (c)


2v − 5
ln y ' +  2v 2 − 7 v − 4 dv = c
2 1
ln y ' + ln ( 2 v + 1 ) + ln ( v − 4 ) = c
3 3
3 ln y ' + 2ln ( 2 v + 1 ) + ln ( v − 4 ) = ln c
ln ( y ' ) ( 2 v + 1 ) ( v − 4 ) = ln c
3 2

( y ' ) 3 ( 2 v + 1 )2 ( v − 4 ) = C

Substitute back the original variables using (iii) and (v)


2
3
x−1   x−1 
( y − 1) 2 + 1  − 4  =C
 y−1   y−1 
2
3  2x − 2 + y − 1   x − 1 − 4y + 4 
( y − 1)     =C
 y−1   y−1 
( 2 x + y − 3 )2 ( x − 4 y + 3 ) = C
Lecture Notes 2 – First-Order and First-Degree Differential Equations 14
Engr. Caesar Pobre Llapitan

Answer: ( 2 x + y − 3 )2 ( x − 4 y + 3 ) = C

Classroom Activity 4
Solve the following DE.
1. (x – y – 1) dx + (4y + x – 1) dy = 0 Answer ln[4y2 + (x – 1)2] + tan-1 (2y/x – 1) = C
2. (x + 2y – 1) dx + (2x + 4y – 3) dy = 0 Answer (x + 2y – 1)2 = 2y + C

C. Special Substitution
Equations may be reduced to a form in which the variables are separable by means of a properly chosen
transformation.

Equation of the form yf(x, y) dx + xg(x, y) dy = 0


The transformation
z xdz − zdx
xy = z y= dy =
x x2

reduces an equation to the form P ( x, z ) dx + Q ( x, z ) dz = 0 in which the variables are separable.

Examples:
( ) (
1. Solve y − xy 2 dx − x + x 2 y dy = 0 )
Solution:
( y − xy ) dx − ( x + x y ) dy = 0
2 2

y ( 1 − xy ) dx − x ( 1 + xy ) dy = 0 (i)

Thus, it is of the form yf(x, y) dx + xg(x, y) dy = 0. Also, the product xy makes it an obvious obstacle
to solve the problem using previous methods. Thus, substitution of this with a third variable will lead
to a solution free of complication. Using a substitution for the xy term will make the variable separable.
Thus,
z xdz − zdx
Let: xy = z y= dy =
x x2

Substitute to (i):
y ( 1 − xy ) dx − x ( 1 + xy ) dy = 0
xdz − zdx 
( 1 − z ) dx − x ( 1 + z ) 
z
=0
x  x2 
z ( 1 − z ) dx − ( 1 + z )( xdz − zdx ) = 0
 z ( 1 − z ) + z ( 1 + z )  dx − x ( 1 + z ) dz = 0
2 z dx − x ( 1 + z ) dz = 0

The equation is now variable separable. Solving,


2z dx − x ( 1 + z ) dz = 0
2dx 1 + z
− dz = 0
x z
Lecture Notes 2 – First-Order and First-Degree Differential Equations 15
Engr. Caesar Pobre Llapitan

dx 1 
2 −   + 1  dz = 0
x z 
2ln x − ln z − z = c

Simplifying further:
x2
ln = c + z
z
x2 c+ z c z
=e =e e
z
x 2 = Cze z

Since xy = z ; therefore
x 2 = Cxye xy or x = Cye xy

Answer x = Cye xy

2. Solve (1 – xy + x2y2) dx + (x3y – x2) dy = 0

Solution:
The product term xy suggest the form of substitution.

z xdz − zdx
Let xy = z y= dy =
x x2

Thus,
( 1 − xy + x y ) dx + ( x xy − x ) dy = 0
2 2 2 2

( 1 − z + z ) dx + ( x z − x ) x dzx− z dx = 0
2 2 2
2

( 1 − z + z ) dx + ( z − 1 )( x dz − z dx ) = 0
2

( 1 − z + z ) − z ( z − 1 )  dx + x ( z − 1 ) dz = 0
2
 
dx + x ( z − 1 ) dz = 0

Now, the equation is variable separable. Solving,


dx + x ( z − 1 ) dz = 0
dx
+ ( z − 1 ) dz = 0
x

Integrating:
dx
 + ( z − 1 ) dz = c
x 
(z − 1)
2

ln x + =c
2

Since xy = z :
( xy − 1 )
2

ln x + =c
2
Lecture Notes 2 – First-Order and First-Degree Differential Equations 16
Engr. Caesar Pobre Llapitan

2ln x + x 2 y 2 − 2 xy + 1 = c
1
ln x = xy − x 2 y 2 + c − 1 / 2
2
1
ln x = xy − x 2 y 2 + C
2

1
Answer ln x = xy − x 2 y 2 + C
2

Equations of the Form dy/dx = G(ax + by)


When the right-hand side of the equation can be expressed as a function of the combination ax + by,
where a and b are constants, that is,
dy
= G(ax + by ) (1)
dx

then the substitution


z = ax + by (2)

transforms the equation into a separable one.

Examples:
Solve dy / dx = y − x − 1 + ( x − y + 2 )
−1
1.

Solution:
To separate the variable, we introduce a new variable for the term ( x − y + 2 ) . Let
−1

u= x − y +2  y = x + 2−u
du = dx − dy  dy = dx − du

Therefore,
dy / dx = y − x − 1 + ( x − y + 2 )
−1

dy =  y − x − 1 + ( x − y + 2 )  dx
−1
 
(
dx − du = x + 2 − u − x − 1 + u−1 dx )
 1
( )
dx − du = 1 − u + u−1 dx =  1 − u +  dx
 u
(
u ( dx − du ) = u − u2 dx )
( u − u + u ) dx − udu = 0
2

u2 dx − udu = 0
du
dx − =0
u

Integrating,
du
 dx −  u
=c

x − ln u = c
ln u = x − c
u = e x − c = e x e − c = Ce x
Lecture Notes 2 – First-Order and First-Degree Differential Equations 17
Engr. Caesar Pobre Llapitan

Since u = x − y + 2 , then
x − y + 2 = Ce x
y = x + 2 + Ce x

Answer: y = x + 2 + Ce x

dy = ( y − 4 x ) dx
2
2.

Solution:
Let
z = y − 4x
dz = dy − 4 dx  dy = dz + 4 dx

Substituting,
dy = ( y − 4 x ) dx
2

dz + 4 dx = z 2 dx
( 4 − z ) dx + dz = 0
2

Separating the variable and integrate, we obtain


dz
dx + =0
4 − z2
dz
x+ =c
4 − z2

du 1 a+u
Using a 2
=
− u 2a
2
ln
a−u
+C

Therefore,
1 2+z
x+ ln =C
2 ( 2) 2 − z

Since z = y − 4 x
1 2 + y − 4x
x + ln =C
4 2 − y + 4x
2 + y − 4x
4 x + ln +C
2 − y + 4x

2 + y − 4x
Answer: 4 x + ln +C
2 − y + 4x

Transformation suggested by the form of the equation

Classroom Activity 5
1. Solve tan2(x + y) dx – dy = 0
Let x+y=v Answer 2(x – y) = C + sin 2(x + y)

2. Solve (2 + 2x2y1/2) dx + (x2y1/2 + 2)x dy = 0


Lecture Notes 2 – First-Order and First-Degree Differential Equations 18
Engr. Caesar Pobre Llapitan

Let x2y1/2 = v

3. Solve (2x2 + 3y2 – 7) x dx – (3x2 + 2y2 – 8)y dy = 0


Let x2 = u y2 = v

4. Solve (x – 2 sin y + 3) dx + (2x – 4 sin y – 3) cos y dy = 0


Let z = sin y Answer 8 sin y + 4x + 9 ln(4x – 8 sin y + 3) = C

Exercises 2:
Use appropriate transformation techniques to solve the following differential equations.
dy
1. (xy + y2)dx – y2 dy = 0 6. = sin ( x − y )
dx
dx x2 + t t2 + x2
2. = 7. (-3x + + y – 1)dx + (x + y + 3)dy = 0
dt tx
dy y(ln y − ln x + 1)
3. = 8. (x + y – 1)dx + (y – x – 5)dy = 0
dx x
dy
4. = x + t −1 9. (2x – y)dx + (4x + y – 3)dy = 0
dx
dy
= ( x + y + 2)
2
5. 10. (2x + y + 4)dx + (x – 2y – 2)dy = 0
dx

III. EXACT DIFFERENTIAL EQUATIONS

Learning Objectives
At the end of this section, the students should be able to
1. Explain the meaning of exact differential equations using test for exactness.
2. Solve exact differential equations.

A. The Intuitive Idea of Exactness

Given:
M dx + N dy = 0 or dy/dx = -M/N (1)

Then, by analogy, the general solution is

U(x, y) = C (2)

But
U U
dU = dx + dy = 0 (3)
x y

dy − U
= x (4)
dx U
y

Then equations (1) = (4):


Lecture Notes 2 – First-Order and First-Degree Differential Equations 19
Engr. Caesar Pobre Llapitan

U / x M
=
U / y N
U / x U / y
= =
M N

U U
= M = N (5)
x y

Substitute (5) to (3) to obtain a perfect or exact differential; thus

(Mdx + Ndy) = 0 = dU

The solution of (1) is U(x, y) = C, where  = integrating factor.

Definition 1
The differential of a function of one or more variables is called an exact differential.

Examples:
1. f(x) = 2x3 – x + 1
( )
dy = f ' ( x ) dx = 6 x 2 − 1 dx

2. ( )
D x 2 y = 2 xy dx + x 2 dy

Definition 2
If Mdx + Ndy = 0 is multiplied by (x, y) to obtain (Mdx + Ndy) = 0 whose left-hand side is
an exact differential, we say that we have made the differential equation exact.

Definition 3
The multiplying function  is called an integrating factor of the differential equation Mdx + Ndy
= 0.

B. Exact Differential Equation


A first-order differential equation of the form Mdx + Ndy = 0 is said to be an exact equation if the
expression on the left-hand side is an exact differential.

If the differential equation Mdx + Ndy = 0 is exact, then by definition there is a function U(x, y) such
that Mdx + Ndy = dU

But from calculus,

U U
dU = dx + dy
x y

By comparison,
U U
dU = dx + dy Mdx + Ndy = dU
x y
Lecture Notes 2 – First-Order and First-Degree Differential Equations 20
Engr. Caesar Pobre Llapitan

U U
=M =N
x y
 2U M  2U N
= =
xy y yx x

M N
Hence, = is the necessary condition for exactness
y x

Theorem:
A necessary and sufficient condition for the exactness of the differential equation
Mdx + Ndy = 0

M N
is = . This means that
y x

1. If Mdx + Ndy = dU = 0 is exact, then


M N
= Necessity
y x

M N
2. If = , then U exist such that Mdx + Ndy = dU or U exists such that
y x
U U
=M and =N Sufficiency
x y

Steps in solving exact differential equation:


1. Write the differential equation in the form M(x, y) dx + N(x, y) dy = 0.
2. Compute My and Nx. If My  Nx, the equation is not exact and this technique will not work.
3. Anti-differentiate either Ux = M with respect to x or Uy = N with respect to y. Anti-differentiating
will introduce an arbitrary function of the other variable.
4. Take differential of the result for U from step 3 and substitute for U in the other equation to
find the arbitrary function.
5. The solution is U(x, y) = C.

Examples:
dr r 2sin 
1. =
d 2r cos  − 1

Solution:
Step 1:
r 2sin 
( 2r cos − 1 ) dr − ( r 2sin  ) d = 0
dr
= 
d 2r cos  − 1

Step 2:
M = 2r cos  − 1 ( )
N = − r 2sin  = − r 2sin 
d
M = ( 2r cos − 1 ) = −2r sin
d

Nr =
d
dr
( )
−r 2sin  = −2r sin 
Lecture Notes 2 – First-Order and First-Degree Differential Equations 21
Engr. Caesar Pobre Llapitan

Since M = Nr, then the equation is exact.

Step 3:
Set
dU
Ur = = M = 2r cos  − 1 (a)
dr

or
dU
U = = N = − 2r 2 sin  (b)
d

Choose either (a) or (b). Let us consider (a) and take the anti-derivative. Anti-differentiating
will introduce an arbitrary function of the other variable. Thus,
U=  ( 2r cos − 1 ) dr = U (r, )
U ( r ,  ) = r 2 cos  − r + f ( ) (c)

Equation (c) is the solution form of the exact equation. We need only to determine f() by the
next step.

Step 4: Take differential of the result for U from step 3 and substitute for U in the other equation to
find the arbitrary function.
d  2
U = r cos  − r + f ( )  = N = − r 2 sin 
d  
−r 2 sin  + f ' ( ) = − 2r sin 
f ' ( ) = 0

Solving for f():


 f ' ( ) d = c
f ( ) = c

Therefore, substituting to (c), we obtain the general solution of the exact differential equation.
U ( r ,  ) = r 2 cos  − r + c

Answer: r 2 cos  − r = c

To check the answer, take the total derivative and note that it will give the original differential equation.
Thus,
r 2 cos  − r = c
2r cos  dr − r 2 sin  d − dr = 0
( 2r cos  − 1 ) dr − r 2 sin  d = 0
dr r 2 sin 
=
d 2r cos  − 1

2. (x 2
)
+ 2 ye2 x y ' + 2 xy + 2 y 2e2 x = 0
Lecture Notes 2 – First-Order and First-Degree Differential Equations 22
Engr. Caesar Pobre Llapitan

Solution:
Step 1:
( x + 2 ye ) y ' + 2xy + 2 y e = 0
2 2x 2 2x

( x + 2 ye ) dy + ( 2xy + 2 y e ) dx = 0
2 2x 2 2x

( 2xy + 2 y e ) dx + ( x + 2 ye ) dy = 0
2 2x 2 2x

Step 2:
M = 2 xy + 2 y 2 e 2 x N = x 2 + 2 ye 2 x

My =
d
dy
( )
2 xy + 2 y 2 e 2 x = 2 x + 4 ye 2 x

Nx =
d 2
dx
( )
x + 2 ye 2 x = 2 x + 4 ye 2 x

Since My = Nx, then the equation is exact.

Step 3:
Set
dU
Ux = = M = 2 xy + 2 y 2e2 x (a)
dx
Or
dU
Uy = = N = x 2 + 2 ye 2 x (b)
dy

Choose either (a) or (b). Let us consider (b) this time and take the anti-derivative. Anti-
differentiating will introduce an arbitrary function of the other variable. Thus,
dU
= N = x 2 + 2 ye 2 x
dy
U ( x, y ) = (x )
+ 2 ye 2 x dy
2

U ( x, y ) = x 2 y + y 2e2 x + g ( x ) (c)

Let us determine g(x).

Step 4:
d
U ( x , y ) = 2 xy + 2 y 2e2 x + g ' ( x ) = M = 2 xy + 2 y 2e 2 x
dx
g'( x ) = 0

Integrating, we obtain that g(x) = c

Therefore, the solution is


U ( x, y ) = x 2 y + y 2e2 x + c

Answer: x 2 y + y2e2x = c
Lecture Notes 2 – First-Order and First-Degree Differential Equations 23
Engr. Caesar Pobre Llapitan

Classroom Activity 6
Solve:
1. 2xy dx + (x2 + cos y) dy = 0
dy x − y cos x
2. =
dx sin x + y

Exercises 3
Show that the equation is exact, and obtain its general solution. Also, find the particular solution
corresponding to the given initial condition.
1. 3 dx – dy = 0; y(0) = 6 6. (ey + z)dy – (sin z – y)dz = 0
2. x2 dx + y2 dy = 0; y(9) = -1 7. (x – 2z)dx – (2x – z)dz = 0
3. x dx + 2y dy = 0; y(1) = 2 8. (sin y + y cos x)dx + (sin x + x cosy)dy = 0
4. 4 cos2u du – e-5v dv = 0; v(0) = -6 9. (sin xy + xy cos xy)dx + x2 cos xy dy = 0
5. eydx + (xey – 1)dy = 0; y(-5) = 6 10. (3x2 sin 2y – 2 xy)dx + (2x3 cos 2y – x2)dy = 0

IV. INTEGRATING FACTOR TECHNIQUE

Learning Objectives
At the end of this section, the students should be able to
1. Determine an integrating factor that will make a non-exact differential equation exact.
2. Use analytical procedure in determining an integrating factor for non-exact differential
equation.

A. Integrating Factor Found by Inspection


At times, an integrating factor may be found by inspection, after regrouping the terms of the equation
by recognizing a certain group of terms as being a part of an exact differential. Below are some exact
differential that occur frequently.

Group of Terms  Exact Differential


1. x dy – y dx 1 xdy − ydx y
=d  
x2 x 2
x

2. xdy – ydx 1 ydy − xdx  x


− =d  − 
y2 y 2
 y

3. xdy – ydx 1 dy dx  y
− = d  ln 
xy y d  x

4. xdy – ydx 1 xdy − ydx


xdy − ydx x2
x + y2
2 =
x +y
2 2
1 + ( y / x )2
 y
= d  tan − 
 x

5. xdy+ydx 1 xdy + ydx


= d ( ln( xy))
xy xy
Lecture Notes 2 – First-Order and First-Degree Differential Equations 24
Engr. Caesar Pobre Llapitan

xdx + ydy
6. xdx + ydy 1
x + y2
2
x 2 + y2
=d ( 1
2
ln( x 2 + y 2 ) )

Examples
1. Solve y dx + (x + x3y2) dy = 0

Solution:
Group terms of like degree:
( y dx + x dy ) + x 3 y 2 dy = 0
d ( xy ) + x 3 y 2 dy = 0

1
Multiply u =
( xy )3
d ( xy ) dy
+ =0
( xy )
3
y
dy
 ( xy ) d ( xy ) +  y = 0
−1

( xy )
-2

+ ln y = - ln c
-2
1
- + ln y = - ln c
2 ( xy )
2

Answer : 2x 2 y 2 ln cy = 1

2. Solve 3x2y dx + (y4 – x3) dy = 0

Solution:
Look for terms that can be written as exact differential
3 x 2 y dx − x 3 dy + y 4 dy = 0

( )
y d x 3 − x 3 dy + y 4 dy = 0

1
Multiply  =
y2
( )
y  d x 3 - x 3 dy
+ y2 dy = 0
2
y
 x3  2
d  + y dy = 0
 y 

Integrating:
x 3 y3 c
+ =
y 3 3
Lecture Notes 2 – First-Order and First-Degree Differential Equations 25
Engr. Caesar Pobre Llapitan

Answer 3x 3 + y4 = cy

3. Solve x dy – y dx – (1 – x2) dx = 0

Solution:
Regroup terms:
(x dy – y dx) – (1 – x2) dx = 0 Use u = 1/x2

dy y − xy 2 − x 3
4. Solve =
dx x + x 2 y + y 3

Solution:
(x 3
) (
+ xy 2 - y dx - y 3 + x 2 y + x dx = 0 )
(x 2
+ y2 ) ( x dx + y dy ) - x dy - y dx = 0
1
Multiply by u = :
x + y2
2

x dy - y dx
x dx + y dy + =0
x 2 + y2

Integrating:
1 2 1 2 y
x + y + tan-1 = c
2 2 x

y
Answer : x 2 + y2 + 2 tan -1 = c1
x

5. Solve ( 8 y dx + 8 x dy ) + x 2 y 3 ( 4 y dx + 5 x dy ) = 0

Solution:
Let u = x y  and determine  and 

Multiply  to the DE:


( 8 y dx + 8 x dy ) + x y ( 4 y dx + 5x dy ) = 0  x y 
2 3

( 8 x y  dx + 8 x  y  dy ) + (4 x  y  dx + 5x
1+ 1+ 2+ 4+ 3 + 3 + 
y )
dy = 0 (A)

Then,
( )
d x 1 + y 1 +  = ( 1 +  ) x y 1 +  dx + ( 1 +  ) x 1 + y  dy (i)

The first term of the differential equation is similar to (i); therefore, corresponding coefficient are
proportional. That is;
1 + 1 + 
= or = (ii)
8 8

Also,
Lecture Notes 2 – First-Order and First-Degree Differential Equations 26
Engr. Caesar Pobre Llapitan

( )
d x 3 + y 4 +  = ( 3 +  ) x 2+ y 4 +  dx + ( 4 +  ) x 3 + y 3 +  dy (iii)

Again, the second term of the differential equation is similar to (iii); therefore, corresponding coefficient
are proportional. That is;
3 + 4 + 
= or 5 - 4 = 1 (iv)
4 5

Solving (iii) and (iv), we obtain  =  = 1.

Therefore, u = xy

Equation A can now be written as


( 8 xy 2
) (
dx + 8 x 2 y dy + 4 x 3 y5 dx + 5 x 4 y 4 dy = 0 )
and the equation is exact. Each term of the differential equation is exact differential; therefore,
( 8 xy 2
) ( )
dx + 8 x 2 y dy + 4 x 3 y5 dx + 5 x 4 y 4 dy = 0
or
( ) ( )
d 4 x y + d x 4 y5 = 0
2

Taking the anti-derivative gives


 d (4x y) +  d ( x y ) = c
2 4 5

4x 2 y + x 4 y5 = c

Answer: 4x 2 y + x 4 y5 = c

Classroom Activity 7
Determine an integrating factor and solve the following differential equations.
1. (
x dy − y dx − 1 − x 3 dx = 0 ) Answer: 2 xy + 1 + 2 x 3 = cx 2
dy
2. x2 + xy + 1 − x 2 y 2 = 0 Answer: sin −1 ( xy ) + ln x = c
dx
3. x ( 4 y dx + 2x dy ) + y 3 ( 3 y dx + 5 x dy ) = 0 Answer: x 4 y2 + x 3 y5 = c

B. Determination of Integrating Factor

Assume that the equation


M  (x, y)dx + N  (x, y)dy = 0

is not exact. That is,


M N

y x

In this case we look for a function u(x, y) which makes the new equation

u( x, y) M( x, y) dx + u( x, y) N ( x, y) dy = 0
Lecture Notes 2 – First-Order and First-Degree Differential Equations 27
Engr. Caesar Pobre Llapitan

an exact one. The function u(x, y) (if it exists) is called the integrating factor. Note that u(x, y) satisfies
the following equation:

M u N u
u+ M= u+ N
y y x x

This is not an ordinary differential equation since it involves more than one variable. This is what's
called a partial differential equation. These types of equations are very difficult to solve, which explains
why the determination of the integrating factor is extremely difficult except for the following two
special cases:

Case 1: There exists an integrating factor u(x) function of x only. This happens if the expression
M N

y x
N

is a function of x only; that is, the variable y disappears from the expression. In this case, the function
u is given by
 M N 
 y − x 
u ( x ) = exp   dx 
 N 
 
 

Case 2: There exists an integrating factor u(y) function of y only. This happens if the expression
N M

x y
M

is a function of y only; that is, the variable x disappears from the expression. In this case, the function
u is given by
 N M 
 x − y 
u ( y ) = exp   dy 
 M 
 
 

Once the integrating factor is found, multiply the old equation by u to get a new one which is exact.
Then you are left to use the previous technique to solve the new equation.

Advice: if you are not pressured by time, check that the new equation is in fact exact!

Let us summarize the above technique. Consider the equation

M(x,y)dx + N(x,y)dy = 0

If your equation is not given in this form you should rewrite it first.
Step 1: Check for exactness, that is, compute
M N
and
y x

then compare them.


Lecture Notes 2 – First-Order and First-Degree Differential Equations 28
Engr. Caesar Pobre Llapitan

Step 2: Assume that the equation is not exact (if it is exact go to step 4). Then evaluate
 M N

y x
N

If this expression is a function of x only, then go to step 3. Otherwise, evaluate


 N M

x y
M

If this expression is a function of y only, then go to step 3. Otherwise, you cannot solve the
equation using the technique developed above!

Step 3: Find the integrating factor. We have two cases:


3.1 If the expression
M N

y x
N

is a function of x only. Then an integrating factor is given by


 M − N 

u(x) = exp  y x dx 


N 

3.2. If the expression


N M

x y
M

is a function of y only, then an integrating factor is given by


 N − N 

u(y) = exp  x y dy 


M 

Step 4: Multiply the old equation by u, and, if you can, check that you have a new equation which
is exact.

Step 5: Solve the new equation using the steps described in the previous section.

Examples:
Determine the integrating factor then solve the following.
dy sin y
1. = ; y(0) =  / 2
dx x cos y − sin 2 y

Solution:
Write the equation in the general form
( )
sin y dx − x cos y − sin 2 y dy

Step 1: Check for exactness:


Lecture Notes 2 – First-Order and First-Degree Differential Equations 29
Engr. Caesar Pobre Llapitan

M
M = sin y  = cos y
y
N
N = − x cos y + sin 2 y  = − cos y
x

M N
Since  , then it is not exact.
y x

Step 2: Test for (x) alone or (y) alone


i. (x) alone
M N

y x cos y + cos y
=  f (x)
N − x cos y + sin 2 y

ii. (y) alone


N M

x y − cos y − cos y 2cos y
= =− = f ( y)
M sin y sin y

Therefore, u is a function of y alone.

Step 3: Determine u
 N N
− 
u(y) = exp   dy 
x y
 M 
 
 −2cos y 
u ( y ) = exp   dy  = exp ( −2ln sin y )
 sin y 
−2
= e ln sin y

u ( y ) = sin −2 y

Step 4: Multiply u to the differential equation

sin y dx − ( x cos y − sin y ) dy  sin1 y


2
2

csc y dx − ( x cot y csc y − 1 ) dy = 0  exact differential equation

Test for exactness:


M
M = csc y  = − csc y cot y
y
N
N = − x csc y cot y + 1  = − csc y cot y
x
Therefore, it is exact.

Step 5: Solve the exact differential equation.


Using the technique of grouping exact differentials:
csc y dx − ( x cot y csc y − 1 ) dy = 0
( csc y dx − x cot y csc y dy ) + dy = 0
d ( x csc y ) + dy = 0
Lecture Notes 2 – First-Order and First-Degree Differential Equations 30
Engr. Caesar Pobre Llapitan

Hence, taking the anti- derivative gives the general solution:

x csc y + y = c

Evaluating at the given conditions, we obtain the particular solution.


x csc y + y = c y(0) =  / 2  c = / 2

Therefore, x csc y + y =  / 2

Answer: x csc y + y =  / 2

Classroom Activity 8
Solve the following using the method of exact differential equation.
1. ydx + (3 + 3x – y) dy = 0
dI t − tI
2. = ; I (0) = 0
dt t 2 + 1

Exercises 4
I. Obtain an integrating factor for the following equations.
1. (x – y2)dx + 2xy dy = 0 2. (x + y)dx – (x – y)dy = 0
3. dr + (2r cot + sin2)d = 0 4. d + (3 - 2)d = 0
5. (x2 + y2 + x)dx + xy dy = 0 6. x dx + y dy + 4y3(x2 + y2)dy = 0
7. y dx – x dy + lnx dx = 0 8. di/dt – 6i = 10 sin2t
9. (1 + sin y)dx = [2y cosy – x(secy + tany)]dy

II. Solve the following differential equations.


dy
1. y(x3 – y) dx – x(x3 + y) dy = 0 4. x 2 + xy + 1 − x 2 y 2 = 0
dx
2. y dx + x(1 – 3x2y2) dy = 0 5. x(4y dx + 2x dy) + y3(3y dx + 5x dy) = 0
3. x3y3(2y dx + x dy) – (5y dx + 7x dy) = 0

V. FIRST ORDER LINEAR EQUATIONS

Learning Objectives
At the end of this section, the students should be to
1. Identify and write a first-order first-degree differential equation in general and standard form.
2. Determine an integrating for first-order first-degree differential equation in standard form.
3. Solve a first-order first-degree differential equation.

A first order equation of the form

dy
a1 (x ) + a0 (x ) y = g(x ) (1)
dx

is said to be a linear equation.


Lecture Notes 2 – First-Order and First-Degree Differential Equations 31
Engr. Caesar Pobre Llapitan

When g(x) = 0, the linear equation is said to be homogeneous; otherwise, it is non-homogeneous. By


dividing both sides of the equation by a1(x), we obtain a more useful form, the standard form, of a linear
equation:
dy
+ p ( x ) y = q( x ) (2)
dx

The solution is given by

y=
 u ( x ) q ( x ) dx + C (3)
u( x )

where
(
u(x ) = exp  p(x ) dx ) (4)

called the integrating factor. If an initial condition is given, use it to find the constant C. Here are
some practical steps to follow:
1. If the differential equation is given as
dy
a( x ) + b( x ) y = c ( x )
dx

rewrite it in the form


dy
+ p( x) y = q( x)
dx

where
b( x ) c(x)
p( x) = and q( x) =
a( x ) a( x )

2. From the standard form, identify p(x) and then find the integrating factor
u ( x ) = e
p( x ) dx

3. Multiply the standard form of the equation by the integrating factor. The left-hand side of the
resulting equation is automatically the derivative of the integrating factor and y:
d   p( x )dx 
y  = e q(x)
p( x )dx
 e
dx  

4. Integrate both sides of this equation and obtain

y=
 u ( x ) q ( x ) dx + C
u( x )

5. If you are given an IVP, use the initial condition to find the constant C.

Examples:
Solve:
dy
1. − 5 y = 50
dx
Lecture Notes 2 – First-Order and First-Degree Differential Equations 32
Engr. Caesar Pobre Llapitan

Solution:
The equation is already in its standard form. Identifying the coefficient of the first-degree
dependent variable, we obtain an integrating factor.
u ( x ) = e
p( x ) dx
 p(x) = -5

u ( x ) = exp (  −5 dx ) = exp ( −5x )


u ( x ) = e −5 x

Multiply u(x) to the first-order differential equation. The left-hand side of the resulting equation is
automatically the derivative of the integrating factor and y.
d −5 x
e y  = 50 e −5 x dx
dx  

Integrate both sides of the equation, we obtain


50 −5 x

e −5 x y = 50 e −5 x dx =
−5
e ( −5dx ) 
e −5 x y = − 10 e −5 x + c

Answer : y = − 10 + c e5 x

2. ( )
2y y 2 − x dy = dy

Solution:
Write the given equation in standard form
(
2 y y 2 − x dy = dx )
dx
2 y 3 − 2 xy =
dy
dx
+ 2 xy = 2 y 3
dy

The equation is first-order in the variable x.

Determine the integrating factor:


u( y ) = e
p( y ) dy
 p(y) = 2y

u( y ) = e
2y dy 2
= ey

Multiply u(y) to the first-order differential equation. The left-hand side of the resulting equation is
automatically the derivative of the integrating factor and x.
d  y2 
( )
2
e x = e y 2 y 3 dy
dy  

Integrate both sides of the equation, we obtain

 
e y x = e y 2 y 3 dy = y 2e y ( 2 y dy ) dy
2 2 2
(i)
Lecture Notes 2 – First-Order and First-Degree Differential Equations 33
Engr. Caesar Pobre Llapitan

y e ( 2 y dy ) dy
2 y2
Integrate by parts:

dv = e y ( 2 y dy )
2
u = y2
2
du = 2 y dy v = ey

y e ( 2 y dy ) dy = e y 
y 2 − e y ( 2 y dy )
2 y2 2 2

2 2
= e y y2 − e y
Therefore,
2 2 2
e y x = e y y2 − e y + c

x = y2 − 1 + ce− y
2
Answer:

Classroom Activity 9
Solve the following.
dI 10 I
1. + = 10, I (0 ) = 0
dt 2t + 5
dr r
2. = − ; r = 1,  = 1
d 3

( ) (
x 2 + a2 dy = 2 x  x 2 + a2 + 3 y  dx )
2
3.
 
4. ydx + ( 3 + 3 x − y ) dy = 0

Bernoulli’s Equation
The differential equation

dy
+ P (x ) y = Q(x ) y n (5)
dx

where n is any real number is called Bernoulli’s equation. Note that for n = 0 and n = 1 the equation
reduces to a linear DE. For n  0 and n  1 the substitution v = y1 – n reduces it to a linear one.

Proof:
Rewrite the Bernoulli equation as
dy
y−n + P y1 − n = Q
dx

Let

 v = y1 − n

 dv −n
dy 1 dv dy
 = (1 − n ) y or = y−n
 dx dx 1 − n dx dx

Therefore,
1 dv
+ Pv = Q
1 − n dx
Lecture Notes 2 – First-Order and First-Degree Differential Equations 34
Engr. Caesar Pobre Llapitan

dv
+ (1 − n )Pv = (1 − n )
dx
which is linear in the variable v

Examples:
Solve the differential equations.
dy
1. x2 − 2 xy = 3 y 4
dx
Solution:
Rewriting the equation in the form of Bernoulli’s equation, we proceed by multiplying the
equation by 1/x2y4

 2 dy  1
x − 2 xy = 3 y 4   2 4
 dx  x y

dy 2 −3 3
y −4 − y = 2 (i) Bernoulli’s equation
dx x x

Using the substitution:


v = y −3
dv dy 1 dv dy
= − 3 y −4 or − = y −4
dx dx 3 dx dx

Hence,
1 dv 2 3
− − v= 2
3 dx x x

or
dv 6 9
+ v=− 2 (ii) Linear in the variable v
dx x x

Solving (ii) by the method of linear differential equation:


 6 
u ( x ) = exp   dx  = exp ( 6 ln x ) = e ln x
6

 x 
u( x ) = x 6
 Integrating factor

Multiply u(x) to the first-order differential equation (ii).


d 9
 vx 6  = − 2 x 6
dx  x
( )
( )
d vx 6 = − 9 x 4 dx
vx 6 = − 9  x 4 dx
−9 5
vx 6 = x +c (iii)
5

Since v = y −3
Lecture Notes 2 – First-Order and First-Degree Differential Equations 35
Engr. Caesar Pobre Llapitan

−9 5
y −3 x 6 = x +c
5
9 5 3
x6 = − x y + cy 3
5

9 5 3
Answer: x6 = − x y + cy 3
5

dr r 2 + 2r
2. =
d 2

Solution:
Writing the equation in Bernoulli’s form:
dr r 2 + 2r
=
d 2
dr r 2 2r
= 2 +
d  
2
dr 2r r
− =
d   2
dr 2 −1 1
r −2 − r = 2 (i) Bernoulli’s equation
d  

Using the substitution:


v = r −1
dv dr dv −2 dr
= − r −2 or − =r
d d d d

Hence,
dv 2 1
− − v= 2
d  

or
dv 2 1
+ v=− 2 (ii) Linear in the variable v
d  

Solving (ii) by the method of linear differential equation:


 2 
u ( ) = exp   d  = exp ( 2ln  ) = e ln
2

  
u ( ) = 2
 Integrating factor

Multiply u() to the first-order differential equation (ii).


d
d
1
( )
 v 2  = − 2  2 = − 1

(
d v = − d
2
)
v 2 = −  d
v 2 = −  + c (iii)
Lecture Notes 2 – First-Order and First-Degree Differential Equations 36
Engr. Caesar Pobre Llapitan

Since v = r −1
r −1 2 = −  + c
 2 = − r + cr

Answer:  2 = − r + cr

3. xy ' = 2 x 2 y + y ln y

Solution:
xy ' = 2 x 2 y + y ln y
y'
x = 2 x 2 + ln y
y

Let v = ln y
dv dy y '
= =
dx y y

Substituting:
dv
x = 2x 2 + v
dx
dv 1
− v = 2x (i) Linear equation in the variable v
dx x

Solving (i) by the method of linear differential equation:


 −1 
u ( x ) = exp   dx  = exp ( − ln x ) = e ln x
−1

 x 
1
u( x ) =  Integrating factor
x

Multiply u(x) to the first-order differential equation (ii).


d  1 1
 v  = 2x   = 2
dx  x  x
v
d   = 2dx
x
v
x 
= 2 dx

v
= 2x + c
x

Since v = ln y
ln y
= 2x + c
x
ln y = 2 x 2 + cx

Answer: ln y = 2 x 2 + cx
Lecture Notes 2 – First-Order and First-Degree Differential Equations 37
Engr. Caesar Pobre Llapitan

Classroom Activity 10
Solve the following differential equations.

( )
dy
1. − y = e x y2 3. y 2 dx + xy − x 3 dy = 0
dx
dy 2 y dy y
2. = − x 2 y2 4. − = xe x
dx x dx x

Exercises 5:
I. Classify each differential equation as separable, exact, linear, homogeneous, or Bernoulli. Some
equations may be more than one kind. Do not solve.
dy x − y dy
=
1
1. = 2.
dx x dx y − x
dy dy 1
3. ( x + 1 ) = − y + 10 4. =
dx x ( x − y )
dx
dy y 2 + y dy
5. = 6. = 5 y + y2
dx x 2 + x dx
7. (
ydx = y − xy 2 dy ) 8.
dy
x = ye x/ y − x
dx
9. xy y ' + y 2 = 2 x 10. 2 xy y ' + y 2 = 2x 2
 2 2y 
11. y dx + x dy = 0 12. x +
 x 
(
 dx = 3 − ln x dy
2
)
dy x y y dy 2 x 3 + y2
13. = + +1 14. +e =0
dx y x x 2 dx

II. Classify each of the following equations below in one or more of the following categories. Write the
letters only.
a. Variable separable
b. Homogeneous equation
c. Equations in which M(x, y) and N(x, y) are linear but not homogeneous
d. Equation with special substitution
e. Exact differential equations
f. Linear first-order differential equations
g. Bernoulli’s equation

Differential equations Answers


1. (1 + 2y)dx + (4 – 2x2)dy = 0
2. y2 dx – x2 dy = 0
3. (xy2 + y)dx + (x2y + x)dy = 0
4. (1 + y)dx – (1 + x)dy = 0
5. (x sin y/x – y cos x/y)dx + x cos y/x dy = 0

6. y x 2 + y 2 dx − x x + ( )
x 2 + y 2 dy = 0

7. (x2 + y2)dx + 2xy dy = 0


Lecture Notes 2 – First-Order and First-Degree Differential Equations 38
Engr. Caesar Pobre Llapitan

8. (x + y cos x)dx + sin x dy = 0


9. 2(u2 + uv)du + (u2 + v2)dv = 0
10. x dy + y dx = x3y6dx
11. (1 + sin y)dx = [2y cos y – x(sec y + tan y)]dy
12. 2 dx/dy – x/y + x3 cos y = 0
13. (2x + 3y + 4)dx + (3x + 4y + 5)dy = 0
14. y(1 + y2)dx = 2(1 – 2xy2)dy
15. (2s – e2t)ds = 2(se2t – cos 2t)dt
16. (1 + e2)d + 2e2 d = 0
17. (x + y + 1)dx – (y – x + 3)dy = 0
18. csc tan dr – (r csc + tan2)d = 0
19. 4xdx + xdy = 0
20. (x3 + y3)dx + 3xy2dy = 0
21. y(1 + 2xy)dx + x(1 – xy)dy = 0
22. 2xy dx + (1 + x2)dy = 0
23. (1 + y2)dx = (tan-1y – x)dy
24. yy' – xy2 + x = 0
25. (2 + y2)dx + 2xy dy = 0

III. Solve the following differential equations subject to any given conditions.
dU U +1
1. 2 y dx + e −3 x dy = 0 2. =
ds s + sU
dy 1 + x − y dy y + x cos ( y / x )
2
3. = 4. = ; y(1) =  / 4
dx 1 − x − y dx x
dy y ( 1 + xy )
5. =
dx x ( 1 − xy )
6. ( 3 x − y − 9 ) y ' = 10 − 2x + 2 y
7. y dx = ( 2 x + 3 y ) dy 8. (x 3
)
+ y 3 dx − xy 2 dy = 0 ; y(1) = 0
Lecture Notes 2 – First-Order and First-Degree Differential Equations 39
Engr. Caesar Pobre Llapitan

Problem Sets
Set A
Solve each of the following differential equations subject to given conditions, if any.

Answers
1. (x2 + 1) (y-3 – 1) dx = x2y2 dy ▪ x – x-1 = 1/3 ln(y3 – 1) + c
2. (y2 + 2xy) dx + (x2 + 2xy) dy = 0 ▪ x2y + y2x = c
3. (x2 + 2xy) dx + (y2 + 2xy) dy = 0 ▪ x2 + xy + y2 = c(x + y)
dy 2 y ▪ 5x2y = x5 + c
4. + = x2
dx x
dy ▪ y = 2x – x2 + c
5. + 2x = 2
dx

 y+3
2 ▪ (y + 3)-1 = (4x)-1 + c
11. y'= 
 2x 
12. xy' = 3y + x4e-x ▪ y = cx3 – x3e-x
13. xy' + y lnx = y lny + y ▪ ln y = cx + ln x
14. x dy – y dx = 2x2y2 dy ▪ 2xy3 = 3y + cx
15. (ey + x + 3)y' = 1 ▪ x = yey – 3 + cey

Set B
Solve each of the following differential equations subject to given conditions, if any.

Answers
1. 2xyy' + x2 + y2 = 0 ▪ x3 + 3xy2 = c
2. x2y' + xy = x + 1 ▪ xy = x + lnx + c
dy
3. =x+y ▪ x + y + 1 = cex
dx
4. (3 – x2y)y' = xy2 + 4 ▪ ½ x2y2 + 4x – 3y = c
5. y' = x2 + 2y ▪ y = cex – x2/2 – x/2 – ¼

dr r ( 1 + ln  )
6. = ;  = e2 where r = e ▪ 2 lnr + (lnr)2 = 2 ln + (ln)2 – 5
d  ( 1 + ln r )

7.
dU
dt
= − a (U − 100t ) ; U(0) = 0 ▪ U = 100t −
100
a
(
1 − e −at )
dI
8. + 3 I = 10 sin t ; I(0) = 0 ▪ I = 3 sint – cost + e-3t
dt
ds 1
9. = ▪ s – ln(s + t + 2) = c
dt s + t + 1
10. y' + (cotx)y = cosx ▪ 2y sinx + cos2x = c
11. y' = ey/x + y/x ▪ e-y/x + lnx = c
Lecture Notes 2 – First-Order and First-Degree Differential Equations 40
Engr. Caesar Pobre Llapitan

12. sin x cos y dx + cos x sin y dy = 0 ▪ cos x cos y = c

13. (1 + y)y' = x y ▪ 2y1/2 + 2/3 y3/2 = x2/2 + c

14. tan x sin y dx + 3 dy = 0 ▪ sec x(csc y – cot y)3 = c


y y
15. xdy – ydx = x cos(y/x) dx ▪ sec + tan = cx
x x

Set C
Solve each of the following differential equations subject to given conditions, if any.

Answers
1. 2 2
(x + y )dx + 2ydy = 0; y(0) = 2 ▪ x + y – 2x + 2 = 6e-x
2 2

2. s2t ds + (t2 + 4) dt = 0 ▪ 2s3 + 3t2 + 24 lnt = c

dy 2 x 2 − ye x
3. = ▪ 3yex – 2x3 = c
dx ex
4. r2 sin d = (2r cos + 10)dr ▪ r2 cos + 10r = c
5. y'(2x + y2) = y ▪ y2 lny – x = cy2
dr
6. = e − 3r ; r = 1 at  = 0 ▪ r = ¼ e + ¾ e-3
d

dy x + 3y  x + 3y 
7. =
dx x − 3y
▪ ( )
ln x 2 + 2 xy + 3 y 2 = 2 2 tan −1 
 x 2 
+c

8. y' cosx = y – sin 2x ▪ y(sec x – tan x) = 2ln(1 + sin x) – 2sinx + c

9. e2 x − y dx + e y − 2 x dy = 0 ▪ e4x + 2e2y = c

10. (2x2 – yex) dx – ex dy = 0 ▪ 2x3 – 3yex = c


11. x dy – y dx = x2y dy ▪ xy2 – 2y = cx
dq p p2 − q2
12. = e ▪
2
e p − eq = c
2

dp q

13. (3y cosx + 2)y' = y2 sinx; y(0) = -4 ▪ y3 cosx + y2 + 48 = 0


14. (x + x cosy) dy – (y + siny) dx = 0 ▪ y + sin y = cx
15. y2 dx = (2xy + x2) dy ▪ y2 = x(c – y)

Review Materials
1. Basic integration formulas
2. Techniques of integration: integration by parts and partial fraction decomposition
3. Multivariate calculus
4. Partial differentiation and partial integration
5. Differential of a function of two variables
Lecture Notes 2 – First-Order and First-Degree Differential Equations 41
Engr. Caesar Pobre Llapitan

References:
1. Boyce, William E. and Richard C. DiPrima (2001). Elementary Differential Equations and
Boundary Value Problems (7th Edition). New York: John Wiley & Sons, Inc.
2. Rainville, Earl D. and Phillip E. Bedient (2002). Elementary Differential Equations (8th
Edition). USA: Macmillan Publishing Co., Inc.
3. Spiegel, Murray R (1980). Applied Differential Equations (Third Edition). Prentice Hall
4. Kreyszig, Erwin, Herbert Kreyszig and Edward J. Norminton (2011). Advanced Engineering
Mathematics (10th Edition) New York: John Wiley and Sons.
5. Zill, Dennis G. (2019). Differential Equations with Boundary-Value Problems (9th
International Metric Edition). USA: Brooks/Cole Cengage Learning

You might also like