# How to find the general solution of x dy/dx = xy + y ?

May 23, 2018

$y = A x {e}^{x}$, where $A$ is a constant.

#### Explanation:

We do a little bit of algebra before integrating to separate the variables:

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

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

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

$\ln y = \int 1 + \frac{1}{x} \mathrm{dx}$

$\ln y = x + \ln x + C$

$y = A {e}^{x + \ln x}$

$y = A {e}^{x} {e}^{\ln x}$

$y = A x {e}^{x}$

Hopefully this helps!