# Solve the Differential Equation  dy/dx = 2xy - x ?

Dec 21, 2017

$y = A {e}^{{x}^{2}} + \frac{1}{2}$

#### Explanation:

We have:

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

We can factorize the RHS to get

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

Which is separable, so we can "separate the variables" to get:

$\int \setminus \frac{1}{2 y - 1} \setminus \mathrm{dy} = \int \setminus \mathrm{dx}$

So we integrate

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

And we can rearrange:

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