2.2.19.1 Example 1

\begin {align} \frac {dy}{dx} & =\frac {x-y}{x+y}\nonumber \\ \left ( x+y\right ) dy & =\left ( x-y\right ) dx\nonumber \\ xdy+ydy & =\left ( x-y\right ) dx\nonumber \\ ydy & =-xdy+xdx-ydx \tag {1} \end {align}

But RHS is complete differential because\[ -xdy+xdx-ydx=d\left ( \frac {1}{2}x^{2}-xy\right ) \] Hence (1) becomes\[ ydy=d\left ( \frac {1}{2}x^{2}-xy\right ) \] Integrating\begin {align*} \int ydy & =\int d\left ( \frac {1}{2}x^{2}-xy\right ) \\ \frac {1}{2}y^{2} & =\frac {1}{2}x^{2}-xy+c\\ y^{2} & =x^{2}-2xy+2c \end {align*}

Which is an implicit solution. This method works if it is possible by the solver to detect that the ode can be written as complete differentials or not.