What is the general solution of the differential equation  (x^2+y^2)dx+(x^2-xy)dy = 0 ?

Jul 9, 2017

$\frac{y}{x} - 2 \ln \left(\frac{y}{x} + 1\right) = \ln x + C$

Explanation:

We have:

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

We can rearrange this Differential Equation as follows:

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

So Let us try a substitution, Let:

$v = \frac{y}{x} \implies y = v x$

Then:

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

And substituting into the above DE, to eliminate $y$:

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

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

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

This is now a separable DIfferential Equation, and so "separating the variables" gives us:

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

This is now a trivial integration problem, thus:

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

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

And restoring the substitution we get:

$\frac{y}{x} - 2 \ln \left(\frac{y}{x} + 1\right) = \ln x + C$

Jul 9, 2017

See below.

Explanation:

Making the substitution

$y = \lambda x$ we have

$\mathrm{dy} = \lambda \mathrm{dx} + x d \lambda$ then

$\left({x}^{2} + {y}^{2}\right) \mathrm{dx} + \left({x}^{2} - x y\right) \mathrm{dy} \equiv {x}^{2} \left(1 + {\lambda}^{2}\right) \mathrm{dx} + {x}^{2} \left(1 - \lambda\right) \left(\lambda \mathrm{dx} + x \mathrm{dl} a m b \mathrm{da}\right)$ or assuming $x \ne 0$

$\left(1 + {\lambda}^{2} + \lambda \left(1 - \lambda\right)\right) \mathrm{dx} + x \left(1 - \lambda\right) \mathrm{dl} a m b \mathrm{da} = 0$ or

$\left(1 + \lambda\right) \mathrm{dx} + x \left(1 - \lambda\right) \mathrm{dl} a m b \mathrm{da} = 0$ This is a separable differential equation so

$\left(\frac{1 - \lambda}{1 + \lambda}\right) \mathrm{dl} a m b \mathrm{da} = - \frac{\mathrm{dx}}{x}$ and integrating both sides

$2 \log \left(\lambda + 1\right) - \lambda = \log x + C$ or

${\left(\lambda + 1\right)}^{2} / \lambda = {C}_{1} x$ and solving for $\lambda$

$\lambda = \frac{y}{x} = \frac{1}{2} \left({C}_{1} x \pm \sqrt{{C}_{1} x} \sqrt{{C}_{1} x - 4}\right)$ then

$y = \frac{x}{2} \left({C}_{1} x \pm \sqrt{{C}_{1} x} \sqrt{{C}_{1} x - 4}\right)$