3.3.7.7 Example 7
\begin{align*} \frac {dy}{dx} & =\frac {x+y}{x-y}\\ y\left ( 1\right ) & =0 \end{align*}
Let \(y=ux\) or \(u=\frac {y}{x}\), hence \(\frac {dy}{dx}=x\frac {du}{dx}+u\) and the above ode becomes
\begin{align*} x\frac {du}{dx}+u & =\frac {x+ux}{x-ux}\\ x\frac {du}{dx}+u & =\frac {1+u}{1-u}\\ x\frac {du}{dx} & =\frac {1+u}{1-u}-u\\ x\frac {du}{dx} & =\frac {1+u}{1-u}-\frac {u\left ( 1-u\right ) }{1-u}\\ & =\frac {\left ( 1+u\right ) -u\left ( 1-u\right ) }{\left ( 1-u\right ) }\end{align*}
This is separable.
\begin{align*} \int \frac {\left ( 1-u\right ) }{\left ( 1+u\right ) -u\left ( 1-u\right ) }du & =\int \frac {1}{x}dx\\ \int \frac {u-1}{u^{2}+1}du & =-\int \frac {1}{x}dx\\ \frac {1}{2}\ln \left ( u^{2}+1\right ) -\arctan \left ( u\right ) & =-\ln \left ( x\right ) +c \end{align*}
But \(u=\frac {y}{x}\), hence the above becomes
\[ \frac {1}{2}\ln \left ( \frac {y^{2}}{x^{2}}+1\right ) -\arctan \left ( \frac {y}{x}\right ) =-\ln \left ( x\right ) +c \]
Applying IC
\begin{align*} \frac {1}{2}\ln \left ( 1\right ) -\arctan \left ( 0\right ) & =-\ln \left ( 1\right ) +c\\ c & =0 \end{align*}
Hence the solution becomes
\[ \frac {1}{2}\ln \left ( \frac {y^{2}}{x^{2}}+1\right ) -\arctan \left ( \frac {y}{x}\right ) =-\ln \left ( x\right ) \]