Steply

Solve dy/dx = 2x/y, y(1) = 2

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

Step by step

The question

Question: solve dy/dx = 2x/y, with y(1) = 2.

dydx = 2xy

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

y(1) = 2

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

That is a separable equation.

separable: 2x × 1y

1 Separate x and y

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

y × dydx = 2x
× y both sides

Now multiply both sides by dx.

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

y dy = 2x dx

2 Integrate both sides

Put an integral sign on both sides.

∫ y dy = ∫ 2x dx

On the left: y² over 2.

On the right: x².

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

y22 = x2 + C

The power rule backwards, for y.

∫ y dy = y22

3 Use the starting value

Put in x = 1 and y = 2.

The x side gives 1.

222 = 1 + C

So C = 1.

C = 1

4 Solve for y

Multiply both sides by 2.

y2 = 2x2 + 2

Careful!

The square root of a sum is not the sum of the roots.

It stays as one root.

Careful: not √(2x2 + 2) = 2x + 2 ✗

Take the square root.

y is positive, so we keep the plus root: y = √(2x² + 2).

y = √2x2 + 2

5 Check

Let's check with a calculator.

At x = 0.5, our answer gives y ≈ 1.581.

x = 0.5: y ≈ 1.581

The slope between two very close points: about 0.63.

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

The right side at that point: about 0.63.

The same slope.

Right!

right side: 2x/y ≈ 0.63

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 = √2x2 + 2

Your turn

Try this one yourself, then check:

dydx = 6xy
Show the answer
y = √6x2 + 10

More from Separable equations

The whole lesson: Separable equations →