For the next technique it is best to consider first-order differential equations written in differential form
(1)
where and are given functions, assumed to be sufficiently smooth. The method that we will consider is based on the idea of a differential. Recall from a previous calculus course that if is a function of two variables, and , then the differential of , denoted , is defined by
(2)
EXAMPLE: Solve
(3)
Solution 1: Note that this equation is separable. We have
If and , then
But
therefore
which gives
where is a positive number.
Note that and are solutions of (3), therefore the general solution of (3)
is
where is any number.
Solution 2: Put
By inspection, we notice that
We have
and
Using this in (2), we get
Consequently, equation (3) can be written as
which implies that is constant, hence the general solution
to equation (3) is
where is an arbitrary constant.
REMARK: One may wonder how we came up with the function . Here is the rationale: So, we want to find a function such that
But
by (2), therefore should satisfy
Now we can find in two different ways.
Integrating the first equation with respect to , holding fixed, yields
where is an arbitrary function of . We now determine such that
this function
also satisfies the second equation. Taking the derivative of with respect to yields
So,
therefore
which implies, upon integration, that
where we have set the integration constant equal to zero without loss of generality, since we require only one function . Substitution
this into yields
Integrating the second equation with respect to , holding fixed, yields
where is an arbitrary function of . We now determine such that
this function
also satisfies the first equation. Taking the derivative of with respect to yields
So,
therefore
which implies, upon integration, that
where we have set the integration constant equal to zero without loss of generality, since we require only one function . Substitution
this into yields
Solution 3 (This solution is a combination of Solution 1 and 2): Note that (3) can be rewritten as
if and . Put
By inspection,
We have
and
Using this in (2), we get
Consequently, equation (3) can be written as
which implies that is constant, hence the general solution
to equation (3) is
which gives
where is a positive number.
Note that and are solutions of (3), therefore the general solution of (3)
is
where is an arbitrary constant.
REMARK: Note that separation of the variables did not make the solution shorter or easier.
In the foregoing example we were able to write the given differential equation in the form
, and hence obtain its solution. However, we cannot always do this. Indeed we see by comparing equation (1) with (2) that the differential equation
can be written as if and only if
for some function . This motivates the following definition:
DEFINITION: The differential equation
is said to be exact in a region of the -plane if there exists a function such that
(4)
for all in Any function satisfying (4) is called a potential function for the differential equation
We emphasize that if such a function exists, then the preceding differential equation can be written as
This is why such a differential equation is called an exact differential equation. From the previous example, a potential function for the differential equation
is
We now show that if a differential equation is exact and we can find a potential function , its solution can be written down immediately.
THEOREM: The general solution to an exact equation
is defined implicitly by
where satisfies (4) and is an arbitrary constant.
THEOREM (Test for Exactness): Let , and their first partial derivatives and
, be continuous in a (simply connected) region of the -plane. Then the differential equation
is exact for all in if and only if
(5)
EXAMPLE: Determine whether the given differential equation is exact.
1.
Solution: We have
so that
We first show that
We have
But
therefore
We have
We now find . We have
It follows from the previous theorem that the differential equation is exact.
2.
Solution: We have
so that
whereas
Since
the differential equation is not exact.
EXAMPLE: Find the general solution to
Solution: We have
so that
We first show that
We have
We now find . We have
Hence the given differential equation is exact, and so there exists a potential function such that
(6)
(7)
which gives
Integrating equation (6) with respect to , holding fixed, yields
(8)
where is an arbitrary function of . We now determine such that (8)
also satisfies (7). Taking the derivative of (8) with respect to yields
(9)
Equations (7) and (9) give two expressions for . This allows us to determine . Subtracting equation (7) from equation (9) gives the consistency requirement
which implies, upon integration, that
where we have set the integration constant equal to zero without loss of generality, since we require only one potential function. Substitution into (8) yields the potential function
Integrating equation (7) with respect to , holding fixed, yields
(8')
where is an arbitrary function of . We now determine such that
also satisfies (6). Taking the derivative of with respect to yields
(9')
Equations (6) and give two expressions for . This allows us to determine . Subtracting equation (6) from equation gives the consistency requirement
which implies, upon integration, that
where we have set the integration constant equal to zero without loss of generality, since we require only one potential function. Substitution into yields the potential function
Hence the general solution is
Since , the original differential equation can be written as
therefore
EXAMPLE: Find the general solution to
Solution: We have
One can check that
We first show that
We have
Since
We have
therefore
and
We first use the Product rule
and then the Chain rule:
it follows that
We now find . We have
To find , we first use the Product rule
and then the Chain rule:
and so the differential equation is exact. Hence there exists a potential function such that
(10)
(11)
which gives
In this case, equation (11) is the simpler equation, and so we integrate it with respect to , holding fixed, to obtain
(12)
where is an arbitrary function of . We now determine , and hence ,
from (10) and (12). Differentiating (12) partially with respect to yields
(13)
We have
But
To find , we first use the Product rule
and then the Chain rule:
therefore
Equations (10) and (13) are consistent if and only if
Hence, upon integrating,
where we have once more set the integration constant to zero without loss of generality, since we require only one potential function. Substituting into (12) gives the potential function
Hence the general solution is
Since , the original differential equation can be written as
therefore
Integrating Factors
Usually a given differential equation will not be exact. However, sometimes it is possible to multiply the differential equation by a nonzero function to obtain an exact equation that can then be solved using the technique we have described in this section. Notice that the solution to the resulting exact equation will be the same as that of the original equation, since we multiply by a nonzero function.
DEFINITION: A nonzero function is called an integrating factor for the differential equation
if the differential equation
is exact.
EXAMPLE: Show that is an integrating factor for the differential equation
(14)
Solution: Multiplying the given differential equation (which is not exact
) by yields
We have
so
(15)
One can check that
We have
so that the differential equation (15) is exact, and hence is an integrating
factor for equation (14). Therefore there exists a potential function such that
(16)
(17)
which gives
We integrate (16) it with respect to , holding fixed, to obtain
(18)
We have
where is an arbitrary function of . We now determine , and hence ,
from (17) and (18). Differentiating (18) partially with respect to yields
(19)
We have
Equations (17) and (19) are consistent if and only if
Hence, upon integrating,
where we have once more set the integration constant to zero without loss of generality, since we require only one potential function. Substituting into (18) gives the potential function
We integrate (17) it with respect to , holding fixed, to obtain
(18')
We have
where is an arbitrary function of . We now determine , and hence ,
from (16) and . Differentiating partially with respect to yields
(19')
We have
Equations (16) and are consistent if and only if
Hence, upon integrating,
where we have once more set the integration constant to zero without loss of generality, since we require only one potential function. Substituting into gives the potential function
Hence the general solution to equation (15) (and therefore the general solution to
equation (14)) is defined implicitly by
Since , the original differential equation can be written as
therefore
That is,
THEOREM: The function is an integrating factor for
(20)
if and only if it is a solution to the partial differential equation
(21)
THEOREM: Consider the differential equation
1. There exists an integrating factor that is dependent only on if and only if
a function of only. In such a case, an integrating factor is
2. There exists an integrating factor that is dependent only on if and only if
a function of only. In such a case, an integrating factor is
EXAMPLE: Solve
(22)
Solution: The equation is not exact.
However,
We have
so
which is a function of only. It follows from the preceding theorem that an
integrating factor for equation (22) is
We have
where
therefore
Multiplying equation (22) by yields the exact equation
(23)
(One can check that this is exact
, although it must be, by the previous theorem.)
We have
Hence there exists a potential function such that
(24)
(25)
which gives
In this case, equation (25) is the simpler equation, and so we integrate it with respect to , holding fixed, to obtain
(26)
We have
where is an arbitrary function of . We now determine , and hence ,
from (24) and (26). Differentiating (26) partially with respect to yields
(27)
We have
Equations (24) and (27) are consistent if and only if
Hence, upon integrating,
We have
where we have once more set the integration constant to zero without loss of generality, since we require only one potential function. Substituting into (26) gives the potential function
Hence the general solution to (22) is given implicitly by
Since , the original differential
equation can be written as