Steply

Solve dy/dx = -y^2

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

Step by step

The question

Question: solve dy/dx = −y².

dydx = −y2

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

That is a separable equation.

separable: −1 × y2

1 Separate x and y

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

1y2 × dydx = −1
÷ y² both sides

Now multiply both sides by dx.

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

1y2 dy = − dx

2 Integrate both sides

Put an integral sign on both sides.

∫ 1y2 dy = ∫ − dx

On the left: −1 over y.

On the right: −x.

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

−1y = −x + 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(−x + C)

Careful!

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

Careful: not y = −1−x + C ✗

Divide both sides by −x + C.

y = −1−x + C

So y = −1 over (−x + C).

y = −1−x + C

4 Check

Let's check with a calculator.

Take C as 1, any number works.

At x = 0.5, our answer gives y ≈ −2.

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

The slope between two very close points: about −4.

slope: y(0.501) − y(0.499)0.002 ≈ −4

The right side at that point: about −4.

The same slope.

Right!

right side: −y² ≈ −4

Let's look back.

First: separate x and y.

Then: integrate both sides.

Then: solve for y.

Last: check.

Answer
y = −1−x + C

Your turn

Try this one yourself, then check:

dydx = −3y2
Show the answer
y = −1−3x + C

More from Separable equations

The whole lesson: Separable equations →