Math 113 Module 2
Math 113 Module 2
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
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
∂f ∂f
We can see from Example 8 that = M (x, y) = 2x − 5y and = N (x, y) = −5x + 3y 2 .
∂x ∂y
No
∂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
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
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
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
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
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
e
Us
∴ y 2 (1 − x2 ) − cos2 x = 3 ←− solution to the IVP
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
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.
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
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
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
(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
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
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
dy
3. xy 2 = y 3 − x3 , y(1) = 2
or
dx
tF
No
42
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
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
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
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
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
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
du + 3dx
(u + 2) = udx ←− multiply both sides by 2
2
(u + 2)(du + 3dx) = 2udx
No
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
Bernoulli’s Equation
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
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
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
y3 = ←− general solution
3x + 1 + Ce3x
tF
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
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
Solution:
Observe that the left side of the given equation is an exact differential and the right
tF
| {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
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
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
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
− − 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
Example 16. Solve the following differential equation or IVP by finding an appropriate
integrating factor.
1. 2y 2 + 3x dx + 2xydy = 0
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
∂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) = x2 y 2 + x3 + g(y)
Therefore, f (x, y) = x2 y 2 + x3 + c1 ⇐⇒ x2 y 2 + x3 = C .
54
2. 10 − 6y + e−3x dx − 2dy = 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
∂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
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
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