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 $\boldsymbol{P(x, y) \phantom{x} +Q(x, y) \phantom{x} \phantom{x}dy = 0}$. We can solve exact equations by utilizing the partial derivatives of $\boldsymbol{P}$ and $\boldsymbol{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.

\begin{aligned}P(x, y) \phantom{x}dx + Q(x, y)\phantom{x}dy&= 0 \end{aligned}

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

\begin{aligned}\dfrac{\partial f}{\partial x} &=P(x, y)\\ \dfrac{\partial f}{\partial y} &= Q(x, y)\end{aligned}

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:

\begin{aligned} df &= \dfrac{\partial f}{\partial x} \phantom{x}dx +\dfrac{\partial f}{\partial y} \phantom{x}dy \end{aligned}

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

\begin{aligned} 0 &= \dfrac{\partial f}{\partial x} \phantom{x}dx +\dfrac{\partial f}{\partial y} \phantom{x}dy\\0 &= P(x, y) \phantom{x}dx + Q(x, y) \phantom{x}dy\\\\&\Rightarrow \boldsymbol{P(x, y)\phantom{x}dx + Q(x, y)\phantom{x}dy=0} \end{aligned}

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

\begin{aligned} P(x, y) + Q(x, y) \phantom{x}\dfrac{dy}{dx} &= 0 \phantom{xxx}(1)\\P(x, y)\phantom{x}\dfrac{dx}{dy}  + Q(x, y) &= 0\phantom{xxx}(2) \end{aligned}

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.

\begin{aligned} 0 &= \dfrac{\partial f}{\partial x} \phantom{x}dx +\dfrac{\partial f}{\partial y} \phantom{x}dy\\0 &= P(x, y) \phantom{x}dx + Q(x, y) \phantom{x}dy \end{aligned}

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

 \begin{aligned}6x^2y^2 \phantom{x}dx + 4x^3y \phantom{x}dy = 0\end{aligned} \begin{aligned}6x^2y^2+4x^3y \phantom{x}\dfrac{dy}{dx} = 0\end{aligned} \begin{aligned}6x^2y^2 \phantom{x}\dfrac{dx}{dy}+ 4x^3y =0\end{aligned} \begin{aligned}(x^3 +y^3) \phantom{x}dx + 3xy^2 \phantom{x}dy = 0\end{aligned} \begin{aligned}(x^3 +y^3)+ 3xy^2 \phantom{x}\dfrac{dy}{dx} =0\end{aligned} \begin{aligned}(x^3 +y^3) \phantom{x}\dfrac{dx}{dy}+ 3xy^2 = 0\end{aligned} \begin{aligned}4x \cos y \phantom{x}dx -2y^2 \sin y \phantom{x}dy = 0\end{aligned} \begin{aligned}4x \cos y – 2y^2 \sin y \phantom{x}\dfrac{dy}{dx} = 0\end{aligned} \begin{aligned}4x \cos y \phantom{x}\dfrac{dx}{dy} – 2y^2 \sin y = 0\end{aligned}

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 EQUATIONSSuppose that there exist continuous partial derivatives for $P(x, y)$ and $Q(x, y)$, we can use the condition shown below,\begin{aligned} \dfrac{\partial P}{\partial y} = \dfrac{\partial Q}{\partial x}\end{aligned}to confirm whether the differential equation, $P(x, y)\phantom{x}dx +Q(x, y) \phantom{x}dy$, is an exact equation.

Let’s take a look at the differential equation, $6x^2y^2 \phantom{x}dx +4x^3y \phantom{x}dy = 0$. Find the partial derivatives of $6x^2y^2$ and $4x^3y$ with respect to $y$ and $x$, respectively, to confirm that the equation is indeed an exact equation.

\begin{aligned}\dfrac{\partial }{\partial y}(6x^2y^2) &= (6x^2)(2y)\\&= 12x^2y\\\dfrac{\partial }{\partial x}(4x^3y) &= (12x^2)(y)\\&= 12x^2y\\\\\dfrac{\partial }{\partial y}(6x^2y^2) &= \dfrac{\partial }{\partial x}(4x^3y)\end{aligned}

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:
\begin{aligned}P(x, y) \phantom{x} dx + Q(x,y ) \phantom{x} dy\end{aligned}
2. Identify the functions representing $P(x,y)$ and $Q(x, y)$ then test the equation for exactness as we have discussed earlier.
\begin{aligned} \dfrac{\partial P}{\partial y}= \dfrac{\partial Q}{\partial x}\end{aligned}
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.
\begin{aligned} f(x, y) &= \int P(x, y) \phantom{x}dx + g(y)\end{aligned}
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$. \begin{aligned} f(x, y) &= \int P(x, y) \phantom{x}dx +g(y)\\\dfrac{\partial f}{\partial y} &= \dfrac{\partial}{\partial y}\left(\int P(x, y) \phantom{x}dx \right ) + g^{\prime}(y)\end{aligned}
6. We’ve established before that $Q(x, y) = \dfrac{\partial f}{\partial y}$, so use this to solve for $g^{\prime}(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, $4xy \phantom{x}dx + (2x^2 +8y^2)\phantom{x} dy=0$?

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

 \begin{aligned}\boldsymbol{\dfrac{\partial P}{\partial y}}\end{aligned} \begin{aligned}\boldsymbol{\dfrac{\partial Q}{\partial x}}\end{aligned} \begin{aligned}\dfrac{\partial P}{\partial \partial y} = \dfrac{\partial}{\partial y} (4xy) = 4x\end{aligned} \begin{aligned}\dfrac{\partial Q}{\partial \partial x} = \dfrac{\partial}{\partial x} (2x^2 + 8y^2) = 4x\end{aligned}

Since $\dfrac{\partial P}{\partial y} = \dfrac{\partial Q}{\partial x}$, 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.

\begin{aligned} \dfrac{\partial f}{\partial x} &= 4xy\\\dfrac{\partial f}{\partial y} &= 2x^2 + 8y^2 \end{aligned}

Since $P(x, y)$ is a monomial, it is much easier to integrate $4xy$ with respect to $x$. We have $\int 4xy \phantom{x}dx = 2x^2y$, so we can now rewrite $f(x, y)$ as a sum of the antiderivative of $4x$ and $g(y)$.

\begin{aligned}f(x, y)&= \int P(x) \phantom{x}dx + g(y)\\&= \int 4x \phantom{x} dx + g(y) \\&= 2x^2y + g(y)\end{aligned}

Recall that $\dfrac{\partial f}{\partial y} = Q(x, y) = (2x^2 + 8y^2)$ and we know that $f(x, y) = 2x^2y + g(y)$. Using these equations, take the partial derivative of $f(x, y)$ with respect to $y$ then equate this to $(2x ^2 + 8y^2)$.

\begin{aligned}\dfrac{\partial}{\partial y}f(x, y)&= \dfrac{\partial}{\partial y}\left[2x^2y + g(y) \right] \\&= 2x^2 + g^{\prime}(y)\\\\2x^2 + g^{\prime}(y) &= 2x^2 + 8y\\g^{\prime}(y) &= 8y\end{aligned}

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$.

\begin{aligned}\int g(y) \phantom{x}dy &= \int 8y^2 \phantom{x}dy\\&= \dfrac{8}{3}y^3 + C\end{aligned}

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.

\begin{aligned}f(x, y) &= 2x^2y + \dfrac{8}{3}y^3 \\2x^2y + \dfrac{8}{3}y^3 &= C \end{aligned}

This means that the general solution of our exact differential equation is equal to $2x^2y + \dfrac{8}{3}y^3 = 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 + 4y^2) \phantom{x}dx + y(8x – 6y) \phantom{x}dy = 0$.

Solution

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

\begin{aligned}P(x, y) &= 8x + 4y^2\\ Q(x, y) &= y(8x – 6y)\\&= 8xy – 6y^2\end{aligned}

Confirm the exactness of the differential equation by comparing the expressions of $\dfrac{\partial P}{\partial y}$ and $\dfrac{\partial Q}{\partial x}$.

 \begin{aligned}\boldsymbol{\dfrac{\partial P}{\partial y}}\end{aligned} \begin{aligned}\boldsymbol{\dfrac{\partial Q}{\partial x}}\end{aligned} \begin{aligned}\dfrac{\partial P}{\partial \partial y} = \dfrac{\partial}{\partial y} (8x + 4y^2) = 8y\end{aligned} \begin{aligned}\dfrac{\partial Q}{\partial \partial x} = \dfrac{\partial}{\partial x} (8xy – 6y^2) = 8y\end{aligned}

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 + 4y^2$ with respect to $x$ first.

\begin{aligned}\int P(x, y) \phantom{x}dx &= \int (8x + 4y^2) \phantom{x}dx\\&= 4x^2 + 4xy^2\end{aligned}

We can now establish the equation, $f(x, y)= \int P(x, y) \phantom{x}dx + g(y)$, where $f(x, y)$ is defined by these two differential equations:

\begin{aligned} \dfrac{\partial f}{\partial x} &= 8x  + 4y^2\\\dfrac{\partial f}{\partial y} &= y(8x – 6y) \end{aligned}

After writing the equation of $f(x, y)$ in terms of $\int P(x, y) \phantom{x}dx$ and $g(y)$, take the partial derivative of both sides of the equation with respect to $y$.

\begin{aligned} f(x, y) &= \int P(x, y) \phantom{x}dx + g(y)\\&= (4x^2 + 4xy^2)  + g(y)\\\\\dfrac{\partial}{\partial y} f(x, y) &= \dfrac{\partial}{\partial y}(4x^2 + 4xy^2)  + g^{\prime}(y)\end{aligned}

Use the fact that $\dfrac{\partial f}{\partial y} = Q(x, y) = 8xy – 6y^2$ to find the expression for $g(y)$. Equate $8xy – 6y^2$ with our previous expression for $\dfrac{\partial f}{\partial y}$ then solve for $g(y)$ by integrating $g^{\prime}(y)$.

\begin{aligned}\dfrac{\partial}{\partial y}(4x^2 + 4xy^2)  + g^{\prime}(y) &= 8xy – 6y^2\\ [0 + 4x(2y)] + g^{\prime}(y) &= 8xy – 6y^2\\8xy + g^{\prime}(y) &= 8xy – 6y^2\\g^{\prime}(y) &= -6y^2\\\\g(y) &= \int (-6y^2) \phantom{x}dy\\&= -\dfrac{6y^3}{3}\\&= -2y^3 \end{aligned}

Rewrite our current expression for $f(x, y)$ and replace $g^{\prime}{(y)}$ with $-2y^3$. Since we’re looking for a general solution again, we’ll have to account for the arbitrary constant, $C$.

\begin{aligned}f(x, y) &= C\\ \int P(x, y) \phantom{x}dx + g(y) &= C\\(4x^2 + 4xy^2) + (-2y^3) &= C\\ 4x^2 + 4xy^2 – 2y^3 &= C\end{aligned}

This means that the general solution of our exact equation is equal to $4x^2 + 4xy^2 – 2y^3 = C$ when written in implicit form.

Example 2

Find the particular solution for the differential equation, $(4xy – 12x^2) + (6y + 2x^2 +5) \phantom{x}\dfrac{dy}{dx} = 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) \phantom{x}dx + Q(x, y)\phantom{x} dy =0$.

\begin{aligned}(4xy – 12x^2)+ (6y + 2x^2 +5) \phantom{x}\dfrac{dy}{dx} = 0\\(4xy – 12x^2) dx+ (6y + 2x^2 +5) \phantom{x}dy = 0\end{aligned}

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

 \begin{aligned}\boldsymbol{\dfrac{\partial P}{\partial y}}\end{aligned} \begin{aligned}\boldsymbol{\dfrac{\partial Q}{\partial x}}\end{aligned} \begin{aligned}\dfrac{\partial P}{\partial \partial y} = \dfrac{\partial}{\partial y} (4xy – 12x^2) = 4x\end{aligned} \begin{aligned}\dfrac{\partial Q}{\partial \partial x} = \dfrac{\partial}{\partial x} (6y + 2x^2 +5) = 4x\end{aligned}

We can say that the equation is exact since we’ve shown that $\dfrac{\partial P}{\partial y} = \dfrac{\partial Q}{\partial x}$. We’ll show you how it’ll work if we choose to integrate $Q(x, y)$ with respect to $y$ this time.

\begin{aligned}\int Q(x, y)\phantom{x}dy &= \int (6y + 2x^2 +5) \phantom{x}dy \\&= 3y^2 + 2x^2y +5y\end{aligned}

Suppose that $f(x, y)$ is defined by the two differential equations: $\dfrac{\partial f}{\partial y} = 4xy – 12x^2$ and $\dfrac{\partial f}{\partial x} = 6y + 2x^2 +5$. We can rewrite $f(x, y)$ using integral of $Q(x, y)$ and $g(x)$.

\begin{aligned}f(x, y) &= \int Q(x, y)\phantom{x}dy + g(x)\\&= (3y^2 + 2x^2y +5y ) +g(x) \end{aligned}

Solve for $g(x)$ by finding $\dfrac{\partial f}{\partial x}$ and equate the expression to $P(x, y)$.

\begin{aligned}\dfrac{\partial}{\partial x} f(x, y) &= \dfrac{\partial }{\partial x}[(3y^2 + 2x^2y +5y ) +g(x)]\\&= 4xy + g^{\prime}(x)\\\\(4xy – 12x^2) &= 4xy + g^{\prime}(x)\\g^{\prime}(x) &= -12x^2\\g(x) &= -\int 12x^2\phantom{x}dx\\&= -4x^3 \end{aligned}

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

\begin{aligned}3(4)^2 + 2(0)^2(4) +5(4) -4(0)^3 &= C\\C &= 68\end{aligned}

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) \phantom{x}dx + (4y^3 + x^2) \phantom{x}dy = 0$. 2. Find the general solution for the differential equation,$\dfrac{y^2}{2(1 + x^2)} \phantom{x} dx+ y\tan^{-1} x \phantom{x}dy =0$. 3. Solve the initial value problem,$(e^{4x}+2xy^2)\dfrac{dx}{dy} +(\cos y +2x^2y)=0$, given the initial condition,$y(0) = \pi$. Answer Key 1.$x^2y +3x^2 + y^4 = C$2.$\dfrac{y^2}{2} \tan^{-1}x = C$3.$\dfrac{1}{4}e^{4x} +x^2y^2 +\sin y =\dfrac{1}{4}\$

Images/mathematical drawings are created with GeoGebra.

Rate this page