Separation of Variables Formula

The Formula

\frac{dy}{dx} = f(x)g(y) \Rightarrow \int \frac{dy}{g(y)} = \int f(x)\,dx + C

When to use: If the rate of change factors into a piece that depends only on x and a piece that depends only on y, you can sort them onto opposite sides of the equation—all the y-stuff on the left, all the x-stuff on the right—then integrate each side in its own variable.

Quick Example

Solve \frac{dy}{dx} = xy.
Separate: \frac{dy}{y} = x\,dx.
Integrate: \ln|y| = \frac{x^2}{2} + C.
Solve: y = Ae^{x^2/2} (where A = \pm e^C).

Notation

\frac{dy}{g(y)} = f(x)\,dx — all y-terms on the left with dy, all x-terms on the right with dx. +C appears on one side only.

What This Formula Means

A method for solving first-order DEs of the form \frac{dy}{dx} = f(x) \cdot g(y): rearrange to \frac{dy}{g(y)} = f(x)\,dx, then integrate both sides.

If the rate of change factors into a piece that depends only on x and a piece that depends only on y, you can sort them onto opposite sides of the equation—all the y-stuff on the left, all the x-stuff on the right—then integrate each side in its own variable.

Formal View

If \frac{dy}{dx} = f(x) \cdot g(y) and g(y) \neq 0, then \int \frac{1}{g(y)}\,dy = \int f(x)\,dx + C. Let G(y) = \int \frac{1}{g(y)}\,dy and F(x) = \int f(x)\,dx; then G(y) = F(x) + C defines y implicitly. Equilibrium solutions: g(y_0) = 0 \implies y = y_0 is a constant solution.

Worked Examples

Example 1

easy
Solve dy/dx = xy with y(0)=2.

Solution

  1. 1
    Separate: dy/y = x\,dx. Integrate: \ln|y| = x^2/2+C.
  2. 2
    y = Ae^{x^2/2}. y(0)=2 \Rightarrow A=2.
  3. 3
    Solution: y = 2e^{x^2/2}.

Answer

y = 2e^{x^2/2}
Separate, integrate both sides, exponentiate, apply IC.

Example 2

hard
Solve the logistic DE dy/dt = y(1-y) with y(0) = 1/2.

Common Mistakes

  • Dividing by g(y) = 0 without checking: if g(y_0) = 0, then y = y_0 is a constant (equilibrium) solution that gets lost when you divide. Always check for equilibrium solutions separately.
  • Forgetting the constant of integration: you need +C on one side (not both—combining two constants gives one). The initial condition determines C.
  • Trying to separate a DE that isn't separable: \frac{dy}{dx} = x + y cannot be written as f(x) \cdot g(y), so this method doesn't apply.

Why This Formula Matters

This is the simplest and most commonly used technique for solving DEs. It handles exponential growth/decay, logistic growth, Newton's law of cooling, and many other standard models. It's usually the first method taught and the first method to try.

Frequently Asked Questions

What is the Separation of Variables formula?

A method for solving first-order DEs of the form \frac{dy}{dx} = f(x) \cdot g(y): rearrange to \frac{dy}{g(y)} = f(x)\,dx, then integrate both sides.

How do you use the Separation of Variables formula?

If the rate of change factors into a piece that depends only on x and a piece that depends only on y, you can sort them onto opposite sides of the equation—all the y-stuff on the left, all the x-stuff on the right—then integrate each side in its own variable.

What do the symbols mean in the Separation of Variables formula?

\frac{dy}{g(y)} = f(x)\,dx — all y-terms on the left with dy, all x-terms on the right with dx. +C appears on one side only.

Why is the Separation of Variables formula important in Math?

This is the simplest and most commonly used technique for solving DEs. It handles exponential growth/decay, logistic growth, Newton's law of cooling, and many other standard models. It's usually the first method taught and the first method to try.

What do students get wrong about Separation of Variables?

After integrating, you often get y defined implicitly (\ln|y| = \ldots). You may need to solve for y explicitly, and don't forget to handle \pm from absolute values.

What should I learn before the Separation of Variables formula?

Before studying the Separation of Variables formula, you should understand: differential equations intro, integral.

Want the Full Guide?

This formula is covered in depth in our complete guide:

How to Integrate Rational Functions: Long Division and Partial Fractions →