# Differential Equations

## First Order Equations # Exact Differential Equations

## Definition of Exact Equation

A differential equation of type

$P\left( {x,y} \right)dx + Q\left( {x,y} \right)dy = 0$

is called an exact differential equation if there exists a function of two variables $$u\left( {x,y} \right)$$ with continuous partial derivatives such that

$du\left( {x,y} \right) = P\left( {x,y} \right)dx + Q\left( {x,y} \right)dy.$

The general solution of an exact equation is given by

$u\left( {x,y} \right) = C,$

where $$C$$ is an arbitrary constant.

## Test for Exactness

Let functions $$P\left( {x,y} \right)$$ and $$Q\left( {x,y} \right)$$ have continuous partial derivatives in a certain domain $$D.$$ The differential equation $$P\left( {x,y} \right)dx + Q\left( {x,y} \right)dy = 0$$ is an exact equation if and only if

$\frac{{\partial Q}}{{\partial x}} = \frac{{\partial P}}{{\partial y}}.$

## Algorithm for Solving an Exact Differential Equation

1. First it's necessary to make sure that the differential equation is exact using the test for exactness:
$\frac{{\partial Q}}{{\partial x}} = \frac{{\partial P}}{{\partial y}}.$
2. Then we write the system of two differential equations that define the function $$u\left( {x,y} \right):$$
$\left\{ \begin{array}{l} \frac{{\partial u}}{{\partial x}} = P\left( {x,y} \right)\\ \frac{{\partial u}}{{\partial y}} = Q\left( {x,y} \right) \end{array} \right..$
3. Integrate the first equation over the variable $$x.$$ Instead of the constant $$C,$$ we write an unknown function of $$y:$$
$u\left( {x,y} \right) = \int {P\left( {x,y} \right)dx} + \varphi \left( y \right).$
4. Differentiating with respect to $$y,$$ we substitute the function $$u\left( {x,y} \right)$$into the second equation:
$\frac{{\partial u}}{{\partial y}} = \frac{\partial }{{\partial y}}\left[ {\int {P\left( {x,y} \right)dx} + \varphi \left( y \right)} \right] = Q\left( {x,y} \right).$
From here we get expression for the derivative of the unknown function $${\varphi \left( y \right)}:$$
$\varphi'\left( y \right) = Q\left( {x,y} \right) - \frac{\partial }{{\partial y}}\left( {\int {P\left( {x,y} \right)dx} } \right).$
5. By integrating the last expression, we find the function $${\varphi \left( y \right)}$$ and, hence, the function $$u\left( {x,y} \right):$$
$u\left( {x,y} \right) = \int {P\left( {x,y} \right)dx} + \varphi \left( y \right).$
6. The general solution of the exact differential equation is given by
$u\left( {x,y} \right) = C.$

### Note:

In Step $$3,$$ we can integrate the second equation over the variable $$y$$ instead of integrating the first equation over $$x.$$ After integration we need to find the unknown function $${\psi \left( x \right)}.$$

## Solved Problems

Click or tap a problem to see the solution.

### Example 1

Solve the differential equation $2xydx + \left( {{x^2} + 3{y^2}} \right)dy = 0.$

### Example 2

Find the solution of the differential equation

$\left( {6{x^2} - y + 3} \right)dx + \left( {3{y^2} - x - 2} \right)dy = 0.$

### Example 1.

Solve the differential equation $2xydx + \left( {{x^2} + 3{y^2}} \right)dy = 0.$

Solution.

The given equation is exact because the partial derivatives are the same:

$\frac{{\partial Q}}{{\partial x}}= \frac{\partial }{{\partial x}}\left( {{x^2} + 3{y^2}} \right) = 2x,\;\; \frac{{\partial P}}{{\partial y}} = \frac{\partial }{{\partial y}}\left( {2xy} \right) = 2x.$

We have the following system of differential equations to find the function $$u\left( {x,y} \right):$$

$\left\{ \begin{array}{l} \frac{{\partial u}}{{\partial x}} = 2xy\\ \frac{{\partial u}}{{\partial y}} = {x^2} + 3{y^2} \end{array} \right..$

By integrating the first equation with respect to $$x,$$ we obtain

$u\left( {x,y} \right) = \int {2xydx} = {x^2}y + \varphi \left( y \right).$

Substituting this expression for $$u\left( {x,y} \right)$$ into the second equation gives us:

$\frac{{\partial u}}{{\partial y}} = \frac{\partial }{{\partial y}}\left[ {{x^2}y + \varphi \left( y \right)} \right] = {x^2} + 3{y^2},\;\; \Rightarrow {x^2} + \varphi'\left( y \right) = {x^2} + 3{y^2},\;\; \Rightarrow \varphi'\left( y \right) = 3{y^2}.$

By integrating the last equation, we find the unknown function $${\varphi \left( y \right)}:$$

$\varphi \left( y \right) = \int {3{y^2}dy} = {y^3},$

so that the general solution of the exact differential equation is given by

${x^2}y + {y^3} = C,$

where $$C$$ is an arbitrary constant.

### Example 2.

Find the solution of the differential equation

$\left( {6{x^2} - y + 3} \right)dx + \left( {3{y^2} - x - 2} \right)dy = 0.$

Solution.

We check this equation for exactness:

$\frac{{\partial Q}}{{\partial x}} = \frac{\partial }{{\partial x}}\left( {3{y^2} - x - 2} \right) = - 1,\;\; \frac{{\partial P}}{{\partial y}} = \frac{\partial }{{\partial y}}\left( {6{x^2} - y + 3} \right) = - 1.$

Hence, the given differential equation is exact. Write the system of equations to determine the function $$u\left( {x,y} \right):$$

$\left\{ \begin{array}{l} \frac{{\partial u}}{{\partial x}} = P\left( {x,y} \right) = 6{x^2} - y + 3\\ \frac{{\partial u}}{{\partial y}} = Q\left( {x,y} \right) = 3{y^2} - x - 2 \end{array} \right.$

Integrate the first equation with respect to the variable $$x$$ assuming that $$y$$ is a constant. This produces:

$u\left( {x,y} \right) = \int {\left( {6{x^2} - y + 3} \right)dx} = \frac{{6{x^3}}}{3} - xy + 3x + \varphi \left( y \right) = 2{x^3} - xy + 3x + \varphi \left( y \right).$

Here we introduced a continuous differentiable function $$\varphi \left( y \right)$$ instead of the constant $$C.$$

Plug in the function $$u\left( {x,y} \right)$$ into the second equation:

$\frac{{\partial u}}{{\partial y}} = \frac{\partial }{{\partial y}}\left[ {2{x^3} - xy + 3x + \varphi \left( y \right)} \right] = - \cancel{x} + \varphi'\left( y \right) = 3{y^2} - \cancel{x} - 2.$

We get equation for the derivative $$\varphi'\left( y \right):$$

$\varphi'\left( y \right) = 3{y^2} - 2.$

Integrating gives the function $$\varphi \left( y \right):$$

$\varphi \left( y \right) = \int {\left( {3{y^2} - 2} \right)dy} = {y^3} - 2y.$

So, the function $$u\left( {x,y} \right)$$ is given by

$u\left( {x,y} \right) = 2{x^3} - xy + 3x + {y^3} - 2y.$

Hence, the general solution of the equation is defined by the following implicit expression:

$2{x^3} - xy + 3x + {y^3} - 2y = C,$

where $$C$$ is an arbitrary real number.

See more problems on Page 2.