Watch on Instagram

Math Bytes · Differential equations · Episode 1 · First-order equations

Separable equations

A differential equation is separable when you can move every y to one side and every x to the other. For dy/dx = x/y, multiply by y and dx to get y dy = x dx, integrate both sides and double to get y² = x² + C. With y = 3 when x = 0, C = 9, so y² = x² + 9, and at x = 4, y = 5.

Posted · About a 1 minute watch, 3 minute read · Take the quiz

Why you can't just integrate

In the Calculus lessons, an equation like dy/dx = 2x was solved by integrating the right side straight away. But in

dy/dx = x/y

the right side has y in it, and y is the unknown function. You can't integrate x/y with respect to x without already knowing y.

Separate the variables

Multiply both sides by y and by dx:

y dy = x dx

Now all the y's are on the left and all the x's are on the right. An equation you can rearrange like this is called separable. In general, dy/dx = g(x) h(y) is separable: it becomes dy/h(y) = g(x) dx.

Worked example: dy/dx = x/y with y(0) = 3

  1. Separate: y dy = x dx.
  2. Integrate both sides (power rule): y²/2 = x²/2 + C.
  3. Double: y² = x² + C. (Twice a constant is still a constant, so we call it C again.)
  4. Use the starting value: y = 3 when x = 0, so 9 = 0 + C and C = 9. The solution is y² = x² + 9.
  5. Find y at x = 4: y² = 16 + 9 = 25, so y = 5 (positive, because y starts at 3).

Check: y = √(x² + 9) gives dy/dx = x/√(x² + 9) = x/y, and y(0) = 3.

Try it yourself

  1. Solve dy/dx = x/y with y(0) = 5. What is y when x = 12?
  2. Solve dy/dx = 2x/y with y(0) = 1. What is y when x = 2?

(Answers: 1. y² = x² + 25, so y² = 144 + 25 = 169 and y = 13. 2. y dy = 2x dx gives y²/2 = x² + C, so y² = 2x² + C; C = 1, and y² = 8 + 1 = 9, so y = 3.)

Good to know

  • "Multiply by dx" treats dy/dx like a fraction. It's a shorthand that the chain rule justifies.
  • Doubling turns 2C into a new constant, still written C.
  • y² = x² + 9 has two branches; because y(0) = 3 is positive, the solution is y = √(x² + 9). The equation itself is undefined where y = 0.
  • This course picks up from the Calculus lessons on differential equations, where dy/dx = 2x was solved by integrating directly.

Answer to the comment question

dy/dx = 4x/y, and y = 6 when x = 0. What is y when x = 4? y = 10. Separate: y dy = 4x dx. Integrate: y²/2 = 2x² + C, so y² = 4x² + C. With y(0) = 6, C = 36. At x = 4, y² = 64 + 36 = 100, so y = 10 (the positive root, since y starts at 6).

Test your knowledge

Quick quiz: Separable equations

4 multiple-choice questions. Pick one answer for each, then check how you did.

1When is a first-order differential equation separable?
2What does dy/dx = x/y become after separating?
3After integrating y dy = x dx and doubling, what do you get?
4For y² = x² + 9 with y positive, what is y when x = 4?

Sources

Video transcript

How do you solve a differential equation with y tangled in the slope?

Take d y d x equals x over y. With y in there, you can't just integrate.

Multiply both sides by y and d x: y d y equals x d x. All the y's on one side, x's on the other: a separable equation.

Integrate both sides, then double: y squared equals x squared plus a constant, C.

If y is three when x is zero, nine equals C.

At x equals four, y squared is sixteen plus nine, twenty-five, so y is five.

Your turn. d y d x equals four x over y, and y is six when x is zero. What's y when x is four? Comment your answer below!

That's your byte.

More from Differential equations

All Differential equations lessons