Exactly the equations you wanted?

"Exact" Ordinary differential equations stem from the Calculus III concept of the Total Differential.
The total differential of a multivariate function (in this case, a function of two variables equal to a constant \( C \))
\[ f(x,y)=C \] is \[ f_x \ dx + f_y \ dy = 0 \]
The total differential of a multivariate function (in this case, a function of two variables equal to a constant \( C \))
\[ f(x,y)=C \] is \[ f_x \ dx + f_y \ dy = 0 \]
Clearly then, it would be great if there were some Differential Equations that could be manipulated into this form and then reversed from the total differential back into the function (giving us the solution we desire!) Unfortunately, not every equation in the general form of
\[ M(x,y) \ dx + N(x,y) \ dy = 0\]
is the total differential of a function. To make sure it is, we need to see if the second mixed partial derivatives are equal. That is, we need to check that \( M_y = N_x \). If this is the case, we're in good shape, because that means the functions \( M(x,y) \) and \( N(x,y) \) are really equal to \( f_x \) and \( f_y \) respectively for some multivariate function \( f(x,y) \). We then integrate each one respective to its 'variable' and piece together \( f(x,y) \) from these fragments. Let's see how it works with a couple of examples.
\[ M(x,y) \ dx + N(x,y) \ dy = 0\]
is the total differential of a function. To make sure it is, we need to see if the second mixed partial derivatives are equal. That is, we need to check that \( M_y = N_x \). If this is the case, we're in good shape, because that means the functions \( M(x,y) \) and \( N(x,y) \) are really equal to \( f_x \) and \( f_y \) respectively for some multivariate function \( f(x,y) \). We then integrate each one respective to its 'variable' and piece together \( f(x,y) \) from these fragments. Let's see how it works with a couple of examples.
Consider the problem: \( 2xy \ dx + x^2 \ dy = 0 \)
Great, this is already in the proper standard form. Identifying \( M(x,y) = 2xy \) and \( N(x,y) = x^2 \), we need to make sure the second mixed partials are equal to proceed. \( M_y = 2x \) and \( N_x = 2x \) so we are good to go! What we need to do now is recover the function that \( M \) and \( N \) are the total differential of. We will do this by integrating. \[ \int 2xy \ dx = x^2y + \phi(y) \] \[ \int x^2 \ dy = x^2y + \lambda(x) \] So what are these functions \( \phi(y) \) and \( \lambda(x) \)? They are the \( +C \) of 'partial integration'. Since \( M(x,y) \) is the partial derivative with respect to \( x \) for some function \( f(x,y) \), any term with just \( y \) variables would have been killed off, and we need to compensate for that. Comparing the two integrated partial derivatives above, we see that they are the same and find that \( f(x,y) = x^2y \). Since it was all equal to zero, the right side becomes a constant \( C \). \[ x^2y = C \] \[ y = \frac{C}{x^2} \] Done! 
Or this one: \( (2xy+1) +(x^2+3y^2) \frac{dy}{dx} = 0 \)
We have to waggle this one around some first. \( (2xy+1) \ dx + (x^2+3y^2) \ dy = 0 \) Identifying \( M(x,y) = 2xy+1 \) and \( N(x,y)=x^2+3y^2 \), we need to make sure the second mixed partials are equal. \( M_y = 2x \) and \( N_x = 2x \) so we're all set. As on the last problem we will integrate to recover \( f(x,y) \). \[ \int 2xy+1 \ dx = x^2y+x + \phi(y) \] \[ \int x^2+3y^2 \ dy = x^2y + y^3 + \lambda(x) \] This time the resulting functions are not the same, but they need to be, and we see that \( \phi(y) = y^3 \) and \( \lambda(x) = x \). So \[ x^2y+x+y^3 = C\] Done! 
Unfortunately, the caveat that the second mixed partial derivatives be equal does not always end up being true. However, since we're all a smart bunch, we can use an 'oracle' function (similar to the one used in the Linear ODE lesson) to figure out an integrating factor.
Brace yourself, math is coming.
Recall that the general form of the total differential set up for these ODEs is
\[ M(x,y) \ dx + N(x,y) \ dy = 0\]
and let's multiply it through by some unknown function \( \phi(x,y) \)
\[ \phi M \ dx + \phi N \ dy = 0 \]
Now, we need to investigate when the second mixed partials of this NEW creation are equal, and that will require some product rule.
Let's set them equal and simplify a bit.
\[ \phi_y M + \phi M_y = \phi_x N + \phi N_x \]
\[ \phi \left[ M_yN_x \right] = \phi_x N  \phi_y M \]
\[ \phi = \phi_x \frac{N}{M_yN_x} + \phi_y \frac{M}{N_xM_y} \]
Now this monster here is a differential equation itself, but it is not an Ordinary Differential Equation, and we don't have the tools in our toolbelt yet to handle such a problem. However, if we make some assumptions we can break it down into two easier problems.
Brace yourself, math is coming.
Recall that the general form of the total differential set up for these ODEs is
\[ M(x,y) \ dx + N(x,y) \ dy = 0\]
and let's multiply it through by some unknown function \( \phi(x,y) \)
\[ \phi M \ dx + \phi N \ dy = 0 \]
Now, we need to investigate when the second mixed partials of this NEW creation are equal, and that will require some product rule.
Let's set them equal and simplify a bit.
\[ \phi_y M + \phi M_y = \phi_x N + \phi N_x \]
\[ \phi \left[ M_yN_x \right] = \phi_x N  \phi_y M \]
\[ \phi = \phi_x \frac{N}{M_yN_x} + \phi_y \frac{M}{N_xM_y} \]
Now this monster here is a differential equation itself, but it is not an Ordinary Differential Equation, and we don't have the tools in our toolbelt yet to handle such a problem. However, if we make some assumptions we can break it down into two easier problems.
Assume \( \phi \) is a function of ONLY \( x \).
Then \( \phi_y = 0 \), making our equation simpler: \[ \phi = \phi_x \frac{N}{M_yN_x} \] But since this IS \( \phi \), there are no \( y \) variables in any of these functions, and we can move things around and integrate. \[ \frac{ \phi_x}{\phi} = \frac{M_yN_x}{N} \] \[ \ln{\phi} = \int \frac{M_yN_x}{N} \ dx \] \[ \phi = e^{ \int \frac{M_yN_x}{N} \ dx} \] We have our integrating factor! THIS WILL ONLY WORK IF \( \frac{M_yN_x}{N} \) IS IN TERMS OF ONE VARIABLE 
OR 
Assume \( \phi \) is a function of ONLY \( y \).
Then \( \phi_y = 0 \), making our equation simpler: \[ \phi = \phi_y \frac{M}{N_xM_y} \] But since this IS \( \phi \), there are no \( x \) variables in any of these functions, and we can move things around and integrate. \[ \frac{ \phi_y}{\phi} = \frac{N_xM_y}{M} \] \[ \ln{\phi} = \int \frac{N_xM_y}{M} \ dy \] \[ \phi = e^{ \int \frac{N_xM_y}{M} \ dy} \] We have our integrating factor! THIS WILL ONLY WORK IF \( \frac{N_xM_y}{M} \) IS IN TERMS OF ONE VARIABLE 
Let's turn a nonexact differential equation to an exact one.
Consider this DE, which looks like it might be "exact"
\[ 2y \ dx + x \ dy = 0 \]
However, investigating the second mixed partial derivatives reveals that it is NOT exact.
\[ M(x,y)=2y \Longrightarrow M_y = 2 \]
\[ N(x,y)=x \Longrightarrow N_x = 1 \]
These had to be equal, and they aren't.
Let's look at the two possible integrating factor candidates.
Consider this DE, which looks like it might be "exact"
\[ 2y \ dx + x \ dy = 0 \]
However, investigating the second mixed partial derivatives reveals that it is NOT exact.
\[ M(x,y)=2y \Longrightarrow M_y = 2 \]
\[ N(x,y)=x \Longrightarrow N_x = 1 \]
These had to be equal, and they aren't.
Let's look at the two possible integrating factor candidates.
\[ \frac{M_yN_x}{N} \]
\[ \frac{21}{x} \] \[ \frac{1}{x} \] This contains only \( x \) variables, so this will work! 
\[ \frac{N_xM_y}{M} \]
\[ \frac{12}{2y} \] \[ \frac{1}{2y} \] This contains only \( y \) variables, so this will work! 
NOTE: It is not always the case that both the integrating factors will work, this just happened to be the case here!
Let's pick \( \frac{1}{x} \) and form the integrating factor.
\[ e^{ \int \frac{1}{x} \ dx} = e^{ \ln{x} } = x \]
That means if we multiply the original problem through by \( x \) it will be exact.
\[ 2xy \ dx + x^2 \ dy = 0 \]
Now it is exact. In fact, you may notice that it is now exactly the same problem from the left example earlier in the lesson!
Keep practicing and good luck!
\[ e^{ \int \frac{1}{x} \ dx} = e^{ \ln{x} } = x \]
That means if we multiply the original problem through by \( x \) it will be exact.
\[ 2xy \ dx + x^2 \ dy = 0 \]
Now it is exact. In fact, you may notice that it is now exactly the same problem from the left example earlier in the lesson!
Keep practicing and good luck!