Exact ordinary differential equations

We will say that the ODE P(x,y)dx+Q(x,y)dy=0 where P,Q are functions of x and y, it is exact if Py=Qx, where Py indicates the partial derivative of P with respect to y and Qx, the partial derivative of Q with respect to x.

Example

An example of an exact ODE would be:(x3+y3)dx+3xy2dy=0 In effect, calling P(x,y)=(x3+y3),Q(x,y)=3xy2 we have Py=3y2=Qx.

It is necessary to observe that not all the ODEs are exact, for example

Example

y2dx+(x2+xy)dy=0 This is not exact since calling P(x,y)=y2,Q(x,y)=x2+xy, we have Py=2yQx=2x+y.

To solve this type of equations we need to find U(x,y) such that Ux=P and Uy=Q and the solution is given by U(xy,y)=C, where it C is a constant.

To solve this type of equations we will proceed as follows.

We have:Ux(x,y)=P(x,y). We integrate on both sides of the equality with respect to x: Ux(x,y) dx=P(x,y) dxU(x,y)=P(x,y) dx+h(y)

Therefore we have the function we are looking for, except for the fact that we do not know h, a function that only depends on y. To find it, we derive the previous expression with respect to y: Uy(x,y)=ddyP(x,y)dx+h(y) Also, we know that Uy=Q. Therefore equating terms we obtain a diifferentiable equation (that does not depend on x, since the ODE is exact) and we can find h(y).

Once we know h(y) , we add it to the expression of U(x,y) which, equated to a constant, is the solution of our ODE.

Example

Let's solve the ODE (x3+y3)dx+3xy2dy=0 which we know to be exact.

We know that we are looking for a function U(x,y) so that Ux(x,y)=P(x,y). As we have already seen we have: U(x,y)=P(x,y) dx+h(y)=(x3+y3)dx+h(y)=x44+y3x+h(y) where h(y) is a function to be determined that only depends on y. To find this function, let's impose that U is a solution, that is Uy(x,y)=Q(x,y).

Deriving with respect to y we obtain a solution by equating it to a constant: Uy=3y2x+h(y)Uy=Q(x,y)=3xy2}h(y)=0h(y)=C where C is a constant that is not so important since we will also have a constant in the final solution.

And so, the solution to the ODE will be: U(x,y)=x44+xy3=C