Exact Equations – General Form, Solutions, and Examples

Exact equations are unique differential equations that satisfy certain conditions leading to a simpler way to find their corresponding solutions. Knowing how to simplify and solve exact equations is important when you want to have a solid foundation on differential equations. This leads to you being confident when dealing with more advanced topics and when taking STEM-related courses that utilize differential equations.

Exact equations are first-order differential equations that appear in the form of P(x,y)x+Q(x,y)xxdy=0. We can solve exact equations by utilizing the partial derivatives of P and Q.

Since this deals with differential equations, familiarity with the topic is a must. In this article, we’ll define the conditions for a differential equation to be exact, we’ll show you how to test equations for their exactness, and we’ll break down the process of finding the solutions for different types of exact equations.

What Is an Exact Equation?

An exact equation is a differential equation that has the general form shown below.

P(x,y)xdx+Q(x,y)xdy=0

For this differential equation to be an exact differential equation, then the function, f, must satisfy the following conditions:

fx=P(x,y)fy=Q(x,y)

Keep in mind that the function, f, must have continuous partial derivatives with respect to x and y. When the differential equation is an exact equation, its general solution has the implicit form, f(x,y)=C, where C is a constant. Why don’t we check this by proving that by finding the expression for df? By applying the chain rule, we have the resulting expression:

df=fxxdx+fyxdy

Since f(x,y)=C, the left-hand side of the equation  is equal to 0. If we let P(x,y)=fx and Q(x,y)=fy, we can rewrite the equation proving the general form of the exact equation to remain true.

0=fxxdx+fyxdy0=P(x,y)xdx+Q(x,y)xdyP(x,y)xdx+Q(x,y)xdy=0

Let’s now go back to the general form of the exact equation and rewrite them in the following forms:

P(x,y)+Q(x,y)xdydx=0xxx(1)P(x,y)xdxdy+Q(x,y)=0xxx(2)

We use the first form (Equation (1)) when x is the independent variable and y is the dependent variable. The second form is best used when y is the independent variable and x is the dependent variable.

0=fxxdx+fyxdy0=P(x,y)xdx+Q(x,y)xdy

Here are some examples of exact differential equations in three possible forms:

6x2y2xdx+4x3yxdy=06x2y2+4x3yxdydx=06x2y2xdxdy+4x3y=0
(x3+y3)xdx+3xy2xdy=0(x3+y3)+3xy2xdydx=0(x3+y3)xdxdy+3xy2=0
4xcosyxdx2y2sinyxdy=04xcosy2y2sinyxdydx=04xcosyxdxdy2y2siny=0

From the definition of exact equations and the examples we’ve shown you, let’s establish a rule for testing exact differential equations:

                                          TEST FOR EXACT EQUATIONS

Suppose that there exist continuous partial derivatives for P(x,y) and Q(x,y), we can use the condition shown below,

Py=Qx

to confirm whether the differential equation, P(x,y)xdx+Q(x,y)xdy, is an exact equation.

Let’s take a look at the differential equation, 6x2y2xdx+4x3yxdy=0. Find the partial derivatives of 6x2y2 and 4x3y with respect to y and x, respectively, to confirm that the equation is indeed an exact equation.

y(6x2y2)=(6x2)(2y)=12x2yx(4x3y)=(12x2)(y)=12x2yy(6x2y2)=x(4x3y)

Since both expressions are equal, the differential exact equation satisfies the test for exact equations. Now that we’ve established the core definition and conditions for exact equations, it’s time for us to break down the steps in simplifying and solving different types of exact equations.

How To Solve Exact Equations?

There can be different approaches when solving exact equations – but to help you have a more systematic approach, we’ve prepared a guideline for you.

1. First, manipulate the equation so that it is in the exact equation’s general form:
P(x,y)xdx+Q(x,y)xdy
2. Identify the functions representing P(x,y) and Q(x,y) then test the equation for exactness as we have discussed earlier.
Py=Qx
3. When the equation satisfies the condition for exact equations, assess the equation and see whether it’s better to integrate P(x,y) with respect to x or Q(x,y) with respect to y.

For the next few steps, we assume that you chose to integrate P(x,y).

4. After integrating P(x,y) with respect to x, we can rewrite the function shown below.
f(x,y)=P(x,y)xdx+g(y)
Since we’re integrating with respect to x, we’re treating the function in terms of y as a constant, hence we have g(y).
5. Once we’ve simplified the expression for f(x,y) from the previous step, find g(y) by taking the partial derivative of f(x,y) with respect to y. f(x,y)=P(x,y)xdx+g(y)fy=y(P(x,y)xdx)+g(y)
6. We’ve established before that Q(x,y)=fy, so use this to solve for g(y) and find the expression for f(x,y).
7. When given an initial condition for the exact differential equation, use the implicit form, f(x,y)=C, to solve for the constant.

The best way to master solving exact equations is by working on different types of differential equations. Why don’t we begin by finding the solution for the differential equation, 4xyxdx+(2x2+8y2)xdy=0?

When given a differential equation, we first confirm the exactness of the differential equation. From our equation, we have P=4xy and Q=2x2+8y2. Below are their respective partial derivatives:

PyQx
Py=y(4xy)=4xQx=x(2x2+8y2)=4x

Since Py=Qx, we can confirm that the differential equation is an exact equation. This means that we have the function, f(x,y), defined by the two differential equations shown below.

fx=4xyfy=2x2+8y2

Since P(x,y) is a monomial, it is much easier to integrate 4xy with respect to x. We have 4xyxdx=2x2y, so we can now rewrite f(x,y) as a sum of the antiderivative of 4x and g(y).

f(x,y)=P(x)xdx+g(y)=4xxdx+g(y)=2x2y+g(y)

Recall that fy=Q(x,y)=(2x2+8y2) and we know that f(x,y)=2x2y+g(y). Using these equations, take the partial derivative of f(x,y) with respect to y then equate this to (2x2+8y2).

yf(x,y)=y[2x2y+g(y)]=2x2+g(y)2x2+g(y)=2x2+8yg(y)=8y

Integrate 8y to find the expression for g(y). There is no initial condition provided for this differential equation, account for the constant, C, when integrating 8y.

g(y)xdy=8y2xdy=83y3+C

Complete the expression for f(x,y) using the result and write the solution of the exact equation in the form of f(x,y)=C to account for the arbitrary constant.

f(x,y)=2x2y+83y32x2y+83y3=C

This means that the general solution of our exact differential equation is equal to 2x2y+83y3=C.

This example shows us how we can find the general solution of a simple exact differential equation. Don’t worry, we have prepared more examples for you to work on! When you’re ready, head over to the section below to try out more examples and eventually master solving this type of differential equation!

Example 1

Find the general solution for the differential equation, (8x+4y2)xdx+y(8x6y)xdy=0.

Solution

First, lets identify the expressions for P(x,y) and Q(x,y) from the given differential equation.

P(x,y)=8x+4y2Q(x,y)=y(8x6y)=8xy6y2

Confirm the exactness of the differential equation by comparing the expressions of Py and Qx.

PyQx
Py=y(8x+4y2)=8yQx=x(8xy6y2)=8y

Since the two partial derivatives are equal, we can confirm that the differential equation is exact. We can integrate either expression but let’s stick with the default option unless working with Q is much more convenient. Integrate P(x,y)=8x+4y2 with respect to x first.

P(x,y)xdx=(8x+4y2)xdx=4x2+4xy2

We can now establish the equation, f(x,y)=P(x,y)xdx+g(y), where f(x,y) is defined by these two differential equations:

fx=8x+4y2fy=y(8x6y)

After writing the equation of f(x,y) in terms of P(x,y)xdx and g(y), take the partial derivative of both sides of the equation with respect to y.

f(x,y)=P(x,y)xdx+g(y)=(4x2+4xy2)+g(y)yf(x,y)=y(4x2+4xy2)+g(y)

Use the fact that fy=Q(x,y)=8xy6y2 to find the expression for g(y). Equate 8xy6y2 with our previous expression for fy then solve for g(y) by integrating g(y).

y(4x2+4xy2)+g(y)=8xy6y2[0+4x(2y)]+g(y)=8xy6y28xy+g(y)=8xy6y2g(y)=6y2g(y)=(6y2)xdy=6y33=2y3

Rewrite our current expression for f(x,y) and replace g(y) with 2y3. Since we’re looking for a general solution again, we’ll have to account for the arbitrary constant, C.

f(x,y)=CP(x,y)xdx+g(y)=C(4x2+4xy2)+(2y3)=C4x2+4xy22y3=C

This means that the general solution of our exact equation is equal to 4x2+4xy22y3=C when written in implicit form.

Example 2

Find the particular solution for the differential equation, (4xy12x2)+(6y+2x2+5)xdydx=0, given that the equation satisfies the initial condition, y(0)=4.

Solution

Rewrite the equation so that it is of the form, P(x,y)xdx+Q(x,y)xdy=0.

(4xy12x2)+(6y+2x2+5)xdydx=0(4xy12x2)dx+(6y+2x2+5)xdy=0

This means that P(x,y)=4xy12x2 and Q(x,y)=(6y+2x2+5), so let’s take their partial derivatives with respect to y and x, respectively.

PyQx
Py=y(4xy12x2)=4xQx=x(6y+2x2+5)=4x

We can say that the equation is exact since we’ve shown that Py=Qx. We’ll show you how it’ll work if we choose to integrate Q(x,y) with respect to y this time.

Q(x,y)xdy=(6y+2x2+5)xdy=3y2+2x2y+5y

Suppose that f(x,y) is defined by the two differential equations: fy=4xy12x2 and fx=6y+2x2+5. We can rewrite f(x,y) using integral of Q(x,y) and g(x).

f(x,y)=Q(x,y)xdy+g(x)=(3y2+2x2y+5y)+g(x)

Solve for g(x) by finding fx and equate the expression to P(x,y).

xf(x,y)=x[(3y2+2x2y+5y)+g(x)]=4xy+g(x)(4xy12x2)=4xy+g(x)g(x)=12x2g(x)=12x2xdx=4x3

This means that f(x,y)=3y2+2x2y+5y4x3 and the general solution for the equation is 3y2+2x2y+5y4x3=C. Use f(0)=4 to find the value of C.

3(4)2+2(0)2(4)+5(4)4(0)3=CC=68

Hence, the particular solution of the exact equation is 3y^2 + 2x^2y +5y -4x^3 = 68$.

Practice Questions

1. Find the general solution for the differential equation, 2(3x+xy)xdx+(4y3+x2)xdy=0.
2. Find the general solution for the differential equation, y22(1+x2)xdx+ytan1xxdy=0.
3. Solve the initial value problem, (e4x+2xy2)dxdy+(cosy+2x2y)=0, given the initial condition, y(0)=π.

Answer Key

1. x2y+3x2+y4=C
2. y22tan1x=C
3. 14e4x+x2y2+siny=14

Images/mathematical drawings are created with GeoGebra.