Separation of Variables Formula

Separation of variables are a method for solving first-order DEs of the form dy/dx = f(x) x g(y): rearrange to dy/g(y) = f(x)\,dx, then integrate both.

The Formula

dydx=f(x)g(y)dyg(y)=f(x)dx+C\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 xx and a piece that depends only on yy, you can sort them onto opposite sides of the equation—all the yy-stuff on the left, all the xx-stuff on the right—then integrate each side in its own variable.

Quick Example

Solve dydx=xy\frac{dy}{dx} = xy.
Separate: dyy=xdx\frac{dy}{y} = x\,dx.
Integrate: lny=x22+C\ln|y| = \frac{x^2}{2} + C.
Solve: y=Aex2/2y = Ae^{x^2/2} (where A=±eCA = \pm e^C).

Notation

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

What This Formula Means

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

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

Formal View

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

Worked Examples

Example 1

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

Answer

y=2ex2/2y = 2e^{x^2/2}

First step

1
Separate: dy/y=xdxdy/y = x\,dx. Integrate: lny=x2/2+C\ln|y| = x^2/2+C.

Full solution

  1. 2
    y=Aex2/2y = Ae^{x^2/2}. y(0)=2A=2y(0)=2 \Rightarrow A=2.
  2. 3
    Solution: y=2ex2/2y = 2e^{x^2/2}.
Separate, integrate both sides, exponentiate, apply IC.

Example 2

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

Example 3

easy
Solve dydx=2x\frac{dy}{dx} = 2x with y(0)=5y(0)=5.

Common Mistakes

  • Trying to separate a non-product right side - dydx=x+y\frac{dy}{dx}=x+y won't separate; check it factors as f(x)g(y)f(x)g(y) first.
  • Forgetting the constant of integration - add +C+C after integrating (on one side), then use any initial condition to find it.
  • Mishandling the dydy/dxdx - move dxdx to the right and divide by g(y)g(y) properly; don't drop the differentials.

Why This Formula Matters

It is the first general technique for actually SOLVING a DE in closed form, and it solves the workhorse models — exponential growth/decay dydt=ky\frac{dy}{dt}=ky, logistic growth, Newton's cooling. Recognizing the separable FORM is the deciding step; if the variables won't separate, you need a different method. Recognizing it by "Can I rewrite the DE so one side has only yy and dydy, the other only xx and dxdx?" — rather than by familiar numbers — is what lets a student tell it apart from slope fields and integrating factor method and plain antiderivative in a mixed problem set.

Frequently Asked Questions

What is the Separation of Variables formula?

A method for solving first-order DEs of the form dydx=f(x)g(y)\frac{dy}{dx} = f(x) \cdot g(y): rearrange to dyg(y)=f(x)dx\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 xx and a piece that depends only on yy, you can sort them onto opposite sides of the equation—all the yy-stuff on the left, all the xx-stuff on the right—then integrate each side in its own variable.

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

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

Why is the Separation of Variables formula important in Math?

It is the first general technique for actually SOLVING a DE in closed form, and it solves the workhorse models — exponential growth/decay dydt=ky\frac{dy}{dt}=ky, logistic growth, Newton's cooling. Recognizing the separable FORM is the deciding step; if the variables won't separate, you need a different method. Recognizing it by "Can I rewrite the DE so one side has only yy and dydy, the other only xx and dxdx?" — rather than by familiar numbers — is what lets a student tell it apart from slope fields and integrating factor method and plain antiderivative in a mixed problem set.

What do students get wrong about Separation of Variables?

The procedure for separation of variables is the easy part; the trap is trying to separate a non-product right side. Asking "Can I rewrite the DE so one side has only yy and dydy, the other only xx and dxdx?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

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 →