First Order ODE/(y over x^2) dx + (y - 1 over x) dy = 0

Theorem
The first order ordinary differential equation:


 * $(1): \quad \dfrac y {x^2} \, \mathrm d x + \left({y - \dfrac 1 x}\right) \, \mathrm d y = 0$

is an exact differential equation with solution:


 * $\dfrac {y^2} 2 - \dfrac y x = C$

Proof
Let $M$ and $N$ be defined as:


 * $M \left({x, y}\right) = \dfrac y {x^2}$
 * $N \left({x, y}\right) = y - \dfrac 1 x$

Then:

Thus $\dfrac {\partial M} {\partial y} = \dfrac {\partial N} {\partial x}$ and $(1)$ is seen by definition to be exact.

By Solution to Exact Differential Equation, the solution to $(1)$ is:
 * $f \left({x, y}\right) = C$

where:

Hence:

and:

Thus:
 * $f \left({x, y}\right) = \dfrac {y^2} 2 - \dfrac y x$

By Solution to Exact Differential Equation, the solution to $(1)$ is:


 * $\dfrac {y^2} 2 - \dfrac y x = C$