Worked examples
The question
Question: solve dy/dx = 2xy.
dydx = 2xy
The right side splits into an x part, 2x, times a y part, y.
That is a separable equation.
separable: 2x × y
1 Separate x and y
Divide both sides by y, so y is only on the left.
1y × dydx = 2x
÷ y both sides
Now multiply both sides by dx.
All the y parts are with dy, all the x parts with dx.
1y dy = 2x 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 2xy.
y = 0 works too (it never changes)
2 Integrate both sides
Put an integral sign on both sides.
∫ 1y dy = ∫ 2x dx
On the left: ln |y|.
On the right: x².
One + C is enough: the two numbers join into one.
ln |y| = x2 + 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.
So y = Ae^(x²).
y = Ae^(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 ≈ 2.718.
A = 1, x = 1: y ≈ 2.718
The slope between two very close points: about 5.44.
slope: y(1.001) − y(0.999)0.002 ≈ 5.44
The right side at that point: about 5.44.
The same slope.
Right!
right side: 2xy ≈ 5.44
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)
▶ Watch it solved
The question
Question: solve dy/dx = x² over y².
dydx = x2y2
The right side splits into an x part, x², times a y part, 1/y².
That is a separable equation.
separable: x2 × 1y2
1 Separate x and y
Multiply both sides by y², so y is only on the left.
y2 × dydx = x2
× y² both sides
Now multiply both sides by dx.
All the y parts are with dy, all the x parts with dx.
y2 dy = x2 dx
2 Integrate both sides
Put an integral sign on both sides.
∫ y2 dy = ∫ x2 dx
On the left: y³ over 3.
On the right: ⅓x³.
One + C is enough: the two numbers join into one.
y33 = 13x3 + C
The power rule backwards, for y.
∫ y2 dy = y33
3 Solve for y
Multiply both sides by 3.
y3 = x3 + 3C
3C is still just some number.
Call it C again.
y3 = x3 + C
3C = a new C
Careful!
The C stays inside the cube root: it is part of y³.
Careful: not y = ∛(x3) + C ✗
Take the cube root: y = ∛(x³ + C).
y = 3√x3 + C
4 Check
Let's check with a calculator.
Take C as 1, any number works.
At x = 1, our answer gives y ≈ 1.26.
C = 1, x = 1: y ≈ 1.26
The slope between two very close points: about 0.63.
slope: y(1.001) − y(0.999)0.002 ≈ 0.63
The right side at that point: about 0.63.
The same slope.
Right!
right side: x²/y² ≈ 0.63
Let's look back.
First: separate x and y.
Then: integrate both sides.
Then: solve for y.
Last: check.
▶ Watch it solved
The question
Question: solve dy/dx = cos xy.
dydx = cos xy
The right side splits into an x part, cos x, times a y part, y.
That is a separable equation.
separable: cos x × y
1 Separate x and y
Divide both sides by y, so y is only on the left.
1y × dydx = cos x
÷ y both sides
Now multiply both sides by dx.
All the y parts are with dy, all the x parts with dx.
1y dy = cos x 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 cos xy.
y = 0 works too (it never changes)
2 Integrate both sides
Put an integral sign on both sides.
∫ 1y dy = ∫ cos x dx
On the left: ln |y|.
On the right: sin x.
One + C is enough: the two numbers join into one.
ln |y| = sin 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^(sin x + C)
A plus in the power splits into a times: e^(sin x + C) = e^C × e^(sin x).
|y| = e^(C) × e^(sin 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^(sin x) + C ✗
e^C is just some number.
With the ± from |y|, call it A: any number.
So y = Ae^(sin x).
y = Ae^(sin 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 ≈ 2.32.
A = 1, x = 1: y ≈ 2.32
The slope between two very close points: about 1.25.
slope: y(1.001) − y(0.999)0.002 ≈ 1.25
The right side at that point: about 1.25.
The same slope.
Right!
right side: cos xy ≈ 1.25
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)
▶ Watch it solved