Differential Equations • First-Order Differential Equations

Solving Separable Equations

Learn to split variables apart and integrate each side to solve differential equations.

A changing curve with sigma and variable symbols for differential equations
Inside this lesson 10 sections 5 questions 9 figures

SECTION 1

Historical Context & Motivation

ℹ

Audience & Prerequisites

This lesson is intended for students enrolled in AP Calculus BC or an equivalent advanced course, and for students beginning a college-level Differential Equations course. Separable differential equations are not part of the standard high school mathematics curriculum (Common Core State Standards or typical pre-calculus tracks); they appear only in the AP Calculus BC curriculum as a focused topic, and more extensively in college-level ODE courses. Prerequisite: integral calculus, including familiarity with antiderivatives, the natural logarithm integral (∫ du/u = ln|u| + C), basic substitution, and the relationship between exponentials and logarithms. Students in grades 9–11 who have not yet completed a calculus course should complete integral calculus first before working through this material.

A differential equation is an equation that relates a function to its own derivatives — in other words, it connects how something changes to what that thing actually is. Scientists and mathematicians have been fascinated by these equations for centuries because so many real-world phenomena, from the cooling of a cup of coffee to the growth of a population, are naturally described by the relationship between a quantity and its rate of change.

Among all differential equations, separable equations hold a special place because they are the simplest type to solve. The technique of separating variables was developed during a remarkable period in mathematical history, when calculus itself was brand new. The story begins with the rivalry and genius of two mathematicians who independently invented calculus and immediately started using it to solve these equations.

1687 • Newton's Principia

Isaac Newton publishes his laws of motion, using what he called "fluxions" (an early form of calculus) to describe how objects move. Many of his calculations required solving differential equations, though he did not use that term.

1691 • Leibniz & Separation of Variables

Gottfried Wilhelm Leibniz introduces the notation dy/dx and develops the technique of separating variables, treating dy and dx as objects that can be moved to different sides of an equation. This notation and method remain standard today.

1694 • Johann Bernoulli's Applications

Johann Bernoulli applies separation of variables to solve problems in physics and geometry, including the shape of hanging chains and curves of fastest descent, demonstrating the power of the technique.

1748 • Euler's Systematization

Leonhard Euler organizes the study of differential equations into a formal mathematical discipline, classifying equations by type and providing systematic solution methods — including the separation technique for first-order equations.

The central question these pioneers wrestled with was deceptively simple: if you know how fast something is changing, can you figure out what it is? In modern language, given dy/dx as some expression, can you find y as a function of x? When the expression on the right can be "pulled apart" into a piece that depends only on y and a piece that depends only on x, the equation is separable, and the solution method is elegant and powerful.

SECTION 2

Core Principles & Definitions

Before diving into the solution technique, you need to understand what makes an equation "separable" in the first place. A first-order differential equation involves a function y(x) and its first derivative dy/dx, but no higher derivatives. Among first-order equations, a special subset can be rewritten so that all y-related terms are on one side and all x-related terms are on the other. These are the separable equations, and the method for solving them relies on integration techniques from AP Calculus BC or college-level calculus — specifically antiderivatives, the natural logarithm integral, and the relationship between exponentials and logarithms.

1

Separable Form

A differential equation is separable if it can be written as dy/dx = f(x) · g(y), where one factor depends only on x and the other depends only on y.
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: (1/g(y)) dy = f(x) dx. This is the "separation" that gives the method its name.
3

Integration

Integrate both sides independently: ∫(1/g(y)) dy = ∫f(x) dx + C. The constant of integration C captures the family of solutions.
4

General vs. Particular Solution

The result with C is the general solution. If an initial condition y(x₀) = y₀ is given, you can solve for C to find the particular solution.
✦

KEY TAKEAWAY

Think of a separable equation like a recipe where two cooks each handle their own ingredient. One cook works only with y, the other works only with x, and they never need to touch the other person's ingredient. Separating variables is like sending each cook to their own kitchen: once they are working independently, each side can be integrated on its own.

SECTION 3

Visual Explanation

The Separation Process — Step by Step

Solving a Separable Equation: Flowchartdy/dx = f(x) · g(y)STARTING EQUATIONStep 1SEPARATE VARIABLES(1/g(y)) dy = f(x) dxStep 2INTEGRATE BOTH SIDES∫(1/g(y)) dy = ∫f(x) dx + CStep 3SOLVE FOR y (if possible)y = h(x, C)Step 4APPLY INITIAL CONDITION (if given)y(x₀) = y₀ → find C
This flowchart shows the four-step process for solving a separable equation. You start with the equation in the form dy/dx = f(x) · g(y), separate the variables, integrate both sides, and then apply any initial condition to determine the constant C.

The flowchart above captures the entire solution method. Notice that the key move happens in Step 1: you divide both sides by g(y) and "multiply" both sides by dx. Formally, this uses the chain rule in reverse. If you think of dy/dx as a ratio (which Leibniz's notation encourages), the algebra of moving dy and dx feels natural. After separation, each side becomes a standard integral that you can evaluate using techniques from integral calculus — such as the power rule for integrals, ∫xⁿ dx = xⁿ⁺¹/(n+1) + C, and the natural logarithm integral, ∫du/u = ln|u| + C.

⚠

Watch Out!

When you divide both sides by g(y), you are assuming g(y) ≠ 0. If there is a value of y where g(y) = 0, that value may be a constant solution (also called an equilibrium solution) that you should check separately.

SECTION 4

Mathematical Framework

Let's formalize the method. A first-order ordinary differential equation (ODE) is separable if it can be expressed in a specific product form. Once it is in that form, the algebra and calculus are straightforward.

GENERAL SEPARABLE FORM

dy/dx=f(x)⋅g(y)dy/dx = f(x) · g(y)

f(x) is any function of x alone; g(y) is any function of y alone. The derivative dy/dx equals the product of these two independent functions.

SEPARATED FORM

(1/g(y))dy=f(x)dx(1 / g(y)) dy = f(x) dx

Divide both sides by g(y) and multiply both sides by dx. Now the left side contains only y and dy, and the right side contains only x and dx.

INTEGRATED FORM

∫(1/g(y))dy=∫f(x)dx+C∫ (1 / g(y)) dy = ∫ f(x) dx + C

Integrate each side with respect to its own variable. C is the constant of integration representing the family of all solutions.

Why does this work? The formal justification relies on the chain rule. If H(y) is an antiderivative of 1/g(y), then by the chain rule, dH(y)/dx = (1/g(y)) · (dy/dx). Substituting dy/dx = f(x) · g(y) gives dH(y)/dx = f(x). Integrating both sides with respect to x yields H(y) = ∫f(x) dx + C, which is exactly the result you get by "separating" and integrating. So the informal algebra of moving dy and dx is actually a shortcut for a rigorous chain-rule argument.

APPLYING AN INITIAL CONDITION

y(x0)=y0→substitutetofindCy(x₀) = y₀ → substitute to find C

An initial condition specifies the value of y at a particular x-value. Plug x₀ and y₀ into the general solution and solve for C to obtain the unique particular solution.

SECTION 5

Recognizing Separable Equations

Not every first-order equation is separable. A key skill is learning to recognize when an equation can be written as a product f(x) · g(y). Sometimes you need to factor or rearrange before the separable structure becomes visible. The table below shows several equations, identifies whether they are separable, and explains why.

EquationSeparable?Explanation
dy/dx = x²yYes ✓Already in the form f(x) · g(y) with f(x) = x² and g(y) = y.
dy/dx = (x + y)No ✗The right side is a sum of x and y, not a product of a function of x times a function of y.
dy/dx = eˣ⁺ʸYes ✓Rewrite as eˣ · eʸ using exponent rules. Now f(x) = eˣ and g(y) = eʸ.
dy/dx = sin(x) cos(y)Yes ✓Already separated: f(x) = sin(x) and g(y) = cos(y).
dy/dx = x² + y²No ✗A sum of x² and y² cannot be factored into a product of a function of x times a function of y.
dy/dx = (3x² + 6x) / (y + 1)Yes ✓Written as f(x) · (1/h(y)) where f(x) = 3x² + 6x and h(y) = y + 1. Equivalently, (y + 1) dy = (3x² + 6x) dx.

Examples of separable and non-separable first-order ODEs

Solution Curves for dy/dx = x · yGeneral solution: y = Ceˣ²/² — each curve corresponds to a different CxyC = 3C = 2C = 1C = 0C = −2C = −1C = −3−2−1121−1
Solution curves for the separable equation dy/dx = xy. The general solution is y = Cex²/2. Each colored curve represents a different value of C. Notice that C = 0 gives the constant solution y = 0 (dashed yellow line), which is the equilibrium solution found by setting g(y) = y = 0.

The graph above illustrates a crucial idea: a single separable equation produces a whole family of solution curves, one for each value of C. An initial condition picks out exactly one curve from the family. For instance, the condition y(0) = 2 selects the violet curve (C = 2), while y(0) = −1 selects the orange curve (C = −1).

SECTION 6

Worked Example

Let's solve a complete initial value problem step by step. This example uses the equation dy/dx = 2x(y + 1) with the initial condition y(0) = 3.

Solve: dy/dx = 2x(y + 1), y(0) = 3

  1. 1

    Step 1 — Confirm the Equation Is Separable

    The right-hand side is 2x · (y + 1), which is a product of a function of x alone (f(x) = 2x) and a function of y alone (g(y) = y + 1). This equation is separable.
  2. 2

    Step 2 — Separate the Variables

    Divide both sides by (y + 1) and multiply both sides by dx. This moves all y terms to the left and all x terms to the right:
    dy / (y + 1) = 2x dx
  3. 3

    Step 3 — Integrate Both Sides

    Integrate the left side with respect to y and the right side with respect to x. The left side uses the natural logarithm integral ∫ du/u = ln|u| + C with u = y + 1: ∫ dy/(y + 1) = ln|y + 1|. The right side uses the power rule ∫ 2x dx = x² + C.
    ln|y + 1| = x² + C
  4. 4

    Step 4 — Solve for y

    Exponentiate both sides to remove the natural log: |y + 1| = ex² + C = eC · ex². Let A = ±eC (a nonzero constant), so y + 1 = Aex².
    y = Aex² − 1
  5. 5

    Step 5 — Apply the Initial Condition

    Substitute x = 0 and y = 3 into the general solution: 3 = Ae0 − 1, so 3 = A − 1, giving A = 4.
    y = 4ex² − 1
  6. 6

    Step 6 — Check the Equilibrium Solution

    Setting g(y) = y + 1 = 0 gives y = −1. Substituting y = −1 into the original equation: dy/dx = 2x(−1 + 1) = 0, which is consistent (a constant function has zero derivative). So y = −1 is also a valid solution, but it does not satisfy our initial condition y(0) = 3.
💡

Verification Tip

You can always check your answer by substituting back into the original equation. With y = 4ex² − 1, the derivative is dy/dx = 8xex². The right side is 2x(y + 1) = 2x(4ex²) = 8xex². Both sides match, confirming the solution is correct.

SECTION 7

Strengths & Limitations

Separation of variables is an incredibly useful method, but it is not a universal one. Understanding where it works well and where it falls short will help you choose the right approach for any given differential equation.

StrengthsLimitations
Simple and direct — requires only algebra and integral calculus (antiderivatives, the natural logarithm integral, and exponentiation).Only works when dy/dx can be written as f(x) · g(y); many equations cannot be factored this way.
Produces exact analytical solutions, not approximations.Even when the equation is separable, the resulting integrals may not have closed-form antiderivatives.
Works for many important physical models: exponential growth/decay, Newton's law of cooling, logistic growth.Cannot handle equations where x and y are entangled in sums like dy/dx = x + y (need integrating factors or other methods).
Straightforward to verify: substitute the solution back into the original equation.It is easy to lose equilibrium solutions if you forget to check where g(y) = 0 before dividing.

Comparing the strengths and limitations of the separation of variables technique

✦

KEY TAKEAWAY

Think of separable equations as jigsaw puzzles that happen to split neatly into two independent halves — one half showing a picture made only of x-pieces, the other made only of y-pieces. If the puzzle splits cleanly, you can solve each half on its own. But if x-pieces and y-pieces are interlocked (like in dy/dx = x + y), you need a different strategy.

SECTION 8

Connection to Advanced Methods

Separable equations are the starting point for a family of increasingly powerful solution techniques. As you advance in differential equations, you will encounter equations that are almost separable, or that can be transformed into separable form with a clever substitution. The table below previews how the separable method connects to what comes next.

MethodEquation FormRelationship to Separable
Separation of Variablesdy/dx = f(x) · g(y)This is the base method covered in this lesson.
Integrating Factorsdy/dx + P(x)y = Q(x)Handles linear but non-separable equations by multiplying by a special function that makes the left side an exact derivative.
Substitution (Homogeneous)dy/dx = F(y/x)The substitution v = y/x transforms the equation into a separable one in v and x.
Bernoulli Equationsdy/dx + P(x)y = Q(x)yⁿA substitution w = y¹⁻ⁿ converts this into a linear equation solvable by integrating factors.
Exact EquationsM(x,y) dx + N(x,y) dy = 0A generalization: the equation is already the total differential of some function F(x,y) = C.

How separable equations fit into the broader landscape of first-order ODE methods

The separable technique is not just a beginner's tool — it reappears inside more advanced methods. For example, when you use the substitution v = y/x to solve a homogeneous equation, the resulting equation in v is separable. Mastering separation of variables now gives you a foundation that every future method will build upon.

SECTION 9

Practice Problems

Test your understanding with these five problems, arranged from conceptual to challenging. Try each one on your own before checking the answer.

Question 1: CONCEPTUAL

Explain in your own words why the equation dy/dx = x² + y² is not separable, while dy/dx = x²y² is separable.
Show answer
A separable equation requires the right-hand side to be a product of a function of x alone and a function of y alone. In dy/dx = x²y², the right side factors as (x²)(y²), where f(x) = x² and g(y) = y². Each factor depends on only one variable. In contrast, dy/dx = x² + y² is a sum of two terms — one involving x and one involving y. There is no way to rewrite this sum as a product of a pure x-function and a pure y-function. Since the variables cannot be "pulled apart" into separate factors, the equation is not separable and requires a different solution technique.

Question 2: BASIC CALCULATION

Solve the separable equation dy/dx = 3x²y. Find the general solution.
Show answer
Separate variables: (1/y) dy = 3x² dx. Integrate both sides: ∫(1/y) dy = ∫3x² dx, giving ln|y| = x³ + C. Exponentiate both sides: |y| = ex3+Ce^{x³ + C} = eCe^C · ex3e^{x³}. Letting A = ±eCe^C (a nonzero constant), the general solution is y = Aex3Ae^{x³}. Note that y = 0 is also a solution (the equilibrium solution obtained by setting g(y) = y = 0), which can be included by allowing A = 0. So the complete general solution is y = Aex3Ae^{x³} for any constant A.

Question 3: INTERMEDIATE

Solve the initial value problem: dy/dx = (y² + 1) cos(x), with y(0) = 1.
Show answer
Separate variables: dy/(y² + 1) = cos(x) dx. Integrate both sides: ∫ dy/(y² + 1) = ∫ cos(x) dx, giving arctan(y) = sin(x) + C. Apply the initial condition y(0) = 1: arctan(1) = sin(0) + C, so π/4 = 0 + C, hence C = π/4. The implicit solution is arctan(y) = sin(x) + π/4. Solving for y: y = tan(sin(x) + π/4). This solution is valid as long as sin(x) + π/4 stays between −π/2 and π/2, which constrains the domain. Since g(y) = y² + 1 is never zero, there are no equilibrium solutions to worry about.

Question 4: APPLIED

A cup of coffee cools according to Newton's law of cooling: dT/dt = −k(T − T_room), where T is the coffee temperature, T_room = 20°C is the room temperature, and k > 0 is a constant. If the coffee starts at 90°C and cools to 60°C after 10 minutes, find the temperature as a function of time.
Show answer
Let u = T − 20, so du/dt = dT/dt = −ku. This is separable: (1/u) du = −k dt. Integrating: ln|u| = −kt + C₁, so u = Ae−ktAe^{−kt} where A = ±eC1e^{C₁}. Since T(0) = 90, u(0) = 70, so A = 70 and u = 70e−kt70e^{−kt}, giving T = 20 + 70e−kt70e^{−kt}. Now use T(10) = 60: 60 = 20 + 70e−10k70e^{−10k}, so 40 = 70e−10k70e^{−10k}, hence e−10ke^{−10k} = 4/7, and k = −(1/10) ln(4/7) = (1/10) ln(7/4) ≈ 0.0560. The final answer is T(t) = 20 + 70e−0.056t70e^{−0.056t}. This model predicts the coffee approaches room temperature (20°C) as t → ∞, which makes physical sense.

Question 5: CRITICAL THINKING

Consider the equation dy/dx = y²/³. (a) Use separation of variables to find the general solution. (b) Verify that y = 0 for all x is also a solution. (c) Show that the initial value problem dy/dx = y²/³ with y(0) = 0 has more than one solution. What does this tell you about the uniqueness of solutions to separable equations?
Show answer
(a) Separate: y−2/3y^{−2/3} dy = dx. Integrate: ∫ y−2/3y^{−2/3} dy = ∫ dx gives (y1/3y^{1/3})/(1/3) = x + C, so 3y1/33y^{1/3} = x + C, and y = ((x + C)/3)³. (b) If y = 0 for all x, then dy/dx = 0 and y2/3y^{2/3} = 0, so 0 = 0. The equation is satisfied, confirming y = 0 is a solution. (c) With y(0) = 0, the formula from part (a) gives C = 0, so y = (x/3)³ = x³/27 is one solution. But y = 0 also satisfies the initial condition. In fact, for any a ≥ 0, the function y = 0 for x ≤ a and y = ((x − a)/3)³ for x > a is also a solution. This shows infinitely many solutions exist. This happens because g(y) = y2/3y^{2/3} does not satisfy the Lipschitz condition at y = 0 (its derivative is unbounded there), which is the condition needed to guarantee uniqueness in the existence-uniqueness theorem for ODEs.

SUMMARY

Lesson Summary

Summary

This lesson targets students in AP Calculus BC or equivalent advanced courses who have completed integral calculus. A separable equation is a first-order differential equation that can be written as dy/dx = f(x) · g(y), where the right-hand side is a product of a function of x alone and a function of y alone. The solution method has four core steps: separate the variables by dividing by g(y) and multiplying by dx; integrate both sides independently using integral calculus techniques such as the natural logarithm integral and the power rule; solve for y if possible; and apply any initial condition to determine the constant of integration C.

Always check for equilibrium solutions by finding values of y where g(y) = 0, since these are lost when you divide by g(y). The method produces a family of solution curves parameterized by C, and it applies to many real-world models including exponential growth and decay, Newton's law of cooling, and logistic population models. Separation of variables is the foundation upon which more advanced techniques — such as integrating factors and substitution methods — are built.

Varsity Tutors • Differential Equations • Solving Separable Equations