Steply

Solve dy/dx = 2y^2, y(0) = -1

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

Step by step

The question

Question: solve dy/dx = 2y², with y(0) = −1.

dydx = 2y2

y(0) = −1 is the starting value: when x is 0, y is −1.

y(0) = −1

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

That is a separable equation.

separable: 2 × y2

1 Separate x and y

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

1y2 × dydx = 2
÷ y² both sides

Now multiply both sides by dx.

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

1y2 dy = 2 dx

2 Integrate both sides

Put an integral sign on both sides.

∫ 1y2 dy = ∫ 2 dx

On the left: −1 over y.

On the right: 2x.

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

−1y = 2x + C

The power rule backwards, for y.

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

3 Use the starting value

Put in x = 0 and y = −1.

The x side gives 0.

−1(−1) = 0 + C

So C = 1.

C = 1

4 Solve for y

Multiply both sides by y.

−1 = y(2x + 1)

Careful!

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

Careful: not y = −12x + C ✗

Divide both sides by 2x + 1.

y = −12x + 1

So y = −1/(2x + 1).

y = −12x + 1

5 Check

Let's check with a calculator.

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

x = 1: y ≈ −0.333

The slope between two very close points: about 0.22.

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

The right side at that point: about 0.22.

The same slope.

Right!

right side: 2y² ≈ 0.22

Let's look back.

First: separate x and y.

Then: integrate both sides.

Then: use the starting value.

Then: solve for y.

Last: check.

Answer
y = −12x + 1

Your turn

Try this one yourself, then check:

dydx = y2
Show the answer
y = −44x + 1

More from Separable equations

The whole lesson: Separable equations →