# How do you solve dy/dx = xy^2?

Mar 23, 2018

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

#### Explanation:

Let's separate our variables, IE, have each side of the equation only in terms of one variable. This entails

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

Integrate each side:

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

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

Note that we would technically have constants of integration on both sides, but we moved them all over to the right and absorbed them into $C .$

Now, let's get an explicit solution with $y$ as a function of $x :$

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

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

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

Let's get the fraction out of the denominator. It just looks messy.

y=-1/((x^2+2C)/2

Well, $2 C = C ,$ as $2$ multiplied by a constant just yields another constant.

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

Thus,

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

Mar 23, 2018

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

where $C$ is an arbitrary constant.

#### Explanation:

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

We separate variables:

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

Now we integrate both sides:

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

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

where $C$ is an arbitrary constant of integration.

Now we solve for $y$.

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

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

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

where $C$ absorbed a factor of $2$ since it is an arbitrary constant.