# What is the general solution of the differential equation (x+y)dx-xdy = 0?

Dec 30, 2016

$y = x \ln | x | + A x$

#### Explanation:

We can write the equation $\left(x + y\right) \mathrm{dx} - x \mathrm{dy} = 0$ as:

$\text{ } x \mathrm{dy} = \left(x + y\right) \mathrm{dx}$
$\therefore \frac{\mathrm{dy}}{\mathrm{dx}} = \frac{x + y}{x}$
$\therefore \frac{\mathrm{dy}}{\mathrm{dx}} = 1 + \frac{y}{x}$

$\therefore \frac{\mathrm{dy}}{\mathrm{dx}} - \frac{1}{x} y = 1$

This is a First Order DE of the form:

$y ' \left(x\right) + P \left(x\right) y = Q \left(x\right)$

Which we know how to solve using an Integrating Factor given by:

$I F = {e}^{\int P \left(x\right) \setminus \mathrm{dx}}$

And so our Integrating Factor is:

$I F = {e}^{\int - \frac{1}{x} \setminus \mathrm{dx}}$
$\setminus \setminus \setminus \setminus = {e}^{- \ln | x |}$
$\setminus \setminus \setminus \setminus = {e}^{\ln | \frac{1}{x} |}$
$\setminus \setminus \setminus \setminus = \frac{1}{x}$

If we multiply by this Integrating Factor we will (by its very design) have the perfect differential of a product:

$\text{ } \frac{\mathrm{dy}}{\mathrm{dx}} - \frac{1}{x} y = 1$

$\therefore \frac{1}{x} \frac{\mathrm{dy}}{\mathrm{dx}} - \frac{1}{x} ^ 2 y = \frac{1}{x}$
$\therefore \setminus \setminus \setminus \setminus \setminus \frac{d}{\mathrm{dx}} \left(\frac{1}{x} y\right) = \frac{1}{x}$

Which is now a separable DE, and we can separate the variables to get:

$\text{ } \frac{y}{x} = \int \setminus \frac{1}{x} \setminus \mathrm{dx}$
$\therefore \frac{y}{x} = \ln | x | + A$ (where $A$ is an arbitrary constant)
$\therefore \setminus \setminus y = x \ln | x | + A x$