01 / 21

Separation of
Variables

Learn the essential technique for solving differential equations by isolating \(y\) and \(x\) on opposite sides, then integrating to find the general solution.

AP Calculus AB

What Is a Differential Equation?

A differential equation (DE) is any equation that contains a derivative. It relates a function to its own rate of change. Here is an example:

The goal is to find the function \(y(x)\) that satisfies the equation: not a number, but an entire family of curves.

General vs Particular Solutions

General Solution
Contains an arbitrary constant \(C\). Represents a family of curves, e.g. \(y = Ce^{x^3}\).
Particular Solution
A specific curve found by applying an initial condition to determine \(C\), e.g. \(y(0) = 5\).

A Family of Solution Curves

Each value of \(C\) gives a different curve. Below, \(\frac{dy}{dx} = 2x\) has the general solution \(y = x^2 + C\):

The Core Idea

Separation of variables works when you can rewrite a DE so that all \(y\) terms are on one side and all \(x\) terms are on the other:

Once separated, integrate both sides independently:

When Is a DE Separable?

A first-order DE \(\frac{dy}{dx} = F(x,y)\) is separable if and only if it can be factored as:

✓ Separable
\(\frac{dy}{dx} = x^2 y\) factors as \(f(x)=x^2\) and \(g(y)=y\).
✕ Not Separable
\(\frac{dy}{dx} = x + y\) cannot be factored into \(f(x) \cdot g(y)\).

Separable vs Non-Separable

Equation Separable? Reasoning
\(\frac{dy}{dx} = xy^2\) ✓ Yes \(f(x)=x,\; g(y)=y^2\)
\(\frac{dy}{dx} = e^{x+y}\) ✓ Yes \(e^{x+y} = e^x \cdot e^y\)
\(\frac{dy}{dx} = x^2 + y^2\) ✕ No Sum, not a product
\(\frac{dy}{dx} = \frac{\sin x}{\cos y}\) ✓ Yes \(\sin x \cdot \sec y\)

Step-by-Step Method

1
Identify: confirm the DE can be written as \(\frac{dy}{dx} = f(x) \cdot g(y)\).
2
Separate: move all \(y\) terms (including \(dy\)) to the left, all \(x\) terms (including \(dx\)) to the right: \(\frac{1}{g(y)}\,dy = f(x)\,dx\).
3
Integrate: integrate both sides: \(\int \frac{1}{g(y)}\,dy = \int f(x)\,dx\).
4
Add \(+\,C\): place one constant of integration on one side (not both).
5
Solve for \(y\) (if possible) to express the general solution explicitly.

Example 1: Basic Separation

1
Separate: \(dy = 3x^2\,dx\)
2
Integrate both sides: \(\displaystyle\int dy = \int 3x^2\,dx\)
3
Result: \(y = x^3 + C\)

Example 2: Involving \(y\)

1
Separate: \(y\,dy = x\,dx\)
2
Integrate: \(\displaystyle\int y\,dy = \int x\,dx\)
3
Evaluate: \(\dfrac{y^2}{2} = \dfrac{x^2}{2} + C\)
4
Simplify: \(y^2 = x^2 + K\) where \(K = 2C\)

Example 3: Exponential Growth

1
Separate: \(\dfrac{1}{y}\,dy = k\,dx\) (assuming \(y \neq 0\))
2
Integrate: \(\ln|y| = kx + C_1\)
3
Exponentiate: \(|y| = e^{kx + C_1} = e^{C_1} \cdot e^{kx}\)
4
General solution: \(y = Ce^{kx}\) where \(C = \pm e^{C_1}\)

Example 4: Trigonometric DE

1
Separate: \(\sin y\,dy = \cos x\,dx\)
2
Integrate: \(\displaystyle\int \sin y\,dy = \int \cos x\,dx\)
3
Evaluate: \(-\cos y = \sin x + C\)

Why Only One Constant?

When you integrate both sides you technically get a constant on each side:

Combine them: \(G(y) = F(x) + (C_2 - C_1)\). Since \(C_2 - C_1\) is just another constant, we write a single \(C\):

Writing \(+C\) on only one side is standard: never put a constant on both sides.

Handling \(\ln|y|\) and Absolute Values

When \(\int \frac{1}{y}\,dy = \ln|y|\) appears, follow these steps to clean up:

1
After integrating: \(\ln|y| = F(x) + C_1\)
2
Exponentiate: \(|y| = e^{F(x) + C_1} = e^{C_1} \cdot e^{F(x)}\)
3
Drop absolute value: \(y = \pm e^{C_1} \cdot e^{F(x)}\). Let \(C = \pm e^{C_1}\), so \(y = Ce^{F(x)}\).

Common Mistakes

✕ Forgetting \(+\,C\)
Omitting the constant of integration gives a particular solution, not the general solution the problem asks for.
✕ Constants on Both Sides
Writing \(G(y) + C_1 = F(x) + C_2\) and leaving both. Combine them into one \(C\).
✕ Wrong Separation
Moving \(dx\) or \(dy\) incorrectly, such as leaving \(x\) terms on the \(y\) side. Every \(y\) with \(dy\), every \(x\) with \(dx\).

Summary Table

Step Action Result
1. Check Can we write \(\frac{dy}{dx} = f(x) \cdot g(y)\)? If yes, proceed
2. Separate Move \(y\) terms left, \(x\) terms right \(\frac{1}{g(y)}\,dy = f(x)\,dx\)
3. Integrate Integrate both sides \(G(y) = F(x) + C\)
4. Solve Isolate \(y\) if possible Explicit or implicit form

Question 1 of 5

What is the general solution of \(\dfrac{dy}{dx} = 6x^2\)?

Question 2 of 5

Which of the following DEs is NOT separable?

Question 3 of 5

Solve \(\dfrac{dy}{dx} = \dfrac{2x}{y}\). What is the general solution?

Question 4 of 5

The general solution of \(\dfrac{dy}{dx} = -2y\) is:

Question 5 of 5

After separating \(\dfrac{dy}{dx} = e^{x+y}\), the correct separated form is: