Login
📚 Differential Equations for Engineers
Chapters ▾
⇩ Download ▾

1.8 Exact Equations

Another type of equation that comes up quite often in physics and engineering is an exact equation. Suppose F(x,y) is a function of two variables, which we call the potential function. The naming should suggest potential energy, or electric potential. Exact equations and potential functions appear when there is a conservation law at play, such as conservation of energy. Let us make up a simple example. Let

F(x,y)=x2+y2.

We are interested in the lines of constant energy, that is lines where the energy is conserved; we want curves where F(x,y)=C, for some constant C. In our example, the curves x2+y2=C are circles. See Figure 1.

Plot of four concentric blue circles centred on the origin, radii roughly 0.5, 3, 6 and 9, on axes about -13 to 13 by -10 to 10. They nest as closed level curves without touching.
Figure 1: Solutions to F(x,y)=x2+y2=C for various C.

We take the total derivative of F:

dF=Fxdx+Fydy.

For convenience, we will make use of the notation of Fx=Fx and Fy=Fy. In our example,

dF=2xdx+2ydy.

We apply the total derivative to F(x,y)=C, to find the differential equation dF=0. The differential equation we obtain in such a way has the form

Mdx+Ndy=0,orM+Ndydx=0.

An equation of this form is called exact if it was obtained as dF=0 for some potential function F. In our simple example, we obtain the equation

2xdx+2ydy=0,or2x+2ydydx=0.

Since we obtained this equation by differentiating x2+y2=C, the equation is exact. We often wish to solve for y in terms of x. In our example,

y=±C2x2.

An interpretation of the setup is that at each point v=(M,N) is a vector in the plane, that is, a direction and a magnitude. As M and N are functions of (x,y), we have a vector field. The particular vector field v that comes from an exact equation is a so-called conservative vector field, that is, a vector field that comes with a potential function F(x,y), such that

v=(Fx,Fy).

Let γ be a path in the plane starting at (x1,y1) and ending at (x2,y2). If we think of v as force, then the work required to move along γ is

γv(r)·dr=γMdx+Ndy=F(x2,y2)F(x1,y1).

That is, the work done only depends on endpoints, that is where we start and where we end. For example, suppose F is gravitational potential. The derivative of F given by v is the gravitational force. What we are saying is that the work required to move a heavy box from the ground floor to the roof, only depends on the change in potential energy. That is, the work done is the same no matter what path we took; if we took the stairs or the elevator. Although if we took the elevator, the elevator is doing the work for us. The curves F(x,y)=C are those where no work need be done, such as the heavy box sliding along without accelerating or breaking on a perfectly flat roof, on a cart with incredibly well oiled wheels.

An exact equation is a conservative vector field, and the implicit solution of this equation is the potential function.

Solving exact equations

Now you, the reader, should ask: Where did we solve a differential equation? Well, in applications we generally know M and N, but we do not know F. That is, we may have just started with 2x+2ydydx=0, or perhaps even

x+ydydx=0.

It is up to us to find some potential F that works. Many different F will work; adding a constant to F does not change the equation. Once we have a potential function F, the equation F(x,y(x))=C gives an implicit solution of the ODE.

The procedure, once we know that the equation is exact, is:

  1. Integrate Fx=M in x resulting in F(x,y)=something+A(y).
  2. Differentiate this F in y, and set that equal to N, so that we may find A(y) by integration.

The procedure can also be done by first integrating in y and then differentiating in x. Pretty easy huh? Let’s try this again.

Is there an easier way to check for the existence of F, other than failing in trying to find it? Turns out there is. Suppose M=Fx and N=Fy. Then as long as the second derivatives are continuous,

My=2Fyx=2Fxy=Nx.

Let us state it as a theorem. Usually this is called the Poincaré Lemma.to the power 1

The theorem doesn’t give us a global F defined everywhere. In general, we can only find the potential locally, near some initial point. By this time, we have come to expect this from differential equations.

Let us return to Example 2 where M=2x+y and N=xy. Notice My=1 and Nx=y, which are clearly not equal. The equation is not exact.

Integrating factors

Sometimes an equation Mdx+Ndy=0 is not exact, but it can be made exact by multiplying with a function u(x,y). That is, perhaps for some nonzero function u(x,y),

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

is exact. Any solution to this new equation is also a solution to Mdx+Ndy=0.

In fact, a linear equation

dydx+p(x)y=f(x),or(p(x)yf(x))dx+dy=0

is always such an equation. Let r(x)=ep(x)dx be the integrating factor for a linear equation. Multiply the equation by r(x) and write it in the form of M+Ndydx=0.

r(x)p(x)yr(x)f(x)+r(x)dydx=0.

Then M=r(x)p(x)yr(x)f(x), so My=r(x)p(x), while N=r(x), so Nx=r(x)=r(x)p(x). In other words, we have an exact equation. Integrating factors for linear functions are just a special case of integrating factors for exact equations.

But how do we find the integrating factor u? Well, given an equation

Mdx+Ndy=0,

u should be a function such that

y[uM]=uyM+uMy=x[uN]=uxN+uNx.

Therefore,

(MyNx)u=uxNuyM.

At first it may seem we replaced one differential equation by another. True, but all hope is not lost.

A strategy that often works is to look for a u that is a function of x alone, or a function of y alone. If u is a function of x alone, that is u(x), then we write u(x) instead of ux, and uy is just zero. Then

MyNxNu=u.

In particular, MyNxN ought to be a function of x alone (not depend on y). If so, then we have a linear equation

uMyNxNu=0.

Letting P(x)=MyNxN, we solve using the standard integrating factor method, to find u(x)=CeP(x)dx. The constant in the solution is not relevant, we need any nonzero solution, so we take C=1. Then u(x)=eP(x)dx is the integrating factor.

Similarly we could try a function of the form u(y). Then

MyNxMu=u.

In particular, MyNxM ought to be a function of y alone. If so, then we have a linear equation

u+MyNxMu=0.

Letting Q(y)=MyNxM, we find u(y)=CeQ(y)dy. We take C=1. So u(y)=eQ(y)dy is the integrating factor.

Footnotes

[1] Named for the French polymath Jules Henri Poincaré (1854–1912).

Adapted from Differential Equations for Engineers by Jiří Lebl (Oklahoma State University), hosted on LibreTexts (math.libretexts.org) and licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.