Professional Documents
Culture Documents
Learning Objectives
At the end of this chapter, the student is expected to
dy dy
For example, = y 2 xe3x+4y is separable, while = y + sin x is nonseparable.
dx dx
dy dy dy
= y 2 xe3x+4y can be written as = y 2 xe3x e4y = xe3x y 2 e4y but for = y + sin x,
dx dx dx
there is no way that y + sin x can be written as a product of a function of x and a function
of y.
18
y dy = (x2 + 2) dx
Z Z
y dy = (x2 + 2) dx
y2 x3
= + 2x + c1
2 3
Solve for y by multiplying both sides of the equation by 2 and then extracting square
roots of both sides.
2x3
y2 = + 4x + 2c1 but 2c1 can be written as C
3
r r
2x3 2x3 p
∴ |y| = + 4x + C or y = ± + 4x + C since y 2 = |y|
3 3
dy
2. x = (1 − 2x2 ) tan y
dx
Solution: By separating variables, we have
dy 1 − 2x2
= dx
tan y x
Z Z
1
cot y dy = − 2x dx
x
ln |sin y| = ln |x| − x2 + c1 ←− take the exponential of both sides
2 +c
eln|sin y| = eln|x|−x 1
2 2
|sin y| = eln|x| · e−x · ec1 = |x| · e−x · ec1 ←− by rules of exponents
c1 −x2
sin y = ±e · x · e ←− definition of absolute value
−x2
sin y = Cxe ←− note that ± ec1 = C since ec1 is constant
2
∴ y = sin−1 Cxe−x ←− general solution
19
3. sec2 x dy + csc y dx = 0
dy xy + 3x − y − 3
4. =
dx xy − 2x + 4y − 8
dy x(y + 3) − (y + 3)
=
dx x(y − 2) + 4(y − 2)
dy (y + 3)(x − 1)
=
dx (y − 2)(x + 4)
Separate the variables and then integrate both sides.
Z Z
y−2 x−1
dy = dx
y+3 x+4
Z Z
5 5
1− dy = 1− dx
y+3 x+4
y − 5 ln |y + 3| = x − 5 ln |x + 4| + C
5
y−x y+3
=⇒ e =K ; K = eC
x+4
20
dP
5. = P − P2
dt
Solution: By separating the variables and applying integral on both sides, we have
Z Z
dP dP
= dt =⇒ = dt
P − P2 P (1 − P )
Z
dP
can be solved using partial fraction decomposition. That is,
P (1 − P )
1 A B
= +
P (1 − P ) P 1−P
1 = A(1 − P ) + B(P )
Let P = 0, 1 = A
Let P = 1, 1 = B
Hence, Z Z
dP
= dt
P (1 − P )
Z Z
1 1
+ dP = dt
P 1−P
Z Z Z
dP dP
+ = dt
P 1−P
ln |P | − ln |1 − P | = t + c1
To solve for P in terms of t, apply some properties of exponents and logarithms.
P
ln |P | − ln |1 − P | = t + c1 =⇒ ln = t + c1
1−P
P
ln
1 − P
e = et+c1 = et · ec1
P
= Cet , C = ±ec1
1−P
P = Cet − P · Cet
P 1 + Cet = Cet
Cet
∴, P =
1 + Cet
21
dy
Remarks 1. To solve for a separable differential equation of the form = g(x)h(y), we
dx
dy
tend to write the equation as = g(x)dx. In this case, there is a possibility to have a
h(y)
variable divisor that could be zero. For an instance, if a is a zero of the function h(y), then
dy
y = a is a constant solution of the differential equation = g(x)h(y). Applying separation
dx
dy
of variables, the left-hand side of = g(x)dx is now undefined at a. As a result, y = a
h(y)
may not come up in the family of solutions obtained after applying integration and using
some simplifications. Such solution is called a singular solution (which have been mentioned
in Chapter 1).
Solution: By separating variables and taking the integral of both sides, we have
y dy + x dx = 0
Z Z Z
y dy + x dx = 0 dx
y 2 x2
+ = c1
2 2
x2 + y 2 = C ←− general solution
dy
2. (e2y − y) cos x = ey sin(2x) ; y(0) = 0
dx
Solution: By separating variables, we have
e2y − y sin(2x)
y
dy = dx
Z e Z cos x
2 sin x cos x
ey − ye−y dy =
dx ←− Use sin 2θ = 2 sin θ cos θ
cos x
Z Z Z
ey dy − ye−y dy = 2 sin x dx ←− use Integration by Parts
Some Applications
dT
= k(T − Tm ),
dt
Example 3. A copper ball is heated to 100◦ C. It is then placed in water that is maintained
at 30◦ C. After 3 minutes, the temperature of the ball is 60◦ C. Find the time at which the
temperature of the ball will be 31◦ C.
Solution: We identify Tm = 30◦ C and T (3) = 60. We set the IVP
dT
= k(T − 30), T (0) = 100
dt
23
Z Z
dT dT
= k dt ⇐⇒ = k dt
T − 30 T − 30
ln |T − 30| = kt + C1 ←− take the exponential of both sides
T − 30 = ekt+C1 = ekt eC1
T = 30 + Cekt ←− note that eC1 = C is constant
When t = 0, then T = 100. So that, 100 = 30 + Cek(0) =⇒ C = 70.
Substitute C = 70 to T = 30 + Cekt . We have T = 30 + 70ekt .
Now, T = 60 when t = 3 (minutes). So that 60 = 30 + 70e3k ⇐⇒ 30 = 70e3k .
30
Solving for k we have e3k = ←− take the ln of both sides
70
3 1 3
3k = ln =⇒ k = ln =⇒ k ≈ −0.2824.
7 3 7
Substitute k = −0.2824 to T = 30 + Cekt . We have T = 30 + 70e−0.2824t .
We want t when T = 31. Thus,
31 = 30 + 70e−0.2824t ⇐⇒ 1 = 70e−0.2824t
−0.2824t 1 1
e = ⇐⇒ −0.2824t = ln
70 70
1 1
t=− ln
0.2824 70
∴ t = 15.04 minutes
II. Water Tank Problem: Suppose that water is draining out from a large cylindrical
tank through a small hole or tap at the bottom. Then the depth of water remaining in the
tank is constantly changing, call it h(t) where t is time. From the theory of fluid mechanics
(Bernoulli’s equation), it can be shown that h(t) must satisfy the differential equation
dh √
= −k h ,
dt
where k is some constant depending on the tap radius at the bottom, the tank radius, and
the acceleration due to gravity.
Problem: Let H be the initial depth of the tank, so that h(0) = H. Determine the time t
so that the tank will be empty, that is, h(t) = 0.
24
Solution:
dh √
We set the IVP: = −k h , h(0) = H.
dt
By separating variables, we have
Z Z
dh −1/2
1/2
= −k dt ⇐⇒ h dh = −k dt ⇐⇒ 2h1/2 = −kt + C
h
Since h(0) = H, t = 0 and h = H, then 2H 1/2 = −k(0) + C =⇒ C = 2H 1/2 .
Substitute C = 2H 1/2 to 2h1/2 = −kt + C. We have,
2h1/2 = −kt + 2H 1/2 ←− solve for h
1/2 2
1/2 1/2 2H − kt
2h = 2H − kt ⇐⇒ h =
2
Solve for t when h = 0. ←− this is the case where the tank is empty
1/2 2
2H − kt
0= ⇐⇒ kt = 2H 1/2
2
√
2H 1/2 2 H
∴ t= or t =
k k
Remarks 2.
2. By dividing both sides of (1) by the leading coefficient a1 (x), we obtain a more useful
form, the standard form, of a linear equation:
dy
+ P (x)y = f (x) (2)
dx
Our goal is to seek a solution of (2) for which both coefficient functions P (x) and f (x)
are continuous.
3. The differential equation (2) has the property that its solution is the sum of the two
solutions: y = yc + yp , where yc (called complementary solution) is a solution of
the associated homogeneous equation
dy
+ P (x)y = 0 (3)
dx
and yp is a particular solution of the nonhomogeneous equation (2).
1. Put a linear equation of form (1) into the standard form (2).
2. From
R the standard form identify P (x) and then find the integrating factor: I.F. =
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 h R P (x)dx i R
e y = e P (x)dx f (x) (4)
dx
4. Integrate both sides of this last equation (4).
26
Solution: TheR given is already in standard form. We now identify P (x) = −1.
Then I.F. = e (−1) dx = e−x . (Note: In the previous integral, we do not include +C
since this will be included in the general solution later.) Multiply I.F. = e−x to the
given DE (since the given DE is already in standard form), we have
dy
e−x − e−x y = e−x e2x
| dx{z }
d −x
e y = ex ←− refer to Step #3 and #4
dx
Z Z
y
d x = ex dx ←− integration cancels out the derivative
e
y
= ex + C ←− solve for y
ex
∴ y = e2x + Cex ←− general solution on (−∞, ∞)
dy
2. x − 4y = x6 ex
dx
dy 4
Solution: Dividing both sides by x, we obtain the standard form: − y = x5 e x .
dx x
4 R
−4 dx/x −4 ln x ln x−4 1
We identify P (x) = − . Then I.F. = e =e =e = x−4 = 4
x x
1
Multiply I.F. = 4 to the standard form, we have
x
1 dy 4 1 5 x
− y = x e
x4 dx x x4
d 1
4
y = xex ←− refer to Step #3 and #4
dx x
Z Z Z
1 x
d 4
y = xe dx ←− use Integration by Parts to xex dx
x
y
= xex − ex + C ←− solve for y
x4
∴ y = x5 ex − x4 ex + Cx4 ←− general solution on (0, ∞)
27
1 dy
3. · + y = 2 ; y(0) = 3
2x dx
dy
Solution: Multiplying both sides by 2x, we obtain the standard form: + 2xy = 4x
R 2
dx
We identify P (x) = 2x. Then I.F. = e 2xdx = ex .
2
Multiply I.F. = ex to the standard form, we have
x2 dy 2
e + 2xy = ex (4x)
dx
d x2 2
e y = 4xex ←− refer to Step #3 and #4
Zdx Z
x2 2
d e y = 4xex dx
Z
x2 2
ye = 2 ex (2xdx)
2 2
yex = 2ex + C ←− use u = x2 and du = 2xdx
C
y = 2 + x2 ←− general solution
e
C
Since y(0) = 3, substitute x = 0 and y = 3 to solve for C : 3 = 2 + 0 =⇒ C = 1.
e
1
∴ y = 2 + x2 ←− solution to the IVP
e
dy
4. + (tan x)y = sin(2x) ; y(0) = 1
dx
y sec x = −2 cos x + C
y
= −2 cos x + C
cos x
y = −2 cos2 x + C cos x ←− general solution
Since y(0) = 1, substitute x = 0 and y = 1 to solve for C :
1 = −2 (cos 0)2 + C cos 0 ⇐⇒ 1 = −2(1)2 + C(1) =⇒ C = 3.
∴ y = −2 cos2 x + 3 cos x ←− solution to the IVP
28
Solution Take note that f (x) has a discontinuity at x = 3.Consequently, we solve the
problem in two parts corresponding to the two intervals over which f is defined.
dy R
For 0 ≤ x ≤ 3, we have the standard form + 2y = 1 with I.F.: e 2dx = e2x .
dx Z Z
2x dy d 2x
d e y = e2x dx.
2x
2x 2x 2x
Hence, e + 2e y = e =⇒ e y = e =⇒
dx dx
1 1
From the last equation, we have e2x y = e2x + c1 or y = + c1 e−2x . Since y(0) = 0, then
2 2
1 1 1 −2x
c1 = − . Therefore, y = − e if 0 ≤ x ≤ 3
2 2 2
dy R
For x > 3, we have the standard form + 2y = 0 with I.F.: e 2dx = e2x .
dx Z Z
2x dy 2x d 2x
2x
Hence, e + 2e y = 0 =⇒ e y = 0 =⇒ d e y = 0 dx.
dx dx
From the last equation, we have e2x y = c2 or y = c2 e−2x .
We can now write
1 − 1 e−2x if 0 ≤ x ≤ 3
y= 2 2
c2 e−2x
if x > 3
In order for y to be a continuous function, we definitely want lim− y(x) = lim+ y(x) = y(3).
x→3 x→3
1 1
Determining the value of c2 , we have c2 = e6 − .
2 2
Therefore,
1 1 −2x
− e if 0 ≤ x ≤ 3
2 2
y=
1 6 1 −2x
e −
e if x > 3
2 2
29
Some Applications
I. Series Circuits: For a series circuit containing only a resistor and an inductor,
Kirch-
di
hoff?s second law states that the sum of the voltage drop across the inductor L and
dt
the voltage drop across the resistor (Ri) is the same as the impressed voltage (E(t)) on the
circuit.
Thus we obtain the linear differential equation for the current i(t),
di
L + Ri = E(t),
dt
where L and R are constants known as the inductance and the resistance, respectively.
The current i(t) is also called the response of the system.
30
1
Example 7. A 12-volt battery is connected to a series circuit in which the inductance is
2
henry and the resistance is 10 ohms. Determine the current i if the initial current is zero.
Solution:
1
We identify L = (henry), R = 10 (ohms), and E = 12 (volts). Then the IVP linear DE
2
will be
1 di
· + 10i = 12 ; i(0) = 0.
2 dt
di
Multiplying both sides by 2, we obtain the standard form: + 20i = 24. We identify
R R dt
P (t) = 20. Then I.F. = e P (t)dt = e 20dt = e20t .
Multiply I.F. = e20t to the standard form, we have
20t di
e + 20i = e20t (24)
dt
d 20t
e i = 24e20t
Z dt Z
d e i = 24 e20t dt
20t
Z
20t 1
ie = 24 · e20t (20dt) ←− use u = 20t and du = 20dt
20
6
ie20t = e20t + C
5
6 C
i = + 20t ←− general solution
5 e
Since i(0) = 0, substitute t = 0 and i = 0 to solve for C :
6 C 6
0 = + 20(0) =⇒ C = − .
5 e 5
6 6
Therefore the current/response is i = − 20t
5 5e
II. Free Falling Body with Air Resistance: This concerns a body falling under gravity
with air resistance. Let x(t) be the downward displacement at time t from the point of
release, then the differential equation is
d2 x dx
2
=g−k ,
dt dt
dx
where k is the air resistance with constant k and g is the acceleration due to gravity.
dt
Problem: Determine the solution x(t) to the above differential equation subject to the
initial conditions: x(0) = 0 and x0 (0) = 0. [Note that x(0) = 0 implies that the particle is
initially at the point and release, and x0 (0) = 0 implies that the particle is released from
rest, so that the initial velocity is zero.]
31
dx
Solution: Let v = . Then the differential equation can be rewritten as
dt
dv dv
= g − kv ⇐⇒ + kv = g
dt dt
which isRnow a linear
R differential equation in standard form. We identify P (t) = k and
I.F. = e P (t)dt = e kdt = ekt . Multiply I.F. = ekt to the standard form, we have
kt dv
e + kv = ekt (g)
dt
d kt
e v = gekt
Z dt Z
d e v = gekt dt
kt
Z
kt 1
ekt (kdt) ←− g, k are constants
ve = g ·
k
g
vekt = ekt + C1
k
g C1
v = + kt ←− general solution
k e
0
Since x (0) = 0, so v(0) = 0. Substitute t = 0 and v = 0 to solve for C1 :
g C1 g
0 = + k(0) =⇒ C1 = −
k e k
g g g g −kt
Hence, v = − kt ⇐⇒ v = − e
k ke k k
dx dx g g
But v = , so that = − e−kt
dt dt k k
Integrating with respect to t, we have
Z Z h
g g −kt i
dx = − e dt
k k
Z Z Z
g g
dx = dt − e−kt dt
k k
g
Z g 1 Z
x= dt − − e−kt (−kdt)
k k k
gt g
x= + 2 e−kt + C2
k k
Since x(0) = 0, substitute t = 0 and x = 0 to solve for C2 :
g(0) g g
0= + 2 e−k(0) + C2 =⇒ C2 = − 2
k k k
gt g g
Therefore the downward displacement is x = + 2 e−kt − 2
k k k
32
g g g g
Nice to know: From the equation v = − e−kt , if t → ∞, then v → . We call
k k k k
the terminal velocity. For a free falling parachutist, the terminal velocity is about 193
km/hour (before the parachute opened!).
Activity 1
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
Example 8. If f (x, y) = x2 − 5xy + y 3 = c, then (2) gives the first order DE:
∂f ∂f
dx + dy = 0
∂x ∂y
∂ 2 ∂ 2
(x − 5xy + y 3 ) dx + (x − 5xy + y 3 ) dy = 0
∂x ∂y
(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).]
Notations:
∂f ∂f
We use the notation := M (x, y) and := N (x, y). Then (2) can be rewritten as
∂x ∂y
∂f ∂f
We can see from Example 8 that = M (x, y) = 2x − 5y and = N (x, y) = −5x + 3y 2 .
∂x ∂y
Definition 3: Exact Equation
∂M ∂N
= (4)
∂y ∂x
Remarks 4. The idea of the previous theorem relies on the fact that
∂ 2f ∂ 2f
∂ ∂f ∂ ∂f
= = =
∂y ∂x ∂y ∂x ∂x ∂y ∂x ∂y
Therefore,
∂M ∂ ∂f ∂ ∂f ∂N
= = =
∂y ∂y ∂x ∂x ∂y ∂x
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
which
∂f
= M (x, y).
∂x
We can find f by integrating M (x, y) with respect to x while holding y constant:
Z
f (x, y) = M (x, y)dx + g(y), (5)
where the arbitrary function g(y) is the constant of integration. Now differentiate (5) with
∂f
respect to y and assume that = N (x, y) :
∂y
Z
∂f ∂
= M (x, y) dx + g 0 (y) = N (x, y).
∂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
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
Solution: We identify M (x, y) = e2y − y cos(xy) and N (x, y) = 2xe2y − x cos(xy) + 2y.
Then
∂M ∂ 2y
= [e − y cos(xy)] = 2e2y + xy sin(xy) − cos(xy)
∂y ∂y
∂N ∂
= [2xe2y − x cos(xy) + 2y] = 2e2y + xy sin(xy) − cos(xy)
∂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
M (x, y) = = e2y − y cos(xy) and N (x, y) = = 2xe2y − x cos(xy) + 2y
∂x ∂y
[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
Integrating N (x, y) = = 2xe2y − x cos(xy) + 2y with respect to y (treat x as
∂x
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
∂M ∂
= (cos x sin x − xy 2 ) = −2xy
∂y ∂y
∂N ∂
= [y(1 − x2 )] = −2xy
∂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
M (x, y) = = (cos x sin x − xy 2 ) and N (x, y) = = y(1 − x2 )dy
∂x ∂y
∂f
Integrating N (x, y) = = y(1 − x2 ) with respect to y, we have
∂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
If a function f satisfies the property f (λx, λy) = λα f (x, y) for some real number α,
then f is said to be a homogeneous function of degree α. A first-order DE
Note: *Here the word homogeneous does not mean the same as it did in Section 2.2. Recall
dy
that a linear first-order equation a1 (x) + a0 (x)y = g(x) is homogeneous when g(x) = 0.
dx
Example 10.
Example 11.
1. Show that (x2 + y 2 )dx + (x2 − xy)dy = 0 is a homogeneous DE and then find its
solution.
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
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)
Let y = ux, then dy = udx + xdu. Substitute these to the given DE, we have
2
x + (ux)2 dx + [x2 − x(ux)](udx + xdu) = 0
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.
Let x = vy, then dx = vdy + ydv. Substitute these to the given DE, we have
(v 3 y 3 − y 3 )(vdy + ydv) + vy 3 dy = 0
v 4 y 3 dy + v 3 y 4 dv − 3
dy − y 4 dv + 3
vy vy dy = 0
4 3 4 3
v y dy + y (v − 1)dv = 0
3
dy v −1
+ dv = 0 ←− by separating variables
y v4
Z Z Z Z
dy dv −4
+ − v dv = 0 dx ←− integrate both sides
y v
−3
v
ln |y| + ln |v| − =C
−3
1 x
ln |y| + ln |v| + 3 = C ←− back substitute v =
3v y
x 1
ln |y| + ln + 3 = C
y x
3
y
3
ln|y|
+ ln |x| − ln + y = C
|y|
3x3
y3
ln |x| + 3 = C ←− (implicit) general solution
3x
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
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
3. 4t3 y − 15t2 − y dt + t4 + 3y 2 − t dy = 0
C. Solve the given differential equations with homogeneous coefficients using appropriate
substitutions.
√
1. −ydx + x + xy dy = 0
2. x + yey/x dx − xey/x dy = 0
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.
dy
1. = (x + y + 1)2
dx
Solution:
du dy dy du
Let u = x + y + 1. Then =1+ =⇒ = − 1.
dx dx dx dx
The differential equation now becomes
du du
− 1 = u2 =⇒ = u2 + 1.
dx dx
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
where a, b, c are constants. If c1 and c2 are both 0, then (1) becomes a differential equation
with homogeneous coefficient.
Now, consider the lines formed by the coefficients of dx and dy,
a1 x + b1 y + c1 = 0
(2)
a2 x + b 2 y + c 2 = 0
a1 b1
• If the lines in (2) are parallel, that is,
= , then (1) can be solved by reduction
a2 b2
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
u−1
Z Z
du = − dy ←− integrate both sides
u+2
Z Z
3
1− du = − dy ←− by long division
u+2
u − 3 ln |u + 2| = −y + C ←− but u = x + 2y
x + 2y − 3 ln |x + 2y + 2| = −y + C or x + 3y − 3 ln |x + 2y + 2| = C
dy 3x + 2y
2. Solve: = , y(−1) = −1
dx 3x + 2y + 2
a1 b1
Solution: It can be clearly seen from the given that = .
a2 b2
du + 3dx
Let u = 3x + 2y. Then du = 3dx + 2dy =⇒ dy = .
2
(Note: From the substitution, we can choose to solve for either dx or dy.)
We now have,
(3x + 2y + 2)dy = (3x + 2y)dx
du + 3dx
(u + 2) = udx ←− multiply both sides by 2
2
(u + 2)(du + 3dx) = 2udx
(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
Bernoulli’s Equation
x3 u = x3 + C ←− but u = y 3
x3 y 3 = x3 + C or y 3 = 1 + Cx3
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
We can now solve this by integrating factor method.
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
x
1 du 1 1
− u = (−x ln x)
x dx x x
1 du 1 1
− 2 u = (−x ln x)
|x dx {z x } x
d 1
u = − ln x ←− refer to Step #3 and #4 in Section 2.2
dx x
Z Z Z
u
d = − ln x dx ←− use Integration by Parts to ln x dx
x
u
= −(x ln x − x) + C = −x ln x + x + C
x
1
u = −x2 ln x + x2 + Cx ←− back substitute u =
y
1
= −x2 ln x + x2 + Cx
y
1
∴ y= ←− general solution
−x ln x + x2 + Cx
2
R
*For ln x dx
Z Z
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)
dx
d −3x
e u = −3xe−3x ←− refer to Step #3 and #4 in Section 2.2
Zdx Z Z
−3x −3x
xe−3x dx
d ue = −3 xe dx ←− use Integration by Parts to
−3x 1 −3x 1 −3x
ue = −3 − xe − e + C1
3 9
u −3x 1 −3x
= xe + e + C1
e3x 3
1 1
u = x + + C1 e3x ←− back substitute u = 3
3 y
1 3x + 1 + 3C1 e3x
= ←− take the reciprocal ; 3C1 = C
y3 3
3
y3 = ←− general solution
3x + 1 + Ce3x
Since y(0) = 1, substitute x = 0 and y = 1 to solve for C :
3
(1)3 = ⇐⇒ 1 + C = 3 =⇒ C = 2
3(0) + 1 + Ce3(0)
r
3 3 3 3
∴ y = or y = ←− (explicit) solution to the IVP
3x + 1 + 2e3x 3x + 1 + 2e3x
*For xe−3x dx
R
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
−1 x ydx − xdy
xdy − ydx
d tan = −1 y
y x2 + y 2 d tan =
x x2 + y 2
xdy + ydx
d(ln xy) = −1 xdy + ydx
xy d n−1
=
(n − 1)(xy) (xy)n
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
differential.
Example 15. Solve the following differential equations by regrouping exact differentials.
xy = x3 + C
50
2. xdy − ydx − x2 + y 2 dx = 0
Solution:
xdy − ydx − x2 + y 2 dx = 0 ←− divide by x2 + y 2
xdy − ydx
−dx = 0
x2 + y 2
| {z }
Z Z Z
−1 y
d tan − dx = 0dx ←− take integral of both sides
x
y
tan−1 − x = C
x
3. [1 + y tan(xy)]dx + x tan(xy)dy = 0
Solution:
dx + x tan(xy)dy = 0 ←− distribute the terms
dx + y tan(xy)dx + x tan(xy)dy = 0 ←− regroup terms with tan(xy)
dx + [y tan(xy)dx + x tan(xy)dy] = 0
dx + tan(xy) (ydx + xdy) = 0
Z Z Z
dx + tan(xy) d(xy) = 0dx ←− take integral of both sides
x + sec2 (xy) = C
4. y x3 exy − y dx + x y + x3 exy dy = 0
Solution:
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
x3 exy (ydx + xdy) + y(xdy − ydx) = 0 ←− divide by x3
xy y xdy − ydx
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
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
∂ ∂
(uM ) = (uN )
∂y ∂x
∂M ∂u ∂N ∂u
u +M =u +N
∂y ∂y ∂x ∂x
∂M ∂N ∂u ∂u
or u − =N −M (3)
∂y ∂x ∂x ∂y
∂M ∂N
If u satisfies (3), then u is an integrating factor for (1). Note that M, N, , and are
∂y ∂x
known functions of x and y. To determine such function u, from (3), we have to solve for
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.
∂u du ∂u
Let us first assume that u depends on x alone. Then, = and = 0. Hence, (3)
∂x dx ∂y
becomes
∂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
Remarks 5. If neither of the two works, we can only say that (1) does not have an integrating
factor that is a function of x or y alone.
53
Example 16. Solve the following differential equation or IVP by finding an appropriate
integrating factor.
1. 2y 2 + 3x dx + 2xydy = 0
Therefore, f (x, y) = x2 y 2 + x3 + c1 ⇐⇒ x2 y 2 + x3 = C .
54
2. 10 − 6y + e−3x dx − 2dy = 0
10 3x 10 3x
Therefore, f (x, y) = −2e3x y + e + x + c1 ⇐⇒ -2e3x y + e +x=C .
3 3
55
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