AP® Calculus AB · Unit 7 · Topic 7.6

Finding General Solutions Using Separation of Variables

Separation of variables solves a differential equation by sorting all y terms to one side and all x terms to the other, then integrating each side on its own. This works whenever dy/dx equals a function of x times a function of y.

A differential equation mixes y, x, and dy/dx together, which is why you can't just integrate it directly. Separation of variables works when you can rewrite dy/dx as g(x) times h(y), some function of x multiplied by some function of y. Once it's a product like that, you can divide both sides by h(y) and multiply by dx, sending every y (and dy) to the left and every x (and dx) to the right. Now each side is an ordinary integral in one variable, something you already know how to do.

Mechanically: start with dy/dx = g(x) h(y). Divide by h(y) to get dy/h(y) = g(x) dx. Integrate the left side with respect to y and the right side with respect to x, add one constant C (not two, since they combine), then solve for y if possible. If you're given an initial condition like y(0) = y0, plug it in right after integrating to pin down C, before you isolate y. That order matters less for the algebra but saves you from solving twice.

Not every equation splits this way. The right-hand side has to factor cleanly into g(x) h(y). A sum like x + y traps the two variables together with no way to separate them by dividing or multiplying, so separation fails. Products, quotients, and even things like ex+y (which splits into ex times ey) work fine, since multiplication and division are what let you peel variables apart. This topic is the engine behind the rest of the unit: slope fields show what solutions look like, and separation is how you actually find the formula for one.

Key terms

Separable equation
A differential equation whose right-hand side factors into a function of x times a function of y.
Separation of variables
The technique of algebraically sorting all y terms to one side and all x terms to the other before integrating.
General solution
A solution to a differential equation that still contains an arbitrary constant, representing a whole family of curves.
Particular solution
The specific solution obtained after using an initial condition to solve for the constant in the general solution.
Initial condition
A given point, such as y(0) = y0, used to determine the exact constant of integration.

Watch it explained

  1. How it worksHow does separating variables turn one differential equation into two ordinary integrals?
  2. Common mistakeWhy isn't every differential equation separable?
  3. Worked exampleWalk me through solving dy/dx = xy by separation of variables.
  4. Worked exampleFind the general solution of dy/dx = 2x/y.

Check yourself

Your turn1 of 3
Solve dy/dx = xy given y(0) = 4. Find y as a function of x.

End of topic.