How to find the solution to an exact differential equation

 
 
Exact differential equations.jpeg
 
 
 

Exact differential equations have a specific format, and are solved using a specific set of steps

In order for a differential equation to be called an exact differential equation, it must be given in the form

M(x,y)+N(x,y)dydx=0M(x,y)+N(x,y)\frac{dy}{dx}=0

and have a solution Ψ(x,y)\Psi(x,y) such that

Ψx=Ψx=M(x,y)=M\frac{\partial\Psi}{\partial x}=\Psi_x=M(x,y)=M

and

Ψy=Ψy=N(x,y)=N\frac{\partial\Psi}{\partial y}=\Psi_y=N(x,y)=N

Krista King Math.jpg

Hi! I'm krista.

I create online courses to help you rock your math class. Read more.

 

If we assume that Ψ(x,y)\Psi(x,y) is a continuous function, then we can also assume that its mixed second-order partial derivatives are equal.

2Ψxy=2Ψyx\frac{\partial^2\Psi}{\partial x\partial y}=\frac{\partial^2\Psi}{\partial y\partial x}

We can rewrite this equation in a different form as

Ψxy=Ψyx\Psi_{xy}=\Psi_{yx}

(Ψx)y=(Ψy)x\left(\Psi_x\right)_y=\left(\Psi_y\right)_x

(M)y=(N)x(M)_y=(N)_x

My=NxM_y=N_x

In other words, we just used the fact that Ψ(x,y)\Psi(x,y) has to be a solution to the exact differential equation to develop a test for exact differential equations, and the test tells us that a differential equation is exact if My=NxM_y=N_x. So, if the partial derivative of MM with respect to yy is equal to the partial derivative of NN with respect to xx, then the differential equation is exact.

This is a test we can use to say whether or not the differential equation is exact, before we go about finding the solution Ψ(x,y)\Psi(x,y).

The general or implicit solution to an exact differential equation is given by

Ψ(x,y)=c\Psi(x,y)=c

where cc is a constant. If we want to, we can prove that this is the solution by starting with the standard form of an exact differential equation

M(x,y)+N(x,y)dydx=0M(x,y)+N(x,y)\frac{dy}{dx}=0

We already said that

Ψx=Ψx=M(x,y)=M\frac{\partial\Psi}{\partial x}=\Psi_x=M(x,y)=M

and

Ψy=Ψy=N(x,y)=N\frac{\partial\Psi}{\partial y}=\Psi_y=N(x,y)=N

so we can substitute into the standard form and get

Ψx+Ψydydx=0\Psi_x+\Psi_y\frac{dy}{dx}=0

Using chain rule for multivariable functions, we can change the left-hand side to

ddx[Ψ(x,y)]=0\frac{d}{dx}\left[\Psi(x,y)\right]=0

Integrating both sides with respect to xx to get Ψ(x,y)\Psi(x,y) by itself, we get

ddx[Ψ(x,y)] dx=0 dx\int\frac{d}{dx}\left[\Psi(x,y)\right]\ dx=\int 0\ dx

Ψ(x,y)+c1=c2\Psi(x,y)+c_1=c_2

Ψ(x,y)=c2c1\Psi(x,y)=c_2-c_1

Ψ(x,y)=c\Psi(x,y)=c

Now that we’ve proven that Ψ(x,y)=c\Psi(x,y)=c is always the solution to an exact differential equation, we need to work on finding Ψ(x,y)\Psi(x,y).

We’ve already used the fact that

Ψx=Ψx=M(x,y)=M\frac{\partial\Psi}{\partial x}=\Psi_x=M(x,y)=M

and

Ψy=Ψy=N(x,y)=N\frac{\partial\Psi}{\partial y}=\Psi_y=N(x,y)=N

and we’ll use it again here to find the solution. We’ll start with

Ψx=M(x,y)\Psi_x=M(x,y)

and

Ψy=N(x,y)\Psi_y=N(x,y)

The left-hand sides of both of these are partial derivatives of Ψ\Psi, but we need to get back to Ψ\Psi itself. To do that, we’d need to take the integrals

Ψx dx=M(x,y) dx\int\Psi_x\ dx=\int M(x,y)\ dx

and

Ψy dy=N(x,y) dy\int\Psi_y\ dy=\int N(x,y)\ dy

Taking the integral with respect to xx of the partial derivative with respect to xx cancels both operations and leaves us with just Ψ\Psi, in the same way that taking the integral with respect to yy of the partial derivative with respect to yy cancels those operations and leaves us with just Ψ\Psi.

Ψ=M(x,y) dx\Psi=\int M(x,y)\ dx

and

Ψ=N(x,y) dy\Psi=\int N(x,y)\ dy

In other words, if we want to find an equation for Ψ\Psi, we can either take the integral of MM with respect to xx, or the integral of NN with respect to yy. Both integrals will work, so we should look at MM and NN and then choose whichever function will be easier to integrate.

If we use the first integral, the one with MM, we have to remember that we’re integrating a multivariable function in terms of xx and yy with respect to xx only. Which means that, instead of adding +C+C to account for the constant of integration after we integrate, we’ll have to add +h(y)+h(y) to account for a function in terms of yy.

Similarly, if we use the second integral, the one with NN, we have to remember that we’re integrating a multivariable function in terms of xx and yy with respect to yy only. Which means that, instead of adding +C+C to account for the constant of integration after we integrate, we’ll have to add +h(x)+h(x) to account for a function in terms of xx.

Then it’s just a matter of solving for h(y)h(y) or h(x)h(x), which we’ll do by differentiating the equation for Ψ\Psi with respect to yy if we’re trying to find h(y)h(y), or with respect to xx if we’re trying to find h(x)h(x).

That differentiation process will give us either Ψx\Psi_x with h(x)h\prime(x) or Ψy\Psi_y with h(y)h\prime(y). We’ll substitute M(x,y)M(x,y) for Ψx\Psi_x or N(x,y)N(x,y) for Ψy\Psi_y, and then simplify the equation to solve for h(y)h\prime(y) or h(x)h\prime(x). Then we can integrate both sides of the remaining equation to solve for h(y)h(y) or h(x)h(x).

Finally, we’ll plug h(y)h(y) or h(x)h(x) back into the equation for Ψ\Psi, set the equation equal to cc, and this will be the general or implicit solution to the exact differential equation.

In summary, to find the solution to an exact differential equation, we’ll

  1. Verify that My=NxM_y=N_x to confirm the differential equation is exact.

  2. Use Ψ=M(x,y) dx\Psi=\int M(x,y)\ dx or Ψ=N(x,y) dy\Psi=\int N(x,y)\ dy to find Ψ(x,y)\Psi(x,y), including a value for h(y)h(y) or h(x)h(x).

  3. Set Ψ(x,y)=c\Psi(x,y)=c to get the implicit solution.

 
 

How to solve an exact differential equation


 
Krista King Math Signup.png
 
Differential Equations course.png

Take the course

Want to learn more about Differential Equations? I have a step-by-step course for that. :)

 
 

 
 

Step-by-step solution for finding the solution to the exact differential equation

Example

If the differential equation is exact, find its solution.

x3y4+(x4y3+2y)dydx=0x^3y^4+(x^4y^3+2y)\frac{dy}{dx}=0

First, we’ll test to see whether or not the differential equation is exact. Matching the given equation to the standard form of an exact differential equation, we can say that

M(x,y)=x3y4M(x,y)=x^3y^4

and

N(x,y)=x4y3+2yN(x,y)=x^4y^3+2y

We’ll test to see whether My=NxM_y=N_x.

My=Nx\frac{\partial M}{\partial y}=\frac{\partial N}{\partial x}

4x3y3=4x3y34x^3y^3=4x^3y^3

Exact Differential Equationsl.jpg

Both integrals will work, so we should look at M and N and then choose whichever function will be easier to integrate.

Since My=NxM_y=N_x, we know that the given differential equation is an exact differential equation. Now we just need to find the solution Ψ(x,y)=c\Psi(x,y)=c.

M(x,y)M(x,y) and N(x,y)N(x,y) are equally easy to integrate, we’ll just use M(x,y)M(x,y) and the integral

Ψ=M(x,y) dx\Psi=\int M(x,y)\ dx

Ψ=x3y4 dx\Psi=\int x^3y^4\ dx

Ψ=14x4y4+h(y)\Psi=\frac14x^4y^4+h(y)

We had to add h(y)h(y) instead of just CC because we integrated a multivariable function with respect to xx only, which doesn’t account for the integration of yy. Now we need to find h(y)h(y), which we’ll do by taking the partial derivative of both sides of the equation with respect to yy.

ddyΨ=ddy[14x4y4+h(y)]\frac{d}{dy}\Psi=\frac{d}{dy}\left[\frac14x^4y^4+h(y)\right]

Ψy=x4y3+h(y)\Psi_y=x^4y^3+h\prime(y)

Because we know that Ψy=N(x,y)\Psi_y=N(x,y), we’ll make that substitution and then solve for h(y)h\prime(y).

x4y3+2y=x4y3+h(y)x^4y^3+2y=x^4y^3+h\prime(y)

2y=h(y)2y=h\prime(y)

To find h(y)h(y), we’ll integrate both sides with respect to yy.

2y dy=h(y) dy\int2y\ dy=\int h\prime(y)\ dy

y2+k1=h(y)+k2y^2+k_1=h(y)+k_2

h(y)=y2+k1k2h(y)=y^2+k_1-k_2

h(y)=y2+kh(y)=y^2+k

Plugging this into the equation for Ψ\Psi gives

Ψ=14x4y4+h(y)\Psi=\frac14x^4y^4+h(y)

Ψ=14x4y4+y2+k\Psi=\frac14x^4y^4+y^2+k

Finally, setting Ψ=c\Psi=c to find the solution to the exact differential equation, we get

c=14x4y4+y2+kc=\frac14x^4y^4+y^2+k

ck=14x4y4+y2c-k=\frac14x^4y^4+y^2

c=14x4y4+y2c=\frac14x^4y^4+y^2

We can say that the equation is exact and that its general (implicit) solution is

c=14x4y4+y2c=\frac14x^4y^4+y^2

Sometimes we’ll be given an initial condition and asked to find an explicit solution, instead of a general (implicit) solution. If that’s the case, we just plug the initial condition into the solution to find a value for cc. For example, if the previous example had given the initial condition y(0)=2y(0)=2, our solution would have been

c=14x4y4+y2c=\frac14x^4y^4+y^2

c=14(0)4(2)4+(2)2c=\frac14(0)^4(2)^4+(2)^2

c=4c=4

4=14x4y4+y24=\frac14x^4y^4+y^2

 
Krista King.png
 

Get access to the complete Differential Equations course