0% found this document useful (0 votes)
12 views24 pages

Math 113 Module 2

The document discusses exact equations in the context of differential equations, explaining the concept of exact differentials and providing a criterion for determining if a differential expression is exact. It includes examples demonstrating the process of finding solutions to exact differential equations by integrating the functions M(x, y) and N(x, y). The document also outlines methods for solving these equations and presents specific examples with detailed calculations.

Uploaded by

rafolsjewels1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views24 pages

Math 113 Module 2

The document discusses exact equations in the context of differential equations, explaining the concept of exact differentials and providing a criterion for determining if a differential expression is exact. It includes examples demonstrating the process of finding solutions to exact differential equations by integrating the functions M(x, y) and N(x, y). The document also outlines methods for solving these equations and presents specific examples with detailed calculations.

Uploaded by

rafolsjewels1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

33

2.3 Exact Equations


Recall from Calculus 1: If z = f (x, y) is a function of two variables with continuous first
partial derivatives in a region R of the xy-plane, then its differential is
∂f ∂f
dz = dx + dy (1)
∂x ∂y

In the special case when f (x, y) = c, where c is a constant, then (1) implies

∂f ∂f
dx + dy = 0 (2)
∂x ∂y

In other words, given a one-parameter family of functions f (x, y) = c, we can generate a

e
first-order differential equation by computing the differential of both sides of the equality.

Us
Example 8. If f (x, y) = x2 − 5xy + y 3 = c, then (2) gives the first order DE:

l
∂f ∂f

cia
dx + dy = 0
∂x ∂y
∂ 2 ∂ 2
(x − 5xy + y 3 ) dx + (x − 5xy + y 3 ) dy = 0
er
∂x ∂y
m
(2x − 5y)dx + (−5x + 3y 2 )dy = 0
[Note that in partial derivative with respect to x, we treat y as a constant (and vice versa).]
om

Notations:
∂f ∂f
C

We use the notation := M (x, y) and := N (x, y). Then (2) can be rewritten as
∂x ∂y
or

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


tF

∂f ∂f
We can see from Example 8 that = M (x, y) = 2x − 5y and = N (x, y) = −5x + 3y 2 .
∂x ∂y
No

Definition 3: Exact Equation

A differential expression M (x, y)dx + N (x, y)dy is an exact differential in a region


R of the xy-plane if it corresponds to the differential of some function f (x, y) defined
in R.
A first-order differential equation of the form

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

is said to be an exact equation if the expression on the left-hand side is an exact


differential.
34

Theorem 1: Criterion for an Exact Differential


Let M (x, y) and N (x, y) be continuous and have continuous first partial derivatives
in a rectangular region R defined by a < x < b, c < y < d. Then a necessary and
sufficient condition that M (x, y)dx + N (x, y)dy be an exact differential is

∂M ∂N
= (4)
∂y ∂x

Remarks 4. The idea of the previous theorem relies on the fact that
   
∂ ∂f ∂ 2f ∂ ∂f ∂ 2f
= = =
∂y ∂x ∂y ∂x ∂x ∂y ∂x ∂y

e
Us
Therefore,    
∂M ∂ ∂f ∂ ∂f ∂N
= = =
∂y ∂y ∂x ∂x ∂y ∂x

l
cia
Method of Solution: Given an equation in the differential form M (x, y)dx+N (x, y)dy = 0,
determine whether the equality in (4) holds. If it does, then there exists a function f for
er
which
∂f
= M (x, y).
m
∂x
We can find f by integrating M (x, y) with respect to x while holding y constant:
om

Z
f (x, y) = M (x, y)dx + g(y), (5)
C

where the arbitrary function g(y) is the constant of integration. Now differentiate (5) with
or

∂f
respect to y and assume that = N (x, y) :
tF

∂y
Z
∂f ∂
= M (x, y) dx + g 0 (y) = N (x, y).
No

∂y ∂y
This gives Z
0 ∂
g (y) = N (x, y) − M (x, y) dx (6)
∂y
Finally, integrate (6) with respect to y and substitute the result in (5). The (implicit)
general solution of the exact DE is of the form f (x, y) = C.
∂f
We can also start the foregoing procedure with the assumption that = N (x, y). After
∂y
integrating N with respect to y and then differentiating that result, we would find the
analogues of (5) and (6) to be, respectively,
Z Z
0 ∂
f (x, y) = N (x, y) dy + h(x) and h (x) = M (x, y) − N (x, y) dy.
∂x
35

Example 9. Find the solution of the following exact DE.


1. 2xy dx + (x2 − 1) dy = 0

Solution: We identify M (x, y) = 2xy and N (x, y) = x2 − 1. Then


∂M ∂
= (2xy) = 2x
∂y ∂y
∂N ∂ 2
= (x − 1) = 2x
∂x ∂x
∂M ∂N
∴ =
∂y ∂x
Thus, the DE is exact. By Theorem 1, there exists a function f (x, y) such that
∂f ∂f

e
M (x, y) = = 2xy and N (x, y) = = x2 − 1.

Us
∂x ∂y
∂f
Integrating M (x, y) = = 2xy with respect to x, we have
∂x

l
Z Z Z

cia
∂f
dx = f (x, y) = 2xy dx = 2y x dx ←− y is treated as a constant
∂x
 2
er
x
f (x, y) = 2y + g(y) ←− g(y) is the constant of integration
2
m
f (x, y) = x2 y + g(y)
om

Taking the partial derivative of f (x, y) = x2 y + g(y) with respect to y and equating to
N (x, y), we have
C

∂ ∂ 2
f (x, y) = [x y + g(y)] = x2 + g 0 (y) = x2 − 1 = N (x, y)
∂y ∂y
or

It follows that g 0 (y) = −1. Integrating g 0 (y) with respect to y, we have


Z Z
tF

0
g (y) dy = −dy ⇐⇒ g(y) = −y.
No

Take note that no arbitrary constant is needed in obtaining g(y) since there is one
already on the right side in the solution f (x, y) = C
Hence, f (x, y) = x2 y + g(y) = x2 y − y.
Therefore, the (implicit) general solution to the exact DE is
f (x, y) = C ⇐⇒ x2 y − y = C

∂f
Alternative Solution: In this case, we choose to integrate N (x, y) = = x2 − 1
∂y
with respect to y, we have
Z Z Z
∂f 2 2
dy = f (x, y) = (x − 1) dy = (x − 1) dy ←− x treated as constant
∂y
f (x, y) = (x2 − 1)y + h(x) ←− h(x) is the constant of integration
f (x, y) = x2 y − y + h(x)
36

Taking the partial derivative of f (x, y) = x2 y − y + h(x) with respect to x and equating
to M (x, y), we have

∂ ∂ 2
f (x, y) = [x y − y + h(x)] = 2xy + h0 (x) = 2xy = M (x, y)
∂x ∂x
It follows that h0 (x) = 0. Integrating h0 (x) = 0 with respect to x will give us h(x) = c1 .
Hence, f (x, y) = x2 y − y + h(x) = x2 y − y + c1 , where c1 is constant
Therefore, the (implicit) general solution to the exact DE is

f (x, y) = C ⇐⇒ x2 y − y = C

2. [e2y − y cos(xy)] dx + [2xe2y − x cos(xy) + 2y] dy = 0

e
Us
Solution: We identify M (x, y) = e2y − y cos(xy) and N (x, y) = 2xe2y − x cos(xy) + 2y.
Then
∂M ∂ 2y

l
[e − y cos(xy)] = 2e2y + xy sin(xy) − cos(xy)

cia
=
∂y ∂y
∂N ∂
= [2xe2y − x cos(xy) + 2y] = 2e2y + xy sin(xy) − cos(xy)
er
∂x ∂x
∂M ∂N
m
∴ =
∂y ∂x
om

Thus, the DE is exact. By Theorem 1, there exists a function f (x, y) such that
C

∂f ∂f
M (x, y) = = e2y − y cos(xy) and N (x, y) = = 2xe2y − x cos(xy) + 2y
∂x ∂y
or
tF

[Note: The choice between M (x, y) or N (x, y) in solving for f (x, y) is up to the reader.
But in this example, we choose N (x, y) as our working function.]
∂f
No

Integrating N (x, y) = = 2xe2y − x cos(xy) + 2y with respect to y (treat x as


∂y
constant), we have
Z Z
∂f
dy = f (x, y) = [2xe2y − x cos(xy) + 2y]dy
∂y
Z Z Z
2y
f (x, y) = 2x e dy − x cos(xy)dy + 2 y dy
Z Z Z
1 2y

f (x, y) = 2x · e (2dy) − [cos(xy)](x dy) + 2 y dy
2
f (x, y) = xe2y − sin(xy) + y 2 + h(x); h(x) is constant of integration
37

Taking the partial derivative of f (x, y) = xe2y − sin(xy) + y 2 + h(x) with respect to x
and equating to M (x, y), we have

∂ ∂
f (x, y) = [xe2y − sin(xy) + y 2 + h(x)]
∂x ∂x
= e2y − y cos(xy) + h0 (x)
= e2y − y cos(xy) = M (x, y)

It follows that h0 (x) = 0. Integrating h0 (x) = 0 with respect to x will give us h(x) = c1 .
Hence, f (x, y) = xe2y − sin(xy) + y 2 + c1
Therefore, the (implicit) general solution to the exact DE is

f (x, y) = C ⇐⇒ xe2y − sin(xy) + y 2 = C

e
Us
3. (cos x sin x − xy 2 )dx + y(1 − x2 )dy = 0 ; y(0) = 2 ←− IVP Exact DE

l
Solution: We identify M (x, y) = cos x sin x − xy 2 and N (x, y) = y(1 − x2 ). Then

∂M
=

cia
(cos x sin x − xy 2 ) = −2xy
er
∂y ∂y
∂N ∂
m
= [y(1 − x2 )] = −2xy
∂x ∂x
om

∂M ∂N
∴ =
∂y ∂x
C

Thus, the DE is exact. By Theorem 1, there exists a function f (x, y) such that
or

∂f ∂f
M (x, y) = = (cos x sin x − xy 2 ) and N (x, y) = = y(1 − x2 )dy
∂x ∂y
tF

∂f
Integrating N (x, y) = = y(1 − x2 ) with respect to y, we have
No

∂y
Z Z
∂f
dy = f (x, y) = y(1 − x2 ) dy
∂y
Z
2
f (x, y) = (1 − x ) y dy ←− x is treated as a constant
y2
f (x, y) = (1 − x2 ) + h(x) ←− h(x) is the constant of integration
2
y2
Taking the partial derivative of f (x, y) = (1 − x2 ) + h(x) with respect to x and
2
equating to M (x, y), we have
 
∂ ∂ y2
f (x, y) = (1 − x ) + h(x) = −xy 2 + h0 (x) = cos x sin x − xy 2 = M (x, y)
2
∂x ∂x 2
38

It follows that h0 (x) = cos x sin x. Integrating h0 (x) with respect to x will give us
Z
1
h(x) = − (cos x)(− sin x dx) = − cos2 x
2
y2 1
Hence, f (x, y) = (1 − x2 ) − cos2 x
2 2
Therefore, the (implicit) general solution to the exact DE is

y2 1
f (x, y) = C ⇐⇒ (1 − x2 ) − cos2 x = C1
2 2
f (x, y) = C ⇐⇒ y (1 − x ) − cos2 x = C ; 2C1 = C is constant
2 2

Since y(0) = 2, substitute x = 0 and y = 2 to solve for C :


(22 )(1 − 02 ) − (cos 0)2 = C ⇐⇒ 4 − 1 = C =⇒ C = 3.

e
Us
∴ y 2 (1 − x2 ) − cos2 x = 3 ←− solution to the IVP

2.4 Differential Equations with Homogeneous Coefficients

l
Definition 4: Homogeneous Equations cia
er
If a function f satisfies the property f (λx, λy) = λα f (x, y) for some real number α,
m
then f is said to be a homogeneous function of degree α. A first-order DE
om

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

is said to be homogeneous* if both coefficient functions M and N are homogeneous


C

functions of the same degree. That is, (1) is homogeneous if


or

M (λx, λy) = λα M (x, y) and N (λx, λy) = λα N (x, y).


tF

Note: *Here the word homogeneous does not mean the same as it did in Section 2.2. Recall
dy
No

that a linear first-order equation a1 (x) + a0 (x)y = g(x) is homogeneous when g(x) = 0.
dx
Example 10.

1. f (x, y) = x3 + y 3 is homogeneous of degree 3 since


f (λx, λy) = (λx)3 + (λy)3 = λ3 x3 + λ3 y 3 = λ3 (x3 + y 3 ) = λ3 f (x, y)

2. f (x, y) = x2 y 2 + xy is not homogeneous since


f (λx, λy) = (λx)2 (λy)2 + (λx)(λy) = λ4 (x2 y 2 ) + λ2 (xy) 6= λα f (x, y) for some α ∈ R.
39

Method of Solution: If M and N are homogeneous functions of degree α, we can write


y
M (x, y) = xα M (1, u) and N (x, y) = xα N (1, u), where u = , (2)
x
x
M (x, y) = y α M (v, 1) and N (x, y) = y α N (v, 1), where v = , (3)
y
The substitutions that can be used to solve a homogeneous differential equation. Specifically,
either of the substitutions y = ux or x = vy, where u and v are new dependent variables,
will reduce a homogeneous equation to a separable first-order differential equation.

Example 11.
1. Show that (x2 + y 2 )dx + (x2 − xy)dy = 0 is a homogeneous DE and then find its

e
solution.

Us
Solution: We identify M (x, y) = x2 + y 2 and N (x, y) = x2 − xy. Observe that
M and N are both homogeneous of degree 2 since

l
cia
M (λx, λy) = (λx)2 + (λy)2 = λ2 (x2 + y 2 ) = λ2 M (x, y)
N (λx, λy) = (λx)2 − (λx)(λy) = λ2 (x2 − xy) = λ2 N (x, y)
er
Let y = ux, then dy = udx + xdu. Substitute these to the given DE, we have
 2 
m
x + (ux)2 dx + [x2 − x(ux)](udx + xdu) = 0
om

(x2 + u2 x2 ) dx + (x2 − ux2 )(udx + xdu) = 0


(x2 + u2 x2 ) dx + (ux2 − u2 x2 ) dx + (x3 − ux3 ) du = 0
x2 (1 + u) dx + x3 (1 − u)du = 0
C

 
dx 1−u
+ du = 0 ←− by separating variables
or

x 1+u
 
tF

dx 2
+ −1 + du = 0 ←− by long division
x 1+u
Z Z   Z
dx 2
No

+ −1 + du = 0 dx ←− integrate both sides


x 1+u
y
ln |x| − u + 2 ln |1 + u| = C ←− back substitute u =
x
y y
∴ ln |x| − + 2 ln 1 + = C ←− (implicit) general solution
x x

Note: It will be tedious to solve for the explicit general solution for y so we skip that
part. The reader can also verify that the general solution may be written as
(x + y)2 y
ln = or (x + y)2 = Cxey/x
Cx x
using the properties of logarithms. We can also use the substitution x = vy whenever
the function M (x, y) is simpler than N (x, y).
40

2. Show that (x3 − y 3 )dx + xy 2 dy = 0 is a homogeneous DE and solve the IVP: y(1) = 2.

Solution: We identify M (x, y) = x3 − y 3 and N (x, y) = xy 2 . Observe that M and N


are both homogeneous of degree 3 since

M (λx, λy) = (λx)3 − (λy)3 = λ3 (x3 − y 3 ) = λ3 M (x, y)


N (λx, λy) = (λx)(λy)2 = λ3 (xy 2 ) = λ3 N (x, y)

Let x = vy, then dx = vdy + ydv. Substitute these to the given DE, we have
 
(vy)3 − y 3 (vdy + ydv) + (vy)y 2 dy = 0
(v 3 y 3 − y 3 )(vdy + ydv) + vy 3 dy = 0

 

v 4 y 3 dy + v 3 y 4 dv −  vy3
dy − y 4 dv + vy 3
dy = 0

e
4 3 4 3
v y dy + y (v − 1)dv = 0

Us
 3 
dy v −1
+ dv = 0 ←− by separating variables
y v4
Z Z Z Z

l
cia
dy dv −4
+ − v dv = 0 dx ←− integrate both sides
y v
 −3 
v
er
ln |y| + ln |v| − =C
−3
m
1 x
ln |y| + ln |v| + 3 = C ←− back substitute v =
om

3v y
x 1
ln |y| + ln +  3 = C
y x
C

3
y
or

3
ln  + ln |x| − ln
|y| + y = C
|y|
  3x3
tF

y3
ln |x| + 3 = C ←− (implicit) general solution
3x
No

Since y(1) = 2, substitute x = 1 and y = 2 to solve for C :


(2)3 8 8
ln |1| + 3
= C ⇐⇒ 0 + = C =⇒ C = .
3(1) 3 3
y3 8
∴ ln |x| + 3
= or 3x3 ln |x| + y 3 = 8x3 ←− (implicit) solution to the IVP
3x 3
41

Activity 2

A. Determine the value of k so that the given differential equation is exact.


 
1. y 3 + kxy 3 − 2x dx + 3xy 2 + 20x2 y 3 dy = 0
 
2. 6xy 3 + cos y dx + 2kx2 y 2 − x sin y dy = 0

B. Determine whether the given differential equation is exact. If exact, solve it.
 
1. 2xy 2 − 3 dx + 2x2 y + 4 dy = 0
dy
2. x = 2xex − y + 6x2
dx
 

e
3. 4t3 y − 15t2 − y dt + t4 + 3y 2 − t dy = 0

Us
C. Solve the given differential equations with homogeneous coefficients using appropriate
substitutions.

l
cia
√ 
1. −ydx + x + xy dy = 0

er
2. x + yey/x dx − xey/x dy = 0
m
D. Solve the following initial-value problems.
om

1. (4y + 2t − 5)dt + (6y + 4t − 1)dy = 0, y(−1) = 2


 
2. y 2 cos x − 3x2 y − 2x dx + 2y sin x − x3 + ln y dy = 0, y(0) = e
C

dy
3. xy 2 = y 3 − x3 , y(1) = 2
or

dx
tF
No
42

2.5 Other Methods for First-Order ODE


Reduction to Separation of Variables

A differential equation of the form

dy
= f (Ax + By + C)
dx

can always be reduced to a differential equation with separable variables by using the sub-
stitution

u = Ax + By + C, B 6= 0.

e
Us
Example 12. Solve the following differential equations.

l
dy

cia
1. = (x + y + 1)2
dx
er
Solution:
du dy dy du
Let u = x + y + 1. Then =1+ =⇒ = − 1.
m
dx dx dx dx
The differential equation now becomes
om

du du
− 1 = u2 =⇒ = u2 + 1.
dx dx
C

Separate the variables and take the integral of both sides


or

Z Z
tF

du
= dx
u2 + 1
tan−1 u = x + c1 ←− but u = x + y + 1
No

tan−1 (x + y + 1) = x + C

Solving the last equation for y: x + y + 1 = tan(x + C) =⇒ y = tan(x + C) − x − 1

dy
2. = tan2 (x + y)
dx
Solution:
du dy dy du
Let u = x + y. Then =1+ =⇒ = − 1.
dx dx dx dx
The differential equation now becomes

du du
− 1 = tan2 u =⇒ = tan2 u + 1.
dx dx
43

Separate the variables and take the integral of both sides


Z Z
du 1
2
= dx ←− use identities tan2 u + 1 = sec2 u ; cos2 u =
tan u + 1 sec2 u
Z Z
1 + cos 2u
cos2 udu = dx ←− use the identity cos2 u =
2
Z Z
1 + cos 2u
du = dx
2
Z   Z
1 cos 2u
+ du = dx
2 2
1 1
u + sin 2u = x + c1
2 4

e
Multiply both sides of the last equation by 4 and substitute u = x + y. Hence, we

Us
have
2(x + y) + sin 2(x + y) = 4x + C or 2y − 2x + sin 2(x + y) = C

l
cia
Coefficients Linear in Two Variables er
Consider a differential equation of the form
 
m
a1 x + b1 y + c1 dx + a2 x + b2 y + c2 dy = 0 (1)
om

where a, b, c are constants. If c1 and c2 are both 0, then (1) becomes a differential equation
with homogeneous coefficient.
C

Now, consider the lines formed by the coefficients of dx and dy,

a1 x + b1 y + c1 = 0
or

(2)
a2 x + b 2 y + c 2 = 0
tF

a1 b1
• If the lines in (2) are parallel, that is,
= , then (1) can be solved by reduction
a2 b2
No

to separation of variables. In this case, we use the substitution u = a1 x + b1 y or


u = a2 x + b2 y.
a1 b1
• If the lines in (2) are intersecting, that is,
6= , then (1) can be solved by reduction
a2 b2
to differential equation with homogeneous coefficients. In this case, we use the
substitutions x = u + h and y = v + k, where (h, k) is the intersection point (2).
44

Example 13.
1. Solve: (x + 2y − 1)dx + (3x + 6y)dy = 0
Solution: From the given differential equation, the linear coefficients are parallel, that
1 3
is, = .
3 6
Let u = x + 2y. Then du = dx + 2dy =⇒ dx = du − 2dy. We now have,
(x + 2y − 1)dx + 3(x + 2y)dy = 0
(u − 1)(du − 2dy) + 3udy = 0
(u − 1)du − 2(u − 1)dy + 3udy = 0
(u − 1)du + (u + 2)dy = 0 ←− separate the variables
Z Z
u−1
du = − dy ←− integrate both sides
u+2

e
Z   Z

Us
3
1− du = − dy ←− by long division
u+2
u − 3 ln |u + 2| = −y + C ←− but u = x + 2y

l
cia
x + 2y − 3 ln |x + 2y + 2| = −y + C or x + 3y − 3 ln |x + 2y + 2| = C
er
dy −3x + 2y
2. Solve: = , y(−1) = −1
dx −3x + 2y + 2
m
a1 b1
Solution: It can be clearly seen from the given that = .
a2 b2
om

du + 3dx
Let u = −3x + 2y. Then du = −3dx + 2dy =⇒ dy = .
2
C

(Note: From the substitution, we can choose to solve for either dx or dy.)
We now have,
or

(3x + 2y + 2)dy = (3x + 2y)dx


 
tF

du + 3dx
(u + 2) = udx ←− multiply both sides by 2
2
(u + 2)(du + 3dx) = 2udx
No

(u + 2)du + (3u + 6)dx = 2udx


(u + 2)du + (u + 6)dx = 0 ←− separate the variables
Z Z
u+2
du = − dx ←− integrate both sides
u+6
Z   Z
4
1− du = − dx ←− by long division
u+6
u − 4 ln |u + 6| = −x + c1 ←− but u = 3x + 2y
3x + 2y − 4 ln |3x + 2y + 6| = −x + c1 or 2x + y − 2 ln |3x + 2y + 6| = C
Since y(−1) = −1, substitute x = −1 and y = −1 to solve for C:
2(−1) + (−1) − 2 ln |3(−1) + 2(−1) + 6| = C =⇒ C = −3
∴ 2x + y − 2 ln |3x + 2y + 6| = −3 ←− solution to IVP
45

3. Solve: (2x − y)dx + (4x + y − 6)dy = 0

Solution: The lines 2x − y = 0 and 4x + y − 6 = 0 intersect at (1, 2).


Let x = u + 1 and y = v + 2.
Then dx = du and dy = dv.
We now have, [2(u + 1) − (v + 2)]du + [4(u + 1) + (v + 2) − 6]dv = 0
Simplify the coefficients of du and dv: (2u − v)du + (4u + v)dv = 0
From the last equation, we use the substitution, u = wv and du = (wdv + vdw).

(2wv − v)(wdv + vdw) + (4wv + v)dv =0


2w vdv + 2wv 2 dw − vwdv − v 2 dw + 4wvdv + vdv
2
=0
(2w2 v + 3wv + v)dv + (2wv 2 − v 2 )dw =0
v(2w2 + 3w + 1)dv + v 2 (2w − 1)dw = 0 ←− use separation of variables

e
Z Z Z

Us
dv 2w − 1
+ dw = 0 dv
v 2w2 + 3w + 1

l
By partial fraction decomposition, we have,
Z
dv
+
Z 
−4
+ cia3
 Z
dw = 0 dv
er
v 2w + 1 w + 1
1
m
ln |v| − 4 · ln |2w + 1| + 3 ln |w + 1| = c1
2
om

u
Replace w = , u = x − 1, and v = y − 2. Hence, we have
v
 
C

x−1 x−1
ln |y − 2| − 2 ln 2 + 1 + 3 ln + 1 = c1
y−2 y−2
or

Applying some properties of logarithms, we can write the solution as


tF

(x+y-3)3 = C(2x + y − 4)3 .


No

Bernoulli’s Equation

Sometimes it is possible to solve a nonlinear equation by making a change of the dependent


variable that converts it into a linear equation. In this case, we can solve such equation by
means of integrating factor method. The most important such equation has the form
dy
+ R(x)y = S(x)y n (3)
dx
where n ∈ R, called the Bernoulli’s equation or Bernoulli DE. If n = 0 or n = 1, then
(3) is linear.
46

Method of Solution: For n 6= 1


If we multiply both sides of (3) by y −n , it becomes
dy
y −n + y 1−n R(x) = S(x) (4)
dx
du dy
Let u = y 1−n . Then = (1 − n)y −n .
dx dx
Multiply both sides of (4) by (1 − n).
dy
(1 − n)y −n + (1 − n)y 1−n R(x) = (1 − n)S(x)
dx
The Bernoulli differential equation is now transformed into the form
du

e
+ (1 − n)R(x) u = (1 − n)S(x) (5)
dx

Us
The above equation is now linear in u and can be solved by integrating factor method.
du

l
+ P (x) u = f (x) (6)

cia
dx
Example 14. Find the solution of the following Bernoulli DE.
er
dy y y −2
1. + =
m
dx x x
dy y y −2
om

+ = ←− multiply both sides by y 2


dx x x
3
dy y 1
y2 + = (1)
C

dx x x
du dy
Let u = y 3 . Then = 3y 2 . Multiply both sides of (1) by 3.
or

dx dx
tF

2 dy 3y 3 3
3y + =
dx x x
du 3 3
No

+ u= ←− standard form, linear in u


dx x x
R 3
3dx/x
IF: e = e3 ln x = eln x = x3
du
x3 + 3ux2 = 3x2 ←− multiply both sides of standard form by IF: x3
| dx {z }
 
d
x3 u = 3x2
dx
Z   Z
d x u = 3x2 dx
3

x3 u = x3 + C ←− but u = y 3
x3 y 3 = x3 + C or y 3 = 1 + Cx−3
47

dy
2. x + y = x2 y 2 ln x
dx
Solution: Dividing by x we obtain the Bernoulli DE:
dy 1
+ y = (x ln x)y 2
dx x
1 1
We identify R(x) = , S(x) = x ln x, and n = 2, so that u = y 1−n = y −1 = .
x y
The linear equation form of the Bernoulli DE, from (5), will be

du 1 du 1
+ (1 − 2) u = (1 − 2) x ln x ⇐⇒ − u = −x ln x
dx x dx x

e
We can now solve this by integrating factor method.

Us
1 R −1 1
We identify P (x) = − and I.F. = e (−1/x)dx = e− ln x = eln x = x−1 = .
x x
1
Multiply I.F. = to the standard form, we have

l
x

1 du 1

1
− u = (−x ln x) cia
er
x dx x x
1 du 1 1
m
− 2 u = (−x ln x)
|x dx {z x } x
om

 
d 1
u = − ln x ←− refer to Step #3 and #4 in Section 2.2
dx x
Z   Z Z
C

u
d = − ln x dx ←− use Integration by Parts to ln x dx
x
or

u
= −(x ln x − x) + C = −x ln x + x + C
x
tF

1
u = −x2 ln x + x2 + Cx ←− back substitute u =
y
No

1
= −x2 ln x + x2 + Cx
y
1
∴ y=
−x ln x + x2 + Cx
2

R Z Z
*For ln x dx
Let u = ln x and dv = dx ln x dx = x ln x − dx
dx
Then du = and v = x = x ln x − x + c1
x
48

dy
3. + y = xy 4 ; y(0) = 1
dx
1
Solution: We identify R(x) = 1, S(x) = x, and n = 4. So that u = y 1−n = y −3 = .
y3
The linear equation form of the Bernoulli DE will be
du du
+ (1 − 4)(1)u = (1 − 4)x ⇐⇒ − 3u = −3x
dx dx
We can now solve this by integrating factor
R method.
−3 dx
We identify P (x) = −3 and I.F. = e = e−3x .
Multiply I.F. = e−3x to the standard form, we have
 
−3x du
e − 3u = e−3x (−3x)

e
dx

Us
d −3x 
e u = −3xe−3x ←− refer to Step #3 and #4 in Section 2.2
Zdx Z Z
−3x
 −3x
d ue = −3 xe dx ←− use Integration by Parts to xe−3x dx

l
ue −3x

= −3 − xe
1 −3x 1 −3x
3
− e
9 cia 
+ C1
er
u −3x 1 −3x
= xe + e + C1
m
e3x 3
1 1
om

u = x + + C1 e3x ←− back substitute u = 3


3 y
1 3x + 1 + 3C1 e3x
C

= ←− take the reciprocal ; 3C1 = C


y3 3
3
or

y3 = ←− general solution
3x + 1 + Ce3x
tF

Since y(0) = 1, substitute x = 0 and y = 1 to solve for C :


3
(1)3 = ⇐⇒ 1 + C = 3 =⇒ C = 2
No

3(0) + 1 + Ce3(0)
r
3 3
∴ y =3
3x
or y = 3 ←− (explicit) solution to the IVP
3x + 1 + 2e 3x + 1 + 2e3x
R
*For xe−3x dx
Let u = x and dv = e−3x dx
1
Then du = dx and v = − e−3x
3
Z Z  
−3x 1 −3x 1 −3x
xe dx = − xe − − e dx
3 3
 
1 −3x 1 1 −3x
= − xe + − e + c1
3 3 3
1 1
= − xe−3x − e−3x + c1
3 9
49

Integrating Factors Found by Inspection

Recall from Lesson 2.2 that we can solve a linear differential equation with the aid of an
integrating factor. The same idea sometimes can be applied for a non exact differential
equation M (x, y)dx + N (x, y)dy = 0. For now, we will deal with equations that are simple
enough to determine the integrating factors by inspection. To do this, we have to be familiar
and be able to recognize such exact common differentials (and sometimes, it depends upon
experience). The following are exact differentials that frequently appear.
d(xy) = xdy + ydx 
d exy = exy (xdy + ydx)
   
x ydx − xdy y xdy − ydx
d = d =
y y2 x x2

e
 

Us
ydx − xdy  
−1 x xdy − ydx
d tan = −1 y
y x2 + y 2 d tan =
x x2 + y 2

l
cia
xdy + ydx  
d(ln xy) = −1 xdy + ydx
xy d n−1
=
(n − 1)(xy) (xy)n
er
m
Most likely, when we regroup terms with exact differentials, we will be regrouping terms
with dx and dy. In addition, a differential involving only one variable, like x dx, is an exact
om

differential.

Example 15. Solve the following differential equations by regrouping exact differentials.
C

1. xdy + ydx = 3x2 dx


or

Solution:
Observe that the left side of the given equation is an exact differential and the right
tF

side is a function of x alone. We have,

xdy + ydx = 3x2 dx


No

| {z }
d(xy) = 3x2 dx ←− take integral of both sides
Z Z
d(xy) = 3x2 dx

xy = x3 + C
50

2. xdy − ydx − x2 + y 2 dy = 0
Solution:

xdy − ydx − x2 + y 2 dy = 0 ←− divide by x2 + y 2
xdy − ydx
−dy =0
x2 + y 2
| {z }
Z   Z Z
−1 y
d tan − dy = 0dx ←− take integral of both sides
x
y
tan−1 − y =C
x

3. [1 + y tan(xy)]dx + x tan(xy)dy = 0

e
Us
Solution:

l
dx + y tan(xy)dx + x tan(xy)dy = 0 ←− distribute terms and regroup terms with tan(xy
dx + [y tan(xy)dx + x tan(xy)dy] = 0
dx + tan(xy) (ydx + xdy) = 0 cia
er
Z Z Z
dx + tan(xy) d(xy) = 0dx ←− take integral of both sides
m

x + sec2 (xy) = C
om

 
4. y x3 exy − y dx + x y + x3 exy dy = 0
C

Solution:
 
or

y x3 exy − y dx + x y + x3 exy dy = 0 ←− distribute the terms


yx3 exy dx − y 2 dx + xydy + x4 exy dy = 0 ←− regroup terms with exy
tF

x3 exy (ydx + xdy) + y(xdy − ydx) = 0 ←− divide by x3


  
y xdy − ydx
No

xy
e (ydx + xdy) + =0
x x2
Z Z     Z
xy y y
e d(xy) + d = 0dx ←− take integral of both sides
x x
 2
xy 1 y
e + = c1 or 2x2 exy + y 2 = Cx2 , C = 2c1
2 x
51

Determination of Integrating Factor

We have already mentioned in the previous lesson the aid of integrating factor in solving a
first-order linear differential equation and that the same idea sometimes works for a nonexact
differential equation

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

We mean to say that it is sometimes possible to determine an integrating factor u(x, y)


such that after multiplying it to a given nonexact equation (1), the left side of the resulting
equation
u(x, y)M (x, y)dx + u(x, y)N (x, y)dy = 0 (2)

e
becomes an exact differential.

Us
To determine such integrating factor u(x, y), recall the criterion for exactness. Equation (2)
is exact if and only if

l
∂ ∂

∂M
∂y
(uM ) =
∂u
∂x
∂N cia
(uN )
∂u
er
u +M =u +N
∂y ∂y ∂x ∂x
 
m
∂M ∂N ∂u ∂u
or u − =N −M (3)
∂y ∂x ∂x ∂y
om

∂M ∂N
If u satisfies (3), then u is an integrating factor for (1). Note that M, N, , and are
C

∂y ∂x
known functions of x and y. To determine such function u, from (3), we have to solve for
or

a partial differential equation, but were not yet ready to do that. Thus, we first make an
assumption that u is a function of only one variable.
tF

∂u du ∂u
Let us first assume that u depends on x alone. Then, = and = 0. Hence, (3)
∂x dx ∂y
becomes
No

 
∂M ∂N du
u − =N
∂y ∂x dx
 
du 1 ∂M ∂N
= − dx (4)
u N ∂y ∂x
It is still not easy to determine u even after taking the integral of both sides of (4) if its
right side dependson both x and
 y. However, if after some algebraic simplications are made,
1 ∂M ∂N
the expression − turns out to be dependent alone on the variable y, then (4)
N ∂y ∂x
is now a first-order ordinary differential equation and we can finally solved for u in (4) by
separation of variables. That is,
Z Z  
du 1 ∂M ∂N
= − dx
u N ∂y ∂x
52
Z  
∂M 1 ∂N
− dx
Solving for u, we have u(x) = e ∂y N ∂x .
Similarly, if u depends on y alone, then we will have,
 
∂M ∂N du
u − = −M
∂y ∂x dy
 
du 1 ∂M ∂N
=− − dy
u M ∂y ∂x
Z  
1 ∂M ∂N
− − dy
Solving for u, u(y) = e M ∂y ∂x
To summarize, given a nonexact differential equation

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

Us
 
1 ∂M ∂N
• If − is a function of x alone, then an integrating factor for (1) is

l
N ∂y ∂x
Z
1

∂M
−cia
∂N

dx
er
u(x) = e N ∂y ∂x (5)
m
 
1 ∂M ∂N
• If −
om

− is a function of y alone, then an integrating factor of (1) is


M ∂y ∂x
Z  
1 ∂M ∂N
C

− − dy
u(y) = e M ∂y ∂x (6)
or

Remarks 5. If neither of the two works, we can only say that (1) does not have an integrating
tF

factor that is a function of x or y alone.


No
53

Example 16. Solve the following differential equation or IVP by finding an appropriate
integrating factor.

1. 2y 2 + 3x dx + 2xydy = 0

Solution: We identify M = 2y 2 + 3x and N = 2xy. Then


∂M ∂ ∂N ∂
= [2y 2 + 3x] = 4y and = [2xy] = 2y
∂y ∂y ∂x ∂x
∂M ∂N
− = 4y − 2y = 2y
∂y ∂x
Notice that the difference between the partial derivatives has only one term as well as
N . (It could be a deciding factor, whether to try to divide it by N or M .)
 

e
1 ∂M ∂N 1 1 R
=⇒ IF: u(x) = e dx/x = eln x = x on (0.∞)

Us
− = (2y) =
N ∂y ∂x 2xy x
Multiply the original DE by IF = x


l
New differential equation: 2xy 2 + 3x2 dx + 2x2 ydy = 0

Test for Exactness:



cia
[2xy 2 + 3x2 ] = 4xy and

[2x2 y] = 4xy
er
∂y ∂x
Hence, the resulting equation is now exact. We now determine a solution f (x, y) = C
m
∂f ∂f
for the exact differential equation such that = 2xy 2 + 3x2 and = 2x2 y.
om

∂x ∂y
∂f
Let us start with = 2xy 2 + 3x2 . Integrate this last equation with respect to x.
∂x
C

Z Z
∂f
dx = f (x, y) = (2xy 2 + 3x2 ) dx ←− treat y as constant
or

∂x
Z Z
tF

2
f (x, y) = y 2x dx + 3x2 dx

f (x, y) = y 2 (x2 ) + x3 + g(y) ←− g(y) is the constant of integration


No

f (x, y) = x2 y 2 + x3 + g(y)

Take the partial derivative of the last equation with respect to y


∂ ∂  2 2 
f (x, y) = x y + x3 + g(y)
∂y ∂y
∂ ∂f
f (x, y) = 2x2 y + g 0 (y) ←− but = 2x2 y
∂y ∂y
2x2 y + g 0 (y) = 2x2 y =⇒ g 0 (y) = 0 =⇒ g(y) = c1

Therefore, f (x, y) = x2 y 2 + x3 + c1 ⇐⇒ x2 y 2 + x3 = C .
54

2. 10 − 6y + e−3x dx − 2dy = 0

Solution: We identify M = 10 − 6y + e−3x and N = −2. Then


∂M ∂ ∂N ∂
= [10 − 6y + e−3x ] = −6 and = [−2] = 0
∂y ∂y ∂x ∂x
∂M ∂N
− = −6 − 0 = −6
∂y ∂x
 
1 ∂M ∂N 1 R
− = (−6) = 3 =⇒ IF: u(x) = e 3dx = e3x
N ∂y ∂x −2
Multiply the original DE by IF = e3x

New differential equation: 10e3x − 6ye3x + 1 dx − 2e3x dy = 0

e
∂ ∂

Us
Test for Exactness: [10e3x − 6ye3x + 1] = −6e3x and [−2e3x ] = −6e3x
∂y ∂x
Hence, the resulting equation is now exact. We now determine a solution f (x, y) = C

l
∂f ∂f

cia
for the exact differential equation such that = 10e3x − 6ye3x + 1 and = −2e3x .
∂x ∂y
∂f
Let us start with = −2e3x . Integrate this last equation with respect to y.
er
∂y
Z Z
m
∂f 
dy = f (x, y) = − 2e3x dy ←− treat x as constant
om

∂y
Z
3x
f (x, y) = −2e dy
C

f (x, y) = −2e3x y + h(x) ←− h(x) is the constant of integration


f (x, y) = −2e3x y + h(x)
or
tF

Take the partial derivative of the last equation with respect to x


∂ ∂  
f (x, y) = − 2e3x y + h(x)
No

∂x ∂x
∂ ∂f
f (x, y) = −6e3x y + h0 (x) ←− but = 10e3x − 6ye3x + 1
∂x ∂x
−6e3x y + h0 (x) = 10e3x − 6ye3x + 1 =⇒ h0 (x) = 10e3x + 1
Z
 10
h(x) = 10e3x + 1 dx = e3x + x + c1
3

10 3x 10 3x
Therefore, f (x, y) = −2e3x y + e + x + c1 ⇐⇒ -2e3x y + e +x=C .
3 3
55

3. y(x + y + 1)dx + x(x + 3y + 2)dy = 0

Solution: We identify M = y(x + y + 1) and N = x(x + 3y + 2). Then


∂M ∂ ∂N ∂
= [y(x + y + 1)] = x + 2y + 1 and = [x(x + 3y + 2)] = 2x + 3y + 2
∂y ∂y ∂x ∂x
∂M ∂N
− = (x + 2y + 1) − (2x + 3y + 2) = −x − y − 1
∂y ∂x
 
1 ∂M ∂N −x − y − 1
Notice that − = is not a function of x alone, but
N ∂y ∂x x(x + 3y + 2)
 
1 ∂M ∂N −x − y − 1 −(x + y + 1) 1
− − = = = is a function of y alone.
M ∂y ∂x −y(x + y + 1) −y(x + y + 1) y
R

e
Hence, IF=u(y) = e dy/y = eln y = y, y > 0

Us
Multiply the original DE by IF = y
 
New differential equation: xy 2 + y 3 + y 2 dx + x2 y + 3xy 2 + 2xy dy = 0

l
cia
∂ ∂ 2
Test for Exactness: [xy 2 + y 3 + y 2 ] = 2xy + 3y 2 + 2y and [x y + 3xy 2 + 2xy] =
∂y ∂x
2xy + 3y 2 + 2y
er
Hence, the resulting equation is now exact. We now determine a solution f (x, y) = C
m
∂f ∂f
for the exact differential equation such that = xy 2 + y 3 + y 2 and = x2 y + 3xy 2 +
∂x ∂y
om

2xy.
∂f
Let us start with = xy 2 + y 3 + y 2 . Integrate this last equation with respect to x.
C

∂x
Z Z
∂f
dx = f (x, y) = (xy 2 + y 3 + y 2 ) dx ←− treat y as constant
or

∂x
Z Z Z
tF

2 3 2
f (x, y) = y x dx + y dx + y dx
 2
x
f (x, y) = y 2 + y 3 x + y 2 x + g(y) ; g(y) is the constant of integration
No

2
1 2 2
f (x, y) = x y + xy 3 + xy 2 + g(y)
2
Take the partial derivative of the last equation with respect to y
 
∂ ∂ 1 2 2 3 2
f (x, y) = x y + xy + xy + g(y)
∂y ∂y 2
∂ ∂f
f (x, y) = x2 y + 3xy 2 + 2xy + g 0 (y) ←− but = x2 y + 3xy 2 + 2xy
∂y ∂y
x2 y + 3xy 2 + 2xy + g 0 (y) = x2 y + 3xy 2 + 2xy =⇒ g 0 (y) = 0 =⇒ g(y) = c1

1 1 2 2
Therefore, f (x, y) = x2 y 2 + xy 3 + xy 2 + c1 ⇐⇒ x y + xy 3 + xy 2 = C .
2 2
56

Activity 3

A. Solve the following differential equation by the indicated method.


dy √
1. = 2 + y − 2x + 3 (reduction to separation of variables)
dx
2. (6x − 3y + 2)dx − (2x − y − 1)dy = 0 (coefficients linear in two variables)

3. (y − 2)dx − (x − y − 1)dy = 0 (coefficients linear in two variables)


dy
4. x2 + y 2 = xy (Bernoulli DE)
dx
5. y(x + y)dx + (x + 2y − 1)dy = 0 (determination of integrating factor)

e
Us
B. Solve the following initial-value problems.
dy π
1. = cos(x + y) y(0) =
dx 4

l
cia

2. 4xy + 3x2 dx + 2y + 2x2 ) = 0, y(0) = −2
er
m
C om
or
tF
No

You might also like