Uploaded by Bren Vilog

1storder exact

38
CHAPTER 2. FIRST ORDER DIFFERENTIAL EQUATIONS
2.3
2.3.1
Exact Equations
De…nitions
In this section, we will look at di¤erential equations of the form
M (x; y) dx + N (x; y) dy = 0
Recall from Calculus that if y = f (x) then the di¤erential of f is de…ned to
be dy = f 0 (x) dx. It represents the amount by which y will change if y = f (x)
and x changes by the amount dx. There is a similar notion for functions of
several variables. It is called the total di¤erential.
De…nition 2.3.1 If z = f (x; y) is a function of two variables with continuous
…rst order partial derivatives then its di¤ erential is
dz = df =
@f
@f
dx +
dy
@x
@y
(2.11)
It is sometimes called the total di¤ erential. It represents the amount by which
z or f will change if z = f (x; y) and x changes by dx and y changes by dy.
In the special case of a level curve that is a curve of the form f (x; y) = C
@f
@f
where C is a constant, equation 2.11 becomes
dx +
dy = dC = 0 (a
@x
@y
constant does not change). This is of the form M (x; y) dx + N (x; y) dy = 0.
De…nition 2.3.2 The expression M (x; y) dx + N (x; y) dy is called a di¤ erential form.
2.3.2
Solving Exact Equations
M (x; y) dx+N (x; y) dy = 0 is a di¤erential equation we obtained by …nding the
di¤erential of the level curve f (x; y) = C hence its solution, given implicitly, is
f (x; y) = C. Suppose now that we are given a di¤erential equation of the form
M (x; y) dx + N (x; y) dy = 0, how can we …nd its solution? For this, we have to
be able to answer the following two questions:
1. Given M (x; y) dx + N (x; y) dy = 0, how do we know if M (x; y) dx +
N (x; y) dy is a total di¤erential that is if there exists a function f such
@f
@f
that M (x; y) dx + N (x; y) dy =
dx +
dy?
@x
@y
2. Even if there is such a function f , how do we …nd it?
3. Once we …nd f , the solution to M (x; y) dx + N (x; y) dy = 0 will be
f (x; y) = C, an implicit solution. In order to …nd C, we will need to be
given initial conditions.
We now answer these questions. We will give our results without proofs.
2.3. EXACT EQUATIONS
39
De…nition 2.3.3 Consider the di¤ erential form M (x; y) dx + N (x; y) dy.
1. It is said to be exact in a rectangle R if there exists a function f (x; y)
such that
@f
@f
(x; y) = M (x; y) and
(x; y) = N (x; y)
@x
@y
for all (x; y) in R that is the total di¤ erential of f satis…es df (x; y) =
M (x; y) dx + N (x; y) dy.
2. If M (x; y) dx + N (x; y) dy is an exact di¤ erential form, then the equation
M (x; y) dx + N (x; y) dy = 0 is said to be an exact equation.
We now give a necessary and su¢ cient condition for a di¤erential form to be
exact. Though we will not prove the result, we give a hint where the idea comes
from. In multivariable calculus, it is known that under the conditions of our
de…nition, the mixed partial derivatives of f must be equal that is we must have
@2f
@2f
=
. This is known as Clairaut’s theorem. If our di¤erential form
@x@y
@y@x
@2f
@M
@f
(x; y) = M (x; y) hence
(x; y) =
(x; y)
is exact, then by de…nition
@x
@y@x
@y
2
@f
@ f
@N
and also
(x; y) = N (x; y) hence
(x; y) =
(x; y). Since the mixed
@y
@x@y
@x
@N
@M
(x; y) =
(x; y). We give this result as
partial are equal, we must have
@y
@x
a theorem.
Theorem 2.3.4 Suppose the …rst order partial derivatives of M (x; y) and N (x; y)
are continuous in a rectangle R then
is an exact equation in R if and only if the compatibility condition
@M
@N
(x; y) =
(x; y)
@y
@x
(2.12)
holds for all (x; y) in R.
Example 2.3.5 Is the di¤ erential equation 2xy 2 + 1 dx + 2x2 y dy = 0 exact?
@M
We let M (x; y) = 2xy 2 + 1 and …nd that
(x; y) = 4xy. Similarly, we let
@y
@N
@M
@N
(x; y) = 4xy: Since
(x; y) =
(x; y),
N (x; y) = 2x2 y and …nd that
@x
@y
@x
the equation is exact.
@f
@f
(x; y) = M (x; y) and
(x; y) =
@x
@y
N (x; y). It turns out that we only need one of these two conditions to …nd the
solution. It can be either one. We outline the technique to …nd the solution for
each case.
If the di¤erential equation is exact, then
40
CHAPTER 2. FIRST ORDER DIFFERENTIAL EQUATIONS
Solution 2.3.6 (Method 1 for Solving Exact Equations) To solve M (x; y) dx+
N (x; y) dy = 0, follow these steps:
@f
1. If it is exact, then
(x; y) = M (x; y). Integrate both sides with respect
@x
to x to get
Z
f (x; y) = M (x; y) dx + g (y)
(2.13)
2. To …nd g (y), di¤ erentiate both sides of equation 2.13, substituting N (x; y)
@f
for
(x; y). Then solve for g 0 (y).
@y
3. Integrate g 0 (y) with respect to y to …nd g (y) which can then be substituted
in equation 2.13 to …nd f (x; y).
4. The solution to M (x; y) dx+N (x; y) dy = 0 is given implicitly by f (x; y) =
C.
R
For this to work, we have to be able to evaluate M (x; y) dx. If this is too
hard, we can use another technique. In what we described above, our starting
@f
point was the fact that
(x; y) = M (x; y). We could also use the fact that
@x
R
@f
(x; y) = N (x; y) if N (x; y) dy is easier to compute. The technique is
@y
similar, but x and y are switched. We list the steps.
Solution 2.3.7 (Method 2 for Solving Exact Equations) To solve M (x; y) dx+
N (x; y) dy = 0, follow these steps:
1. If it is exact, then
to y to get
@f
(x; y) = N (x; y). Integrate both sides with respect
@y
f (x; y) =
Z
N (x; y) dy + h (x)
(2.14)
2. To …nd h (x), di¤ erentiate both sides of equation 2.14 with respect to x,
@f
substituting M (x; y) for
(x; y). Then solve for h0 (x).
@x
3. Integrate h0 (x) with respect to x to …nd h (x) which can then be substituted
in equation 2.14 to …nd f (x; y).
4. The solution to M (x; y) dx+N (x; y) dy = 0 is given implicitly by f (x; y) =
C.
2.3. EXACT EQUATIONS
2.3.3
41
Examples
Example 2.3.8 (Solving an Exact DE) Solve 2xydx + x2
Let M (x; y) = 2xy and N (x; y) = x2
1. Then
1 dy = 0
@M
@N
= 2x and
= 2x
@y
@x
so the equation is exact.
@f
= M (x; y) = 2xy.
@x
R
Integrating with respect to x gives f (x; y) = 2xydx+g (y) that is f (x; y) =
x2 y + g (y).
Hence, there exists a function f for which
We now di¤ erentiate each side with respect to y to get
Substituting N (x; y) = x2
g 0 (y) =
1 for
@f
gives us x2
@y
@f
= x2 + g 0 (y).
@y
1 = x2 + g 0 (y) or
1.
It follows that g (y) =
y + C1 hence f (x; y) = x2 y
and the implicit solution is x2 y
x2 y y = C.
y + C1
y + C1 = C2 which we can write as
Remark 2.3.9 In the step before last, the constant C1 due to integration can
be ignored as it will always get included in the constant in the last step.
Example 2.3.10 (Solving an Exact DE) Solve e2y
0
y cos (xy) dx+ 2xe2y
Let M (x; y) = e2y y cos (xy) and N (x; y) = 2xe2y x cos (xy)+2y. Then,
@M
@N
= 2e2y cos (xy) + xy sin (xy) and
= 2e2y cos (xy) + xy sin (xy)
@y
@x
so the equation is exact.
@f
(x; y) = N (x; y) (here, we
@y
will use the second method for illustration purposes).
Hence, there exists a function f for which
@f
(x; y) = 2xe2y x cos (xy) + 2y, we integrate each side
@y
R
2xe2y x cos (xy) + 2y dy + h (x) =
with respect to y to get f (x; y) =
xe2y sin (xy) + y 2 + h (x).
Starting with
We now di¤ erentiate each side with respect to x to get
y cos (xy) + h0 (x).
Substituting M (x; y) = e2y
e2y
y cos (xy) for
y cos (xy) + h0 (x) or h0 (x) = 0
@f
we get e2y
@x
@f
= e2y
@x
y cos (xy) =
x cos (xy) + 2y dy =
42
CHAPTER 2. FIRST ORDER DIFFERENTIAL EQUATIONS
It follows that h (x) = C1 hence f (x; y) = xe2y
and the family of solutions is xe2y
write as xe2y sin (xy) + y 2 = C.
sin (xy) + y 2 + C1
sin (xy) + y 2 + C1 = C2 which we can
Example 2.3.11 (Solving an Initial Value Problem) Solve
dy
xy 2 cos x sin x
=
,
dx
y (1 x2 )
y (0) = 2
First, rewrite it as cos x sin x
Let M (x; y) = cos x sin x
2xy and
@N
=
@x
xy 2 dx + y 1
x2 dy = 0.
xy 2 and N (x; y) = y 1
x2 . Then
@M
=
@y
2xy so the equation is exact.
Hence, there exists a function f for which
@f
(x; y) = N (x; y).
@y
@f
(x; y) = y 1 x2 , we integrate each side with respect
@y
R
y2
to y to get f (x; y) = y 1 x2 dy + h (x) = 1 x2
+ h (x).
2
Starting with
We now di¤ erentiate each side with respect to x to get
Substituting M (x; y) = cos x sin x
xy 2 for
xy 2 + h0 (x) that is h0 (x) = cos x sin x
x2
y2
2
R
cos x sin xdx =
x2
y2
2
1
7
cos 2x = .
4
4
xy 2 =
1
cos 2x
4
1
cos 2x = C
4
Finally, since y (0) = 1 replacing x by 0 and y by 1 gives C =
solution is 1
xy 2 +h0 (x).
@f
we get cos x sin x
@x
Integrating with respect to x gives us h (x) =
So, the implicit solution is 1
@f
=
@x
7
hence the
4
2.3. EXACT EQUATIONS
43
y
5
4
3
2
1
-5
-4
-3
-2
-1
1
2
-1
3
4
5
x
-2
-3
-4
-5
2.3.4
Nonexact ODEs Made Exact
dy
Recall from the previous section that the left-hand side of
+ P (x) y = Q (x)
dx
can be transformed into a derivative when we multiply the equation by an integrating factor. The same basic idea sometimes works for a nonexact di¤erential
equation M (x; y) dx + N (x; y) dy = 0 that is it is sometimes possible to …nd an
integrating factor (x; y) such that
(x; y) M (x; y) dx + (x; y) N (x; y) dy = 0
is an exact equation. To …nd
equation 2.12 that is
(2.15)
, we use the compatibility condition given in
@
@
( (x; y) M (x; y)) =
( (x; y) N (x; y))
@y
@x
or
M
or
N
@
@M
@
@N
+
=N
+
@y
@y
@x
@x
@
@x
M
@
=
@y
@M
@y
@N
@x
(2.16)
Although M and N are known and hence their partial derivatives are known,
this is a partial di¤erential equation in . Solving it is beyond the scope of this
class. So, we will make some assumptions to simplify this equation. Since we
only know how to solve ODEs, we are going to assume that depends only in
one variable. So, we have two possibilities to …nd . If one does not work, try
the other one. If neither works, then our technique will not work.
44
CHAPTER 2. FIRST ORDER DIFFERENTIAL EQUATIONS
is a function of x only that is
In this case,
=
(x)
@
= 0 and equation 2.16 becomes
@y
N
d
=
dx
or
d
=
dx
@M
@y
@M
@y
@N
@x
@M
@y
@N
@x
(2.17)
N
@N
@x
If the quotient
is still a function of both x and y, then we are at
N
an impasse and our technique won’t work. Don’t give up yet, there is another
@M
@N
@y
@x
technique to try below. But if
after all possible simpli…cations is
N
a function of x only, then equation 2.17 is a separable linear di¤erential equation.
Its solution is
@N
R ( @M
@y
@x )
dx
N
(x) = e
is a function of y only that is
In this case,
=
(y)
@
= 0 and equation 2.16 becomes
@x
M
or
d
=
dy
If the quotient
@N
@x
@M
@y
M
@M
@y
d
=
dy
@N
@x
@N
@x
@M
@y
(2.18)
M
is still a function of both x and y, then we are
@N
@x
@M
@y
at an impasse and our technique won’t work. But if
after all
M
possible simpli…cations is a function of y only, then equation 2.18 is a separable
linear di¤erential equation. Its solution is
(y) = e
R
( @N
@x
@M
@y
M
) dy
If we manage to get , then equation 2.15 is now exact and we can …nish
solving it by using the technique to solve exact equations. We illustrate this
with an example.
2.3. EXACT EQUATIONS
45
Example 2.3.12 Solve xydx + 2x2 + 3y 2
20 dy = 0
Let M (x; y) = xy and N (x; y) = 2x2 + 3y 2
20. Then,
@M
= x and
@y
@N
= 4x hence the equation is not exact.
@x
First, we try to …nd
(x; y) M (x; y) dx+ (x; y) N (x; y) dy =
@M
@N
d
x 4x
@y
@x
0 is exact. This amounts to solving
=
= 2
dx
N
2x + 3y 2 20
3x
3x
. Since
is not just a function of x, this
2x2 + 3y 2 20
2x2 + 3y 2 20
approach won’t work.
Next, we try to …nd
(x) so that
(y) so that
(x; y) M (x; y) dx+ (x; y) N (x; y) dy =
@N
@M
3x
3
d
@x
@y
=
=
=
.
0 is exact. This amounts to solving
dy
M
xy
y
This, we can solve.
d
dy
=
()
()
3
y
()
d
=
3
dy
y
3
ln j j = ln jyj + K
=
Cy 3
We have a whole family of solution, we keep the simplest one, and the
integrating factor is (y) = y 3 .
We can now solve our ODE.
– First, we multiply the original equation by the integrating factor to
get
xy 4 dx + 2x2 y 3 + 3y 5 20y 3 dy = 0
– Next, we verify the equation is indeed exact. With M (x; y) = xy 4 ,
@M
@N
= 4xy 3 and with N (x; y) = 2x2 y 3 + 3y 5 20y 3 ,
= 4xy 3
@y
@x
hence the equation is exact.
@f
– Since the equation is exact,
= M (x; y) = xy 4 hence f (x; y) =
@x
R 4
x2 y 4
xy dx + g (y) =
+ g (y).
2
– Next, we di¤ erentiate each side with respect to y and use the fact that
@f
= N (x; y) = 2x2 y 3 + 3y 5 20y 3 to get 2x2 y 3 + 3y 5 20y 3 =
@y
2x2 y 3 + g 0 (y)
=
46
CHAPTER 2. FIRST ORDER DIFFERENTIAL EQUATIONS
– Hence, g 0 (y) = 3y 5
20y 3 it follows that g (y) =
3y 6
6
5y 4
y6
x2 y 4
+
5y 4
2
2
x2 y 4
y6
– The solution is
+
5y 4 = C
2
2
– Therefore, f (x; y) =
2.3.5
Exercises
Do # 1, 3, 5, 9, 11, 13, 15, 17, 21, 25, 27, 29 at the end of section 2.4 in your
book.
Do # 1, 3, 5, 7, 9, 11 at the end of section 2.5 in your book.
Bibliography
[1] Paul Blanchard, Robert L. Devaney, and Glen R. Hall, Di¤ erential equations,
fourth ed., Brooks/Cole, CENGACE Learning, 2012 (English).
[2] Charles H. Edwards, David E. Penney, and David T. Calvis, Di¤ erential
equations and boundary value problems: Computing and modeling, …fth ed.,
Pearson, 2015 (English).
[3] R. K. Nagle, Edward B. Sa¤, and Arthur D. Snider, Fundamentals of differential equations, eigth ed., Pearson/Addison-Wesley, 2012 (English).
187