Steply

Solve dy/dx = 3x^2 y, y(0) = 4

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

Step by step

The question

Question: solve dy/dx = 3x²y, with y(0) = 4.

dydx = 3x2y

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

y(0) = 4

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

That is a separable equation.

separable: 3x2 × y

1 Separate x and y

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

1y × dydx = 3x2
÷ y both sides

Now multiply both sides by dx.

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

1y dy = 3x2 dx

2 Integrate both sides

Put an integral sign on both sides.

∫ 1y dy = ∫ 3x2 dx

On the left: ln |y|.

On the right: x³.

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

ln |y| = x3 + C

The integral of 1/y is the natural log of the size of y.

∫ 1y dy = ln |y|

3 Solve for y

To undo ln, use e on both sides: e to the ln of the size of y is just |y|.

|y| = e^(x³ + C)

A plus in the power splits into a times: e^(x³ + C) = e^C × e^(x³).

|y| = e^(C) × e^(x³)
e^(a + b) = e^(a) × e^(b)

Careful!

The C is not added at the end.

e^C is a number that multiplies.

Careful: not y = e^(x³) + C ✗

e^C is just some number.

With the ± from |y|, call it A: any number.

y = Ae^(x³)
A = ±e^(C) (any number)

4 Use the starting value

Put in x = 0 and y = 4.

The power is 0 there, and e⁰ = 1.

4 = Ae^(0)

So A = 4.

A = 4

So y = 4e^(x³).

y = 4e^(x³)

5 Check

Let's check with a calculator.

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

x = 1: y ≈ 10.873

The slope between two very close points: about 32.62.

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

The right side at that point: about 32.62.

The same slope.

Right!

right side: 3x²y ≈ 32.62

Let's look back.

First: separate x and y.

Then: integrate both sides.

Then: solve for y.

Then: use the starting value.

Last: check.

Answer
y = 4e^(x³)

Your turn

Try this one yourself, then check:

dydx = 3x2y
Show the answer
y = 2e^(x³)

More from Separable equations

The whole lesson: Separable equations →