# What is an exact differential equation?

During A levels, we discussed a type of differential equation which we called exact. By this, we meant a differential equation that had its LHS obtainable by differentiating a product. For example the DE $$x^2\cos y\frac{\text{d} y}{\text{d} x}+2x\sin y=\frac{1}{x^2}$$ is exact because we can look at it this way:

$~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~$

thus obtaining $$\frac{\text{d}}{\text{d}x}\left(x^2\sin y\right)=\frac{1}{x^2}$$

which can easily be solved by integrating. However now, in university, we discuss exact equations in the form $$M(x,y)dx+N(x,y)dy=0$$

which are said to be exact if and only if $\forall (x,y)\in\mathbb R^2$: $$\frac{\partial M}{\partial y}(x,y)=\frac{\partial N}{\partial x}(x,y)$$

Is there a correlation between the two? Are they the same thing but I'm not realising it?

We say that an equation as yours is exact if (by definition) there exists a differentiable function $\Phi(x,y)$ such that $$\frac{\partial \Phi}{\partial x}(x,y)=M(x,y)\quad\text{and}\quad\frac{\partial \Phi}{\partial y}(x,y)=N(x,y)$$ on the domain. One can show that if $M$ and $N$ are $C^1$ functions on a simply connected open set (say the whole plane, or an open rectangle, etc), then the equation is exact if and only if $$\frac{\partial M}{\partial y}(x,y)=\frac{\partial N}{\partial x}(x,y)$$ on the domain.