# What is the general solution of the differential equation  dy/dx + y = xy^3 ?

Jul 13, 2017

See below.

#### Explanation:

Making the change of variable $y = \frac{1}{z}$ we have the new version

$\frac{\mathrm{dy}}{\mathrm{dx}} + y - x {y}^{3} = 0 \to \frac{x - {z}^{2} + z z '}{z} ^ 3 = 0$ or

$x - {z}^{2} + z z ' = 0$

Now calling $\xi = {z}^{2}$ we have

$x - \xi + \frac{1}{2} \xi ' = 0$

Solving for $\xi$ we obtain easily

$\xi = \frac{1}{2} + x + C {e}^{2 x} = {z}^{2}$ then

$z = \pm \sqrt{\frac{1}{2} + x + C {e}^{2 x}} = \frac{1}{y}$ then finally

$y = \pm \frac{1}{\sqrt{\frac{1}{2} + x + C {e}^{2 x}}}$

Jul 13, 2017

y = +-1/sqrt(x+1/2+ce^(2x)

#### Explanation:

Given: $\frac{\mathrm{dy}}{\mathrm{dx}} + y = x {y}^{3}$

Multiply both sides by ${y}^{-} 3$:

$\frac{\mathrm{dy}}{\mathrm{dx}} {y}^{-} 3 + {y}^{-} 2 = x \text{ [1]}$

Let $u = {y}^{-} 2$, then $\frac{\mathrm{du}}{\mathrm{dx}} = - 2 {y}^{-} 3 \frac{\mathrm{dy}}{\mathrm{dx}}$

Writing the differential in a form that is suitable for substitution into equation [1]:

$- \frac{1}{2} \frac{\mathrm{du}}{\mathrm{dx}} = \frac{\mathrm{dy}}{\mathrm{dx}} {y}^{-} 3$:

Perform the substitutions:

$- \frac{1}{2} \frac{\mathrm{du}}{\mathrm{dx}} + u = x$

Multiply the equation by -2:

$\frac{\mathrm{du}}{\mathrm{dx}} - 2 u = - 2 x \text{ [2]}$

This is the well known form:

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

Where $P \left(x\right) = - 2$

The integrating factor is:

$\mu \left(x\right) = {e}^{\int - 2 \mathrm{dx}}$

$\mu \left(x\right) = {e}^{- 2 x}$

Multiply both sides of equation 2 by $\mu \left(x\right)$:

$\frac{\mathrm{du}}{\mathrm{dx}} {e}^{- 2 x} - 2 {e}^{- 2 x} u = - 2 x {e}^{- 2 x}$

We know that the left side integrates to $\mu \left(x\right) u$, therefore, we need only integrate the right side:

${e}^{- 2 x} u = - 2 \int x {e}^{- 2 x} \mathrm{dx}$

${e}^{- 2 x} u = - 2 \left(x {e}^{- 2 x} / - 2 + \frac{1}{2} \int {e}^{- 2 x} \mathrm{dx}\right)$

${e}^{- 2 x} u = \left(x + \frac{1}{2}\right) {e}^{- 2 x} + C$

$u = x + \frac{1}{2} + c {e}^{2 x}$

Reverse the substitution:

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

y = +-1/sqrt(x+1/2+ce^(2x)

Jul 13, 2017

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

Alternatively:

$y = \pm \frac{\sqrt{2}}{\sqrt{2 x + 1 + C {e}^{- 2 x}}}$

#### Explanation:

We have:

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

This is a Bernoulli equitation which has a standard method to solve. Let:

$u = {y}^{- 2} \implies \frac{\mathrm{du}}{\mathrm{dy}} = - 2 {y}^{- 3}$ and $\frac{\mathrm{dy}}{\mathrm{du}} = - {y}^{3} / 2$

By the chain rule we have;

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\mathrm{dy}}{\mathrm{du}} \cdot \frac{\mathrm{du}}{\mathrm{dx}}$

Substituting into the last DE we get;

$\frac{\mathrm{dy}}{\mathrm{du}} \frac{\mathrm{du}}{\mathrm{dx}} + y = x {y}^{3}$
$\therefore - {y}^{3} / 2 \frac{\mathrm{du}}{\mathrm{dx}} + y = x {y}^{3}$
$\therefore - \frac{\mathrm{du}}{\mathrm{dx}} + \frac{2}{y} ^ 2 = 2 x$
$\therefore - \frac{\mathrm{du}}{\mathrm{dx}} + 2 u = 2 x$
$\therefore \frac{\mathrm{du}}{\mathrm{dx}} - 2 u = - 2 x$

So the substitution has reduced the DE into a first order linear differential equation of the form:

$\frac{d \zeta}{\mathrm{dx}} + P \left(x\right) \zeta = Q \left(x\right)$

We solve this using an Integrating Factor

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

And if we multiply the last by this Integrating Factor, $I$, we will have a perfect product differential;

${e}^{- 2 x} \frac{\mathrm{du}}{\mathrm{dx}} - 2 u {e}^{- 2 x} = - 2 x {e}^{- 2 x}$
$\frac{d}{\mathrm{dx}} \left({e}^{- 2 x} u\right) = - 2 x {e}^{- 2 x}$

Which is now a trivial separable DE, so we can "separate the variables" to get:

${e}^{- 2 x} u = \int \setminus - 2 x {e}^{- 2 x} \setminus \mathrm{dx}$

And integrating by parts (skipped step) gives us:

${e}^{- 2 x} u = \frac{1}{2} \left(2 x + 1\right) {e}^{- 2 x} + c$

Restoring the substitution we get:

${e}^{- 2 x} {y}^{- 2} = \frac{1}{2} \left(2 x + 1\right) {e}^{- 2 x} + c$

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