Lecture Notes 2 - Differential Equations 2020
Lecture Notes 2 - Differential Equations 2020
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
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.
M dx + N dy = 0 (1)
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
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
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
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
1 sin d 1 − sin d
=
2 1 + cos
2
=−
2 1 + ( cos )2
1
= − tan −1 ( cos ) + c2
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
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
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
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
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.
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 )
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)
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
y/x = v or y = vx (a)
Then
dy dv
=v+x (b)
dx dx
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)
Let
x = vy
dx = v dy + y dv
(v 2
)
− 2v − 1 dy − y ( v − 1 ) dv = 0 (b) (variable separable)
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
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.
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)
ln x + ln v dv = c (c)
dv
ln v dv = v ln v − v v
= v ln v − dv
= v ln v − v
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
M = a1 x + b1 y + c1
Linear functions
N = a2 x + b2 y + c2
Case 1:
The equation (a1x + b1y + c1) dx + (a2x + b2y + c2) dy = 0 where
a1b2 – a2b1 = 0
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
Case 2
The equation (a1x + b1y + c1) dx + (a2x + b2y + c2) dy = 0 where
a1b2 – a2b1 0
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
Hence, it is Case 1.
Let x+y=t
dx + dy = dt dx = dt – dy (since dx has simpler coefficient)
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)
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
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
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
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)
If v = 4, then B = 1/3
If v = -1/2, then A = 4/3
( y ' ) 3 ( 2 v + 1 )2 ( v − 4 ) = C
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.
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 yf(x, y) dx + xg(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
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
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
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
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
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
Classroom Activity 5
1. Solve tan2(x + y) dx – dy = 0
Let x+y=v Answer 2(x – y) = C + sin 2(x + y)
Let x2y1/2 = v
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
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.
Given:
M dx + N dy = 0 or dy/dx = -M/N (1)
U(x, y) = C (2)
But
U U
dU = dx + dy = 0 (3)
x y
dy − U
= x (4)
dx U
y
U / x M
=
U / y N
U / x U / y
= =
M N
U U
= M = N (5)
x y
(Mdx + Ndy) = 0 = dU
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 Mdx + Ndy = 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.
If the differential equation Mdx + Ndy = 0 is exact, then by definition there is a function U(x, y) such
that Mdx + Ndy = dU
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
= =
xy y yx 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
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
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
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
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
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)
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
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
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.
3. xdy – ydx 1 dy dx y
− = d ln
xy y d x
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
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
( 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
Therefore, u = xy
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
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!
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
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 y only, then go to step 3. Otherwise, you cannot solve the
equation using the technique developed above!
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
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 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
x csc y + y = c
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
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.
dy
a1 (x ) + a0 (x ) y = g(x ) (1)
dx
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
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
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
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
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
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
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
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
x
u( x ) = x 6
Integrating factor
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
Hence,
dv 2 1
− − v= 2
d
or
dv 2 1
+ v=− 2 (ii) Linear in the variable v
d
u ( ) = 2
Integrating factor
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
x
1
u( x ) = Integrating factor
x
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
6. y x 2 + y 2 dx − x x + ( )
x 2 + y 2 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
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
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
9. e2 x − y dx + e y − 2 x dy = 0 ▪ e4x + 2e2y = c
dp q
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