Tutorials › Calculus I › Deriving Separation of Variables

Slope Fields and Separable Equations · Tutorial 1360 of 1495

Deriving Separation of Variables

Learn why a separable equation can be rewritten in differential form, and why division is valid only where the dependent-variable factor is nonzero.

Intermediate 9 min read

What You'll Learn

  • Express a separable first-order equation in the form \(dy/g(y)=f(x)\,dx\).
  • State the interval condition required to divide by \(g(y)\).
  • Interpret differential notation through the derivative \(dy/dx\).
  • Use the chain rule to justify why the separated form is useful.
  • Check a separation step by substituting exact values into the original and rearranged equations.
  • Recognize when a zero of \(g\) prevents the division step.

Why Separation Is a Derivation, Not a Trick

A first-order differential equation describes how a function changes. For an equation whose right-hand side factors into an expression in \(x\) and an expression in \(y\), it is natural to try to arrange the \(y\)-dependence on one side and the \(x\)-dependence on the other. This arrangement is called separation of variables.

The rearrangement is useful, but it has a condition: dividing by the factor that depends on \(y\) is valid only where that factor is nonzero. The condition matters because the original equation may still make sense at a value where the factor is zero, even though the divided expression does not.

This tutorial derives the rearrangement and explains its restriction. It does not yet carry out the later step of integrating the separated sides.

Definition: A differential equation \(dy/dx=f(x)g(y)\) is separable on a region where its right-hand side has this product form. Separation means rewriting it as \(dy/g(y)=f(x)\,dx\) on an interval where \(g(y)\ne 0\).

The Algebra Behind the Separated Form

Let \(y=y(x)\) be a differentiable function on an interval \(I\), and suppose it satisfies

$$ \frac{dy}{dx}=f(x)g(y(x)). $$

Here \(f\) is defined for the \(x\)-values under consideration, and \(g\) is defined at the values taken by \(y\). Suppose, in addition, that \(g(y(x))\ne 0\) for every \(x\in I\). Then division by \(g(y(x))\) is valid at each point of the interval:

$$ \frac{1}{g(y(x))}\frac{dy}{dx}=f(x). $$

Writing \(dy/dx\) for the derivative, the expression on the left is commonly recorded in differential notation as \(dy/g(y)\), while the right is recorded as \(f(x)\,dx\). Thus the separated form is

$$ \frac{dy}{g(y)}=f(x)\,dx. $$

This notation is shorthand for a statement about derivatives. It does not require treating \(dy\) and \(dx\) as ordinary numbers that can be independently cancelled. Along the function \(y(x)\), the precise derivative statement represented by the separated form is

$$ \frac{y'(x)}{g(y(x))}=f(x). $$

In particular, the condition \(g(y(x))\ne 0\) is exactly what permits the displayed quotient to be defined. The separated form is not an instruction to divide at values where its denominator vanishes.

Why the Rearrangement Preserves the Differential Equation

The algebraic justification is reversible wherever the denominator is nonzero. Starting from the original equation, division by \(g(y(x))\) gives the separated derivative statement. Conversely, multiplying that statement by \(g(y(x))\) recovers the original equation. So, on an interval where \(g(y(x))\ne 0\), the two statements describe the same derivative condition.

Theorem: Let \(y\) be differentiable on an interval \(I\), and suppose \(g(y(x))\ne 0\) for every \(x\in I\). Then $$ y'(x)=f(x)g(y(x)) $$ holds on \(I\) if and only if $$ \frac{y'(x)}{g(y(x))}=f(x) $$ holds on \(I\).

Proof. If the original equation holds, divide both sides by \(g(y(x))\), which is allowed because it is nonzero. This gives \(y'(x)/g(y(x))=f(x)\). In the reverse direction, multiply both sides of that equality by \(g(y(x))\). The result is \(y'(x)=f(x)g(y(x))\). Both steps are valid at every \(x\in I\) by the stated nonzero condition. This proves the equivalence on \(I\).

The chain rule gives a second way to understand why the separated form is useful. Suppose \(g\) is continuous and nonzero on an interval \(J\) containing the values of \(y\). On \(J\), define an antiderivative \(G\) of \(1/g\), so \(G'(u)=1/g(u)\). If \(y'=fg(y)\), then

$$ \frac{d}{dx}G(y(x)) = G'(y(x))y'(x) = \frac{1}{g(y(x))}f(x)g(y(x)) = f(x). $$

The cancellation in this chain-rule calculation is valid because \(g(y(x))\ne0\). It shows that separation converts the original equation into a derivative involving \(x\) alone. Finding antiderivatives and using this relation to obtain solution formulas are further steps; the derivation here explains why the rearrangement is justified.

Worked Examples of the Rearrangement

Worked Example: A Linear Factor in \(y\)

Consider the equation

$$ \frac{dy}{dx}=(2x+1)(y+3). $$

Here \(f(x)=2x+1\) and \(g(y)=y+3\). The division step requires \(y+3\ne0\), or \(y\ne-3\). On any interval where a solution avoids \(-3\), divide the equation by \(y+3\):

$$ \frac{1}{y+3}\frac{dy}{dx}=2x+1. $$

In differential notation this is

$$ \frac{dy}{y+3}=(2x+1)\,dx. $$

Check the rearrangement at \(x=2\) and \(y=1\). The original right-hand side is \((2\cdot2+1)(1+3)=5\cdot4=20\). The original equation therefore requires \(dy/dx=20\) at that point. The left side of the separated derivative statement is \(20/(1+3)=20/4=5\), while its right side is \(2\cdot2+1=5\). The values agree, so the separated statement is consistent with the original equation at this point. The check uses \(y=1\), for which the denominator \(y+3=4\) is nonzero.

Worked Example: A Trigonometric Factor

Consider

$$ \frac{dy}{dx}=x^2\sin y. $$

Here \(f(x)=x^2\) and \(g(y)=\sin y\). Division by \(g(y)\) requires \(\sin y\ne0\). Since \(\sin y=0\) when \(y=k\pi\) for an integer \(k\), the separation step applies on intervals where \(y\) avoids those values. Dividing where this condition holds gives

$$ \frac{1}{\sin y}\frac{dy}{dx}=x^2, $$

or, in differential notation,

$$ \frac{dy}{\sin y}=x^2\,dx. $$

Check at \(x=1\) and \(y=\pi/2\). The original right-hand side is \(1^2\sin(\pi/2)=1\cdot1=1\), so the derivative must be \(1\). In the separated derivative statement, the left side is \(1/\sin(\pi/2)=1/1=1\), and the right side is \(1^2=1\). The equality checks exactly, and the division is permitted because \(\sin(\pi/2)=1\ne0\).

Worked Example: A Quadratic Factor with Two Excluded Values

Consider

$$ \frac{dy}{dx}=(x-2)(y^2-4). $$

The factor depending on \(y\) is \(g(y)=y^2-4=(y-2)(y+2)\). It vanishes at \(y=2\) and \(y=-2\). Therefore, division by this factor is valid only where \(y\ne2\) and \(y\ne-2\). On an interval where both conditions hold, the rearrangement is

$$ \frac{1}{y^2-4}\frac{dy}{dx}=x-2, $$

or

$$ \frac{dy}{y^2-4}=(x-2)\,dx. $$

For a numerical check, take \(x=3\) and \(y=0\). The original right-hand side is \((3-2)(0^2-4)=1\cdot(-4)=-4\), so \(dy/dx=-4\) there. The left side of the separated derivative statement is \((-4)/(0^2-4)=(-4)/(-4)=1\), and the right side is \(3-2=1\). The two sides match. Also, \(y=0\) is allowed in this division because \(0\) is neither excluded value.

Where the Restriction Comes From

The restriction is not an extra rule added for convenience. It follows directly from the arithmetic of the derivation: division by zero is undefined. If \(g(y(x))=0\) at a point, then the quotient \(y'(x)/g(y(x))\) is not defined there, so the separated derivative statement cannot be obtained at that point by division.

This does not mean that the original differential equation is undefined there. In the original equation, the factor \(g(y(x))\) is multiplied by \(f(x)\), and that product may be perfectly well-defined when \(g(y(x))=0\). The correct conclusion is limited: the division step does not apply at such a point. Any analysis of the original equation at those values must not rely on the divided equation.

When a solution remains in a region where \(g\ne0\), the separation is valid throughout that interval. If a solution reaches a value where \(g=0\), the quotient form is unavailable at that point; one cannot claim that the division established an equivalent equation there. This interval-based statement is the precise scope of the method being derived.

Common Pitfall: Dividing at a Zero

For example, start with

$$ \frac{dy}{dx}=(x+1)(y+3). $$

A careless rearrangement might divide by \(y+3\) and then claim the result applies for every value of \(y\):

$$ \frac{1}{y+3}\frac{dy}{dx}=x+1 \qquad\text{for all }y. $$

This claim is wrong. At \(y=-3\), its left-hand side has denominator \(-3+3=0\), so it is undefined. The original equation, by contrast, has right-hand side \((x+1)(-3+3)=(x+1)\cdot0=0\), which is defined. The correction is to state the condition: the divided form is valid only where \(y+3\ne0\), that is, where \(y\ne-3\). The original equation must be treated separately at values excluded by the division.

Key takeaway: Separation is reversible algebra on intervals where the factor being divided out is nonzero. Always state that restriction before using \(dy/g(y)=f(x)\,dx\).

Check Your Understanding

For each question, focus on the validity and meaning of the separation step, not on finding a solution formula.

  1. For \(dy/dx=(x^2+1)(y-5)\), what condition on \(y\) permits division, and what is the separated differential form?
  2. For \(dy/dx=e^x\cos y\), at which \(y\)-values is division by the \(y\)-factor not permitted?
  3. Explain why \(dy/g(y)=f(x)\,dx\) is shorthand for a derivative statement rather than a license to treat \(dy\) and \(dx\) as ordinary numbers.
  4. Use the chain rule to show why \(dG(y(x))/dx=f(x)\) when \(G'(y)=1/g(y)\) and \(y'=f(x)g(y)\), assuming \(g(y(x))\ne0\).
  5. In the equation \(dy/dx=x(y^2-9)\), identify the \(y\)-values excluded by division and state why the original equation can still be defined at those values.

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon