Separation of Variables

A differential equation is an equation that relates a function to its own derivatives. Solving a differential equation means finding a function (or family of functions) that satisfies the relationship. One of the most powerful and widely used techniques for solving certain differential equations is called separation of variables, which transforms a single equation involving both a function and its derivative into two independent integrals — one in each variable. Separation of variables applies to a special class called separable differential equations. These are equations of the form dy/dx = f(x)·g(y), where the right-hand side can be written as a product of a function of x alone and a function of y alone. Once the equation is in this form, algebraic manipulation allows all y-terms (including dy) to be moved to one side and all x-terms (including dx) to the other, making each side independently integrable. This technique appears throughout physics, biology, chemistry, and economics. It is used to model radioactive decay, population growth, Newton's law of cooling, and the charging of a capacitor, among many other phenomena. Mastering separation of variables is therefore an essential step toward understanding how mathematics describes change in the natural world.

Key takeaways
  • Recognize the Separable Form
  • Separate the Variables
  • Integrate Both Sides
  • Solve for the Dependent Variable (if possible)
  • Apply an Initial Condition (if given)

Recognize the Separable Form

Check whether the differential equation can be written as dy/dx = f(x)·g(y). For example, dy/dx = 3x²y is separable because f(x) = 3x² and g(y) = y. An equation like dy/dx = x + y is NOT separable because the right side cannot be factored into a pure x-part times a pure y-part.

Separate the Variables

Treat dy/dx as a fraction (this is justified rigorously by differentials). Rearrange so all y-terms are on the left and all x-terms are on the right: (1/g(y)) dy = f(x) dx. For dy/dx = 3x²y, dividing both sides by y (assuming y ≠ 0) and multiplying both sides by dx gives: (1/y) dy = 3x² dx.

Integrate Both Sides

Place an integral sign on each side: ∫(1/y) dy = ∫3x² dx. Evaluate each integral independently. The left side gives ln|y| + C₁ and the right side gives x³ + C₂. Combining the constants (C = C₂ − C₁) yields: ln|y| = x³ + C.

Solve for the Dependent Variable (if possible)

Exponentiate both sides to isolate y: |y| = e^(x³ + C) = e^C · e^(x³). Writing A = ±e^C (absorbing the absolute value) gives the general solution y = Ae^(x³), where A is an arbitrary constant. This is called the general solution because different values of A produce the entire family of solution curves.

Apply an Initial Condition (if given)

A particular solution is found by substituting a known point (x₀, y₀) into the general solution to determine A. For example, if y(0) = 5, then 5 = Ae^(0³) = A·1, so A = 5, giving the particular solution y = 5e^(x³). Always check your answer by differentiating and substituting back into the original equation.

The Key Equation

dydx=f(x) g(y)⟹∫1g(y) dy=∫f(x) dx\frac{dy}{dx} = f(x)\,g(y) \quad\Longrightarrow\quad \int \frac{1}{g(y)}\,dy = \int f(x)\,dx
  • y — dependent variable (varies by application): The unknown function we are solving for; it depends on x.
  • x — independent variable (varies by application): The variable with respect to which we differentiate.
  • f(x) — x-component function (dimensionless (in general)): A function that depends only on x, obtained after factoring the right-hand side.
  • g(y) — y-component function (dimensionless (in general)): A function that depends only on y; assumed non-zero so we can divide by it.
  • C — constant of integration (none): An arbitrary constant that arises when integrating; it is determined by an initial condition.

Worked Example

Problem. Solve the differential equation dy/dx = −ky, where k is a positive constant, subject to the initial condition y(0) = y₀. This equation models radioactive decay and population decline.

y=y0 e−kxy = y_0\,e^{-kx}

Answer. The particular solution is y equals y-naught times e to the power of negative kx.

Figure
Diagram
Solution Curves of dy/dx = -ky (Exponential Decay)xy01234122.5y₀=2.5y₀=2y₀=1y=0All curves satisfy dy/dx = -ky; initial condition fixes y₀
Origins · 1 minGottfried Wilhelm Leibniz and how this was discovered
GW
Gottfried Wilhelm Leibniz
1646–1716 · German

Leibniz independently developed calculus alongside Isaac Newton and introduced the notation dy/dx for derivatives and the integral sign ∫ that we still use today. His differential notation made the algebraic manipulation central to separation of variables — treating dy and dx as separate quantities that can be moved across an equation — both intuitive and rigorous. The technique of separating variables was used extensively in the early development of differential equations during the late 17th century, and Leibniz's notation is precisely why the method looks the way it does in modern textbooks. Leibniz designed a mechanical calculator called the Stepped Reckoner in 1673 that could multiply and divide, not just add and subtract — a significant advance over earlier calculating machines. He believed that all human reasoning could eventually be reduced to calculation.

  • Integration Techniques — Separation of variables requires evaluating two indefinite integrals — one in y and one in x. Fluency with integration by substitution, partial fractions, and standard forms is essential for completing the method.
  • General and Particular Solutions — Separation of variables produces a general solution containing an arbitrary constant C. Understanding how initial conditions select a particular solution from the family is a direct extension of this concept.
  • Exponential Growth and Decay — The most important application of separation of variables is solving dy/dx = ky, whose solution y = Ce^(kx) describes both population growth (k > 0) and radioactive decay (k < 0).
  • Chain Rule — When verifying a solution to a differential equation, the chain rule is frequently needed to differentiate composite functions such as e^(x³) or ln|y|.