I was solving this exact differential equation $$\left(\frac{1}{x}-\frac{y}{x^2+y^2}\right) dx+\left(\frac{x}{x^2+y^2}-\frac{1}{y}\right) dy=0$$ I was confused about the following integration : $$\int \frac{-y}{x^2+y^2}dx=tan^{-1}\left(y/x\right)$$ or does it have to be $$\int \frac{-y}{x^2+y^2}dx=- tan^{-1}\left(x/y\right)$$ the same for the following integration , it can take 2 values, which one is right? $$\int \frac{x}{x^2+y^2}dy=tan^{-1}\left(y/x\right)$$ $$\int \frac{x}{x^2+y^2}dy=-tan^{-1}\left(x/y\right)$$ But I think that $$tan^{-1}\left(y/x\right)\ne -tan^{-1}\left(x/y\right)$$

• Note that :$$tan^{-1}(y/x)+tan^{-1}(x/y)=\frac{\pi}{2}$$ – Khosrotash Sep 26 '17 at 19:10
• $$y(x)=Cx$$ is one solution – Dr. Sonnhard Graubner Sep 26 '17 at 19:10
• You missed $+C$ for indefinite integrals – Math Lover Sep 26 '17 at 19:12
• i see the $$C$$ control the solution and plug them in the equation – Dr. Sonnhard Graubner Sep 26 '17 at 19:15
• @Khosrotash $\frac{\pi}{2} \text{sgn}(x/y)$ – Gribouillis Sep 26 '17 at 19:17

plugging $$y=Cx$$ in your equation we get $$\frac{1}{x}-\frac{Cx}{x^2+(Cx)^2}+\frac{Cx}{x^2+(Cx)^2}-\frac{1}{x}=0$$