Enhancement in solving exact diff equations

There are cases in which a non exact differential equation can be converted into an exact one.

The prinicipal cases are when (dM/dy - dN/dx) / N is a function of x and - (dM/dy - dN/dx)/M is a function of y respectively.

Then multiplying by exp(f(x)) and exp(f(y)) would convert the equation into an exact one.

    from sympy import *
    from sympy.abc import x
    f = Function('f')(x)
    d = Derivative(f,x)
    eq = f / x**2 + ((f*x - 1)/x) * d
    dsolve(d , eq)
    [f(x) == (-sqrt(C1*x**2 + 1) + 1)/x, f(x) == (sqrt(C1*x**2 + 1) + 1)/x]

Note that one of the tests had failed when I had tested it on my laptop

    eq = (x**2 + f(x)**2)*f(x).diff(x) - 2*x*f(x)
    classify_ode(eq, f)

Because this can be converted into an exact form and my primary hint becomes 
'1st_exact' .

Do give suggestions and I shall add tests.