Steply

Solve dy/dx = (x^2 + 1)y

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

Step by step

The question

Question: solve dy/dx = (x² + 1)y.

dydx = (x2 + 1)y

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

That is a separable equation.

separable: x2 + 1 × y

1 Separate x and y

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

1y × dydx = x2 + 1
÷ y both sides

Now multiply both sides by dx.

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

1y dy = (x2 + 1) dx

We divided by y, so y cannot be 0 here.

But y = 0 is a solution too: its slope is 0, and so is (x² + 1)y.

y = 0 works too (it never changes)

2 Integrate both sides

Put an integral sign on both sides.

∫ 1y dy = ∫ (x2 + 1) dx

On the left: ln |y|.

On the right: ⅓x³ + x.

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

ln |y| = 13x3 + x + 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^(1 over 3x³ + x + C)

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

|y| = e^(C) × e^(1 over 3x³ + 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^(1 over 3x³ + x) + C ✗

e^C is just some number.

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

So y = Ae^(⅓x³ + x).

y = Ae^(1 over 3x³ + x)
A = ±e^(C) (any number)

4 Check

Let's check with a calculator.

Take A as 1, any number works.

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

A = 1, x = 1: y ≈ 3.794

The slope between two very close points: about 7.59.

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

The right side at that point: about 7.59.

The same slope.

Right!

right side: (x² + 1)y ≈ 7.59

Let's look back.

First: separate x and y.

Then: integrate both sides.

Then: solve for y.

Last: check.

Answer
A = ±e^(C) (any number)

Your turn

Try this one yourself, then check:

dydx = (3x2 + 2)y
Show the answer
y = Ae^(x³ + 2x)

More from Separable equations

The whole lesson: Separable equations →