# How to solve xy(dy/dx +1) = x^2 + y^2 by finding the general solution?

## homogeneous differential equations

May 20, 2018

$1 - \frac{y}{x} = B x {e}^{- \frac{y}{x}}$

#### Explanation:

We have:

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

Apply the substitution:

$y = v x \implies \frac{\mathrm{dy}}{\mathrm{dx}} = v + x \frac{\mathrm{dv}}{\mathrm{dx}}$

So that:

$x \left(v x\right) \left(v + x \frac{\mathrm{dv}}{\mathrm{dx}} + 1\right) = {x}^{2} + {\left(v x\right)}^{2}$

$\therefore v \left(v + x \frac{\mathrm{dv}}{\mathrm{dx}} + 1\right) = 1 + {v}^{2}$

$\therefore {v}^{2} + x v \frac{\mathrm{dv}}{\mathrm{dx}} + v = 1 + {v}^{2}$

$\therefore x v \frac{\mathrm{dv}}{\mathrm{dx}} + v = 1$

$\therefore \frac{v}{1 - v} \frac{\mathrm{dv}}{\mathrm{dx}} = \frac{1}{x}$

The is a now a Separable DE, so by "separating the variables" , we get

$\int \setminus \frac{v}{1 - v} \setminus \mathrm{dv} = \int \setminus \frac{1}{x} \setminus \mathrm{dx}$

For the LHS integral we can perform a substitution, Let:

$u = 1 - v \implies \frac{\mathrm{du}}{\mathrm{dx}} = \frac{\mathrm{dv}}{\mathrm{dx}}$ and $v = 1 - u$

Substituting into the integral:

$\int \setminus \frac{v}{1 - v} \setminus \mathrm{dv} = \int \setminus \frac{1 - u}{u} \setminus \mathrm{du}$

$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = \int \setminus \frac{1}{u} - 1 \setminus \mathrm{du}$

$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = \ln u - u$

Restoring the $u$ substitution, and returning to the DE we get:

$\ln \left(1 - v\right) - \left(1 - v\right) = \ln x + C$

$\therefore \ln \left(1 - v\right) - \ln x - \ln A = 1 - v$

$\therefore \ln \left(\frac{1 - v}{A x}\right) = 1 - v$

$\therefore \frac{1 - v}{A x} = {e}^{1 - v}$

$\therefore 1 - v = A x {e}^{1 - v}$

$\therefore 1 - v = B x {e}^{- v}$

And, Restoring the $v$ substitution, we get:

$\therefore 1 - \frac{y}{x} = B x {e}^{- \frac{y}{x}}$