
For the ODE to be exact, we require that

, which we'll verify is not the case here.


So we distribute an integrating factor

across both sides of the ODE to get

Now for the ODE to be exact, we require

, which in turn means

Suppose

. Then substituting everything into the PDE above, we have




so that our integrating factor is

. Our ODE is now

Renaming

and

to our current coefficients, we end up with partial derivatives


as desired, so our new ODE is indeed exact.
Next, we're looking for a solution of the form

. By the chain rule, we have

Differentiating with respect to

yields


Thus the solution to the ODE is