CALCULUS 1 • DIFFERENTIAL EQUATIONS (INTRO)

General Solutions: Separation of Variables — Finding General Solutions Using Separation of Variables

Learn to solve differential equations by isolating each variable on its own side of the equation.

Historical Context & Motivation

Differential equations — equations that relate a function to its derivative — sit at the heart of nearly every branch of science. They describe how populations grow, how heat spreads through metal, and how planets orbit stars. The challenge has always been: given a differential equation, how do you find the function it describes? One of the earliest and most elegant answers is a technique called separation of variables. This method works by rearranging the equation so that each variable lives on its own side, making integration possible.

1690s
Leibniz & the Bernoullis
Gottfried Wilhelm Leibniz and Johann Bernoulli pioneered the notation dy/dx and began solving simple differential equations by separating variables, treating differentials as manipulable quantities.
1748
Euler's Systematic Approach
Leonhard Euler formalized the method in his textbook Introductio in analysin infinitorum, classifying differential equations by type and showing when separation of variables could be applied.
1822
Fourier's Heat Equation
Joseph Fourier extended separation of variables to partial differential equations while modeling heat conduction, demonstrating the method's enormous versatility in physics.
Today
Modern Applications
Separation of variables remains a foundational technique taught in every calculus and engineering course, applied in fields ranging from biology (population models) to finance (compound interest).

The central question this lesson addresses is straightforward: when you see an equation like dy/dx = f(x) · g(y), how do you systematically find every possible function y(x) that satisfies it? That collection of all possible solutions — one for every value of the arbitrary constant — is called the general solution.

Core Principles & Definitions

Before diving into calculations, you need a solid understanding of the key ideas that make separation of variables work. These four principles form the backbone of the method and will guide every step of your solutions.

1

Separable Equations

A first-order differential equation is separable if it can be written as dy/dx = f(x) · g(y). The right side must factor into a product of a function of x alone and a function of y alone.
2

Separation Step

Rearrange the equation so all y-terms (including dy) are on one side and all x-terms (including dx) are on the other. This gives (1/g(y)) dy = f(x) dx.
3

Integration

Integrate both sides independently: ∫(1/g(y)) dy = ∫f(x) dx. Each integral produces its own expression, and you add a single arbitrary constant C.
4

General Solution

The result — containing the arbitrary constant C — is the general solution. It represents an infinite family of curves, one for each value of C.
KEY TAKEAWAY
Think of separation of variables like sorting laundry: you put all the "y-clothes" in one basket (one side of the equation) and all the "x-clothes" in another basket (the other side). Once everything is sorted, you can "wash" each basket independently — that's the integration step. The arbitrary constant C is like a tag that tells you which specific load you're looking at.

Visual Explanation: The Family of Solution Curves

A general solution isn't a single curve — it's an entire family of curves, one for every value of the constant C. The diagram below shows the general solution to dy/dx = x/y, which is x² + y² = C (a family of circles centered at the origin). Each circle corresponds to a different positive value of C.

Each colored circle represents one particular solution for a specific value of C. Together, the infinite family of circles forms the general solution. An initial condition (a specific point) would "pick out" exactly one circle.

Notice how the circles grow outward as C increases. If someone gave you an initial condition — say, the curve must pass through the point (3, 4) — you could plug those coordinates in and solve for C: 9 + 16 = 25, so C = 25 and the particular solution would be the green circle. But without an initial condition, you report the entire family: x² + y² = C.

Mathematical Framework

Let's formalize the method step by step. Separation of variables applies to any first-order ODE (ordinary differential equation) that can be written in the following form.

SEPARABLE FORM
dy/dx = f(x) · g(y)
f(x) is a function of x only; g(y) is a function of y only. The right side must be a product (or quotient) that factors cleanly.
STEP 1 — SEPARATE
(1 / g(y)) dy = f(x) dx
Divide both sides by g(y) and multiply both sides by dx. Now all y-expressions are on the left and all x-expressions are on the right.
STEP 2 — INTEGRATE
∫ (1 / g(y)) dy = ∫ f(x) dx + C
Integrate each side with respect to its own variable. Only one arbitrary constant C is needed (the two constants from each integral combine into one).
STEP 3 — SOLVE FOR y (IF POSSIBLE)
y = h(x, C)
After integrating, solve algebraically for y in terms of x and C when possible. If you cannot isolate y, the implicit equation is still a valid general solution.
💡 Why only one constant?
When you integrate the left side, you technically get + C₁, and the right side gives + C₂. But C₂ − C₁ is just another constant, so we call it C and put it on one side. Writing two separate constants is not wrong, but it's unnecessary.

Step-by-Step Decision Flowchart

Not every differential equation is separable, and even when one is, it can take a few tries to see the factored form. The flowchart below walks you through the decision process, from recognizing a separable equation to writing the final general solution.

Follow the diamond decision box first: if the equation factors as f(x) · g(y), proceed right through the three steps. If it does not factor, a different technique (such as integrating factors) is needed.

The diamond-shaped decision box is the most important part. If you cannot express the right-hand side of dy/dx = h(x, y) as a product of a function of x and a function of y, then the equation is not separable and you'll need a different method. But when it does factor, the remaining steps are pure algebra and integration — skills you already have.

Worked Example

Let's solve the differential equation dy/dx = 2xy step by step. This is a classic separable equation where f(x) = 2x and g(y) = y.

Find the general solution of dy/dx = 2xy
1
Step 1 — Verify SeparabilityThe right-hand side is 2xy, which equals (2x)(y). Since 2x depends only on x and y depends only on y, this equation is separable.
dy/dx = (2x)(y) ✓ Separable
2
Step 2 — Separate the VariablesDivide both sides by y and multiply both sides by dx. This places all y-terms on the left and all x-terms on the right.
(1/y) dy = 2x dx
3
Step 3 — Integrate Both SidesIntegrate the left side with respect to y and the right side with respect to x. The integral of 1/y is ln|y|, and the integral of 2x is x².
ln|y| = x² + C
4
Step 4 — Solve for yExponentiate both sides to remove the natural log. Recall that e^(ln|y|) = |y|. We write |y| = e^(x² + C) = e^C · e^(x²). Since e^C is just a positive constant, we rename it A (where A ≠ 0). Dropping the absolute value and allowing A to be any nonzero real number gives the general solution.
y = Ae^(x²), where A is an arbitrary nonzero constant
5
Step 5 — Check the SolutionDifferentiate y = Ae^(x²): dy/dx = A · 2x · e^(x²) = 2x · (Ae^(x²)) = 2xy. This matches the original equation, confirming our solution is correct.
dy/dx = 2xy ✓ Verified
⚠️ Note on y = 0
When we divided by y in Step 2, we assumed y ≠ 0. But if y = 0 for all x, then dy/dx = 0 = 2x(0), which is true. So y = 0 is also a solution. We can include it by allowing A = 0 in our general solution, giving y = Ae^(x²) for any real constant A.

Strengths, Limitations & Common Pitfalls

Separation of variables is a powerful technique, but it has clear boundaries. Understanding when it works — and when it doesn't — will save you time and frustration.

Comparison of strengths and limitations of the separation of variables method.
StrengthsLimitations
Straightforward and systematic — the steps are always the same.Only works if the equation can be written as f(x) · g(y). Many equations (e.g., dy/dx = x + y) cannot be separated.
Produces the complete general solution, including all possible particular solutions.The resulting integrals are not always solvable in closed form (you might need numerical methods).
Relies only on algebra and basic integration — no new formulas to memorize.You may lose solutions when dividing by g(y) = 0. Always check separately.
Results are easy to verify by substituting back into the original equation.Solving for y explicitly is not always possible; the general solution may remain implicit.
⚠️ COMMON PITFALL
The most common mistake students make is forgetting to check whether dividing by g(y) excludes valid solutions. Think of it like dividing both sides of an equation by a variable — you must always ask, "What if that variable equals zero?" Whenever you divide by g(y), check whether g(y) = 0 gives a constant solution that your general formula misses.

Connection to Advanced Topics

Separation of variables is your first step into a much larger world. As you move forward in calculus and differential equations, you'll encounter equations that aren't separable and require more sophisticated tools. The table below compares what you've learned today with the methods you'll see next.

Separation of variables vs. integrating factors
FeatureSeparation of VariablesIntegrating Factors (next topic)
Equation typedy/dx = f(x) · g(y)dy/dx + P(x)y = Q(x)
Key ideaMove x and y to opposite sides, then integrateMultiply by a special function to make the left side a product rule
When it worksRight side factors into x-only × y-onlyEquation is first-order linear (y appears only to the first power)
DifficultyIntroductory — uses only algebra and basic integrationIntermediate — requires recognizing the product rule in reverse

Beyond integrating factors, you'll also encounter exact equations, second-order equations, and systems of differential equations. Each requires its own method, but the mindset is the same: manipulate the equation into a form where integration (or another known technique) applies. Mastering separation of variables gives you a solid foundation for all of those.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain in your own words why the general solution of a first-order ODE contains exactly one arbitrary constant. Why not two constants or zero?
PROBLEM 2BASIC CALCULATION
Find the general solution of dy/dx = 3x² using separation of variables.
PROBLEM 3INTERMEDIATE
Find the general solution of dy/dx = y/x (assume x > 0 and y > 0).
PROBLEM 4APPLIED
A bacteria colony grows at a rate proportional to its current population: dP/dt = kP, where P is the population and k is a positive constant. Use separation of variables to find the general solution P(t).
PROBLEM 5CRITICAL THINKING
Consider the equation dy/dx = y². Find the general solution. Then determine: is y = 0 included in your general solution, or is it a separate solution that was lost during the process?

Summary

Separation of variables is a method for solving first-order differential equations of the form dy/dx = f(x) · g(y). The process has three core steps: separate the variables so all y-terms are on one side and all x-terms are on the other; integrate both sides independently; and solve for y (if possible). The result contains one arbitrary constant C and represents a family of curves — the general solution.

Always remember to check for lost solutions caused by dividing by g(y) when g(y) = 0, and verify your answer by substituting back into the original equation. This technique is the foundation for more advanced methods like integrating factors and exact equations that you'll encounter later in your study of differential equations.

Varsity Tutors • Calculus 1 • General Solutions: Separation of Variables