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.
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
- Separate:
y dy = x dx. - Integrate both sides (power rule):
y²/2 = x²/2 + C. - Double:
y² = x² + C. (Twice a constant is still a constant, so we call itCagain.) - Use the starting value:
y = 3whenx = 0, so9 = 0 + CandC = 9. The solution isy² = x² + 9. - Find y at x = 4:
y² = 16 + 9 = 25, soy = 5(positive, becauseystarts at3).
Check: y = √(x² + 9) gives dy/dx = x/√(x² + 9) = x/y, and y(0) = 3.
Try it yourself
- Solve
dy/dx = x/ywithy(0) = 5. What isywhenx = 12? - Solve
dy/dx = 2x/ywithy(0) = 1. What isywhenx = 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" treatsdy/dxlike a fraction. It's a shorthand that the chain rule justifies. - Doubling turns
2Cinto a new constant, still writtenC. y² = x² + 9has two branches; becausey(0) = 3is positive, the solution isy = √(x² + 9). The equation itself is undefined wherey = 0.- This course picks up from the Calculus lessons on differential equations, where
dy/dx = 2xwas 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.
Sources
- OpenStax, "Calculus Volume 2, 4.3 Separable Equations": separate the variables, integrate both sides, use the initial condition
- Wolfram MathWorld, "Separation of Variables": the method
- MIT OpenCourseWare, "18.03 Differential Equations (Spring 2010)": lecture notes
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
- Differential equations EP3Springs and oscillation
- Differential equations EP4Damping
- Differential equations EP5What the Laplace transform does