Steply

Solve dy/dx = xy^2

Step by step, with the reason for every step · Separable equations · Differential Equations

Step by step

The question

Question: solve dy/dx = xy².

dydx = xy2

The right side splits into an x part, x, times a y part, y².

That is a separable equation.

separable: x × y2

1 Separate x and y

Divide both sides by y², so y is only on the left.

1y2 × dydx = x
÷ y² both sides

Now multiply both sides by dx.

All the y parts are with dy, all the x parts with dx.

1y2 dy = x dx

2 Integrate both sides

Put an integral sign on both sides.

∫ 1y2 dy = ∫ x dx

On the left: −1 over y.

On the right: ½x².

One + C is enough: the two numbers join into one.

−1y = 12x2 + C

The power rule backwards, for y.

∫ y−2 dy = y−1−1 = −1y

3 Solve for y

Multiply both sides by y.

−1 = y(12x2 + C)

Careful!

The C stays inside the bottom: it came with ½x².

Careful: not y = −112x2 + C ✗

Divide both sides by ½x² + C.

y = −112x2 + C

No fraction inside a fraction: times the top and the bottom by 2.

y = −2x2 + 2C

2C is just some number: call it C again.

2C = a new C

So y = −2/(x² + C).

y = −2x2 + C

4 Check

Let's check with a calculator.

Take C as 1, any number works.

At x = 1, our answer gives y ≈ −1.

C = 1, x = 1: y ≈ −1

The slope between two very close points: about 1.

slope: y(1.001) − y(0.999)0.002 ≈ 1

The right side at that point: about 1.

The same slope.

Right!

right side: xy² ≈ 1

Let's look back.

First: separate x and y.

Then: integrate both sides.

Then: solve for y.

Last: check.

Answer
y = −2x2 + C

Your turn

Try this one yourself, then check:

dydx = 6xy2
Show the answer
y = −13x2 + C

More from Separable equations

The whole lesson: Separable equations →