The given ODE

is exact if
. It so happens that we have
, so it is indeed exact. For such an ODE, we're looking for a solution of the form
, for which the differential is

so we have the following system of PDEs that allow us to solve for
:


In the first PDE, we can integrate both sides with respect to
and recover
:


Then differentiating this with respect to
returns
:



So the general solution to the ODE is

or simply
