# Inexact differential equation $(x-y)\mathrm{d}x + (x+y)\mathrm{d}y$

I'm having trouble with this equation: $$(x-y)dx + (x+y)dy = 0.$$

How do I find the integrating factor? Since it's a inexact equation, I've tried to do the method of looking for an integrating factor that is only function of $x$ or $y$, but it does not seems to work.

• Can you post that attempt, please? – The Count Apr 20 '17 at 3:04
• The method you describe works for me. – user14972 Apr 20 '17 at 3:16

Hint: You can write it as $\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{y-x}{y+x} = \dfrac{\frac{y}{x} - 1}{\frac{y}{x} + 1}$ then use $u = \frac{y}{x}$.