Separable differential equations for MATH 101 A

This skill appears on:

Lesson

What is a Separable Differential Equation?

A differential equation relates a function to its derivatives. A separable differential equation is one where you can get all the $y$'s on one side and all the $x$'s on the other.

The form: $$\frac{dy}{dx} = f(x) \cdot g(y)$$

or equivalently, something that can be rewritten as:

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

Once separated, you integrate both sides and solve for $y$.


Why "Separable"? The Conceptual Insight

Separable equations describe situations where the rate of change factors into independent influences — one that depends only on the current state ($y$) and one that depends only on position/time ($x$).

Exponential growth: $\dfrac{dy}{dt} = ky$. The rate depends on the current amount, but here's the key insight: the doubling time is constant regardless of how much you start with. A colony of 100 bacteria takes the same time to become 200 as a colony of 1,000,000 takes to become 2,000,000. Time doesn't directly influence the rate — only the current population does.

Newton's Cooling: $\dfrac{dT}{dt} = k(T - T_{\text{room}})$. The cooling rate depends only on the current temperature gap, not directly on time. The room being constant means the only thing that matters is how much hotter the coffee is right now.

What makes something NOT separable? When $x$ and $y$ are entangled in a way that can't be pulled apart. Like $\dfrac{dy}{dx} = x + y$ — here the rate depends on a combination of where you are and what you have, not two independent factors.


Conceptual Check: Is It Separable?

Example 1: Bacteria (Separable)

Scenario: A colony of bacteria grows at a rate proportional to its current size. Whether it's 8am or 8pm, a colony of 1000 bacteria will grow at the same rate.

Does this lead to a separable equation?

Yes! The growth rate depends ONLY on the current population, not on time. A colony of 1000 grows the same way regardless of when you observe it. This gives $\dfrac{dy}{dt} = ky$ — time has no direct influence, so the variables separate naturally.


Example 2: Bacteria with External Addition (Non-Separable)

Scenario: A colony of bacteria grows at a rate proportional to its size, BUT researchers are also adding bacteria to the dish at an increasing rate — they add $t$ bacteria per hour at hour $t$.

Does this lead to a separable equation?

No! This gives $\dfrac{dy}{dt} = ky + t$. You can't factor $ky + t$ into $f(t) \cdot g(y)$ — the population term and time term are added, not multiplied. The influences are entangled.


Example 3: Coffee Cooling (Separable)

Scenario: A cup of coffee cools in a room held at a constant 20°C. The cooling rate depends only on how much hotter the coffee is than the room.

Does this lead to a separable equation?

Yes! The rate $\dfrac{dT}{dt} = k(T - 20)$ depends only on $T$. Time doesn't appear directly. The room being constant means the only thing that matters is the current temperature gap.


Example 4: Coffee in a Changing Room (Non-Separable)

Scenario: A cup of coffee cools in a room whose temperature changes throughout the day — warmer at noon, cooler at night. The cooling rate still depends on the difference between the coffee and room temperatures.

Does this lead to a separable equation?

No! This gives $\dfrac{dT}{dt} = k(T - R(t)) = kT - kR(t)$. Now the rate depends on both $T$ and $t$, and they're added not multiplied. The changing room temperature "entangles" the variables.


The Method for Solving Separable Equations

Step 1: Separate variables — get all $y$ terms (including $dy$) on one side, all $x$ terms (including $dx$) on the other.

Step 2: Integrate both sides.

Step 3: Solve for $y$ (if possible).

Step 4: If given an initial condition, find the constant $C$.


Example 5: With an Initial Condition

Problem: Solve $\dfrac{dy}{dx} = \dfrac{x}{y}$ with $y(0) = 2$.

Step 1: Separate variables

$$y \, dy = x \, dx$$

Step 2: Integrate both sides

$$\int y \, dy = \int x \, dx$$

$$\frac{y^2}{2} = \frac{x^2}{2} + C$$

$$y^2 = x^2 + 2C$$

Let $K = 2C$:

$$y^2 = x^2 + K$$

Step 3: Apply initial condition

$y(0) = 2$ means when $x = 0$, $y = 2$:

$$4 = 0 + K \implies K = 4$$

Step 4: Solve for y

$$y^2 = x^2 + 4$$

$$\boxed{y = \sqrt{x^2 + 4}}$$

(We take the positive root since $y(0) = 2 > 0$.)


Example 6: Exponential Growth/Decay

Problem: Solve $\dfrac{dy}{dx} = ky$ where $k$ is a constant.

Step 1: Separate variables

$$\frac{1}{y} \, dy = k \, dx$$

Step 2: Integrate

$$\ln|y| = kx + C$$

Step 3: Solve for y

$$|y| = e^{kx + C} = e^C \cdot e^{kx}$$

$$\boxed{y = Ae^{kx}}$$

This is the exponential growth/decay model:

  • $k > 0$: exponential growth
  • $k < 0$: exponential decay
Example 7: With Trigonometric Functions

Problem: Solve $\dfrac{dy}{dx} = \dfrac{\cos x}{e^y}$ with $y(0) = 0$.

Step 1: Separate variables

$$e^y \, dy = \cos x \, dx$$

Step 2: Integrate

$$\int e^y \, dy = \int \cos x \, dx$$

$$e^y = \sin x + C$$

Step 3: Apply initial condition

$y(0) = 0$:

$$e^0 = \sin 0 + C$$ $$1 = 0 + C$$ $$C = 1$$

Step 4: Solve for y

$$e^y = \sin x + 1$$

$$\boxed{y = \ln(\sin x + 1)}$$


Example 8: Factoring to Separate

Problem: Solve $\dfrac{dy}{dx} = x + xy$.

Step 1: Factor the right side

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

Step 2: Separate variables

$$\frac{1}{1 + y} \, dy = x \, dx$$

Step 3: Integrate

$$\ln|1 + y| = \frac{x^2}{2} + C$$

Step 4: Solve for y

$$|1 + y| = e^{x^2/2 + C}$$

$$1 + y = Ae^{x^2/2}$$

$$\boxed{y = Ae^{x^2/2} - 1}$$


Example 9: Population Model with Carrying Capacity

Problem: Solve $\dfrac{dP}{dt} = kP(M - P)$ where $k$ and $M$ are constants. (This is the logistic equation.)

Step 1: Separate variables

$$\frac{1}{P(M - P)} \, dP = k \, dt$$

Step 2: Use partial fractions

$$\frac{1}{P(M-P)} = \frac{1}{M}\left(\frac{1}{P} + \frac{1}{M-P}\right)$$

Step 3: Integrate

$$\frac{1}{M}\left(\ln|P| - \ln|M-P|\right) = kt + C$$

$$\ln\left|\frac{P}{M-P}\right| = Mkt + C_1$$

$$\frac{P}{M-P} = Ae^{Mkt}$$

Step 4: Solve for P

After algebraic manipulation:

$$\boxed{P = \frac{MA e^{Mkt}}{1 + Ae^{Mkt}} = \frac{M}{1 + Be^{-Mkt}}}$$

(where $B = 1/A$)


Example 10: Newton's Law of Cooling

Problem: A cup of coffee at 90°C is placed in a room at 20°C. After 5 minutes, it's 60°C. Find the temperature at time $t$.

Newton's Law of Cooling: $\dfrac{dT}{dt} = k(T - T_{\text{room}})$

Step 1: Set up the equation

$$\frac{dT}{dt} = k(T - 20)$$

Step 2: Separate and integrate

$$\frac{1}{T - 20} \, dT = k \, dt$$

$$\ln|T - 20| = kt + C$$

$$T - 20 = Ae^{kt}$$

$$T = 20 + Ae^{kt}$$

Step 3: Apply initial condition $T(0) = 90$

$$90 = 20 + A \implies A = 70$$

$$T = 20 + 70e^{kt}$$

Step 4: Use $T(5) = 60$ to find k

$$60 = 20 + 70e^{5k}$$

$$40 = 70e^{5k}$$

$$e^{5k} = \frac{4}{7}$$

$$k = \frac{1}{5}\ln\left(\frac{4}{7}\right) \approx -0.112$$

$$\boxed{T = 20 + 70e^{-0.112t}}$$


Recognizing Separable Equations

An equation is separable if you can write it as:

  • $\dfrac{dy}{dx} = f(x) \cdot g(y)$ ✓
  • $\dfrac{dy}{dx} = \dfrac{f(x)}{h(y)}$ ✓ (same as above with $g(y) = 1/h(y)$)

Not separable:

  • $\dfrac{dy}{dx} = x + y$ ✗ (can't factor)
  • $\dfrac{dy}{dx} = xy + x^2$ ✗ (can't separate completely)

The Pattern to Remember

Separable = influences are independent (they multiply)

Non-separable = influences are entangled (they add or subtract directly)

When you see a differential equation, ask yourself: "Does the rate depend on separate factors, or are the variables tangled together?"


Common Mistakes and Misunderstandings

❌ Mistake: Forgetting the constant of integration

Wrong: $$\ln|y| = \frac{x^2}{2}$$ $$y = e^{x^2/2}$$

Why it's wrong: When you integrate, you must include $+C$. Without it, you only get one particular solution, not the general solution.

Correct: $$\ln|y| = \frac{x^2}{2} + C$$ $$y = Ae^{x^2/2}$$ where $A = \pm e^C$


❌ Mistake: Dividing by zero without checking

Wrong: Dividing by $y$ without noting that $y = 0$ might be a solution.

Why it's wrong: When you divide by $g(y)$, you're assuming $g(y) \neq 0$. You might lose solutions!

Correct: Check if $g(y) = 0$ gives a constant solution. For $\dfrac{dy}{dx} = xy$, note that $y = 0$ is also a solution (which is included in $y = Ae^{x^2/2}$ when $A = 0$).


❌ Mistake: Wrong sign when solving for y

Wrong: From $y^2 = x^2 + 4$ with $y(0) = 2$, concluding $y = \pm\sqrt{x^2 + 4}$.

Why it's wrong: The initial condition tells you which sign to use. Since $y(0) = 2 > 0$, you need the positive root.

Correct: $y = +\sqrt{x^2 + 4}$ (positive root only).


❌ Mistake: Not factoring before separating

Wrong: Trying to separate $\dfrac{dy}{dx} = x + xy$ without factoring.

Why it's wrong: It looks like $x$ and $y$ are added, not multiplied. But you can factor!

Correct: $\dfrac{dy}{dx} = x(1 + y)$, which is now clearly separable.

Formulas & Reference

Separable Differential Equation Form

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

A differential equation is separable if it can be written as a product of a function of x and a function of y.

Variables:
$f(x)$:
function of x only
$g(y)$:
function of y only

Separation of Variables

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

To solve, separate so all y terms are on one side and all x terms on the other, then integrate both sides.

Variables:
$g(y)$:
function of y (move to left with dy)
$f(x)$:
function of x (stays on right with dx)

Exponential Growth/Decay

$$\frac{dy}{dx} = ky \quad \Rightarrow \quad y = Ae^{kx}$$

The most common separable equation. Solution is exponential: growth if k > 0, decay if k < 0.

Variables:
$k$:
growth/decay constant
$A$:
initial value (when x = 0, y = A)

Newton's Law of Cooling

$$\frac{dT}{dt} = k(T - T_{\text{env}})$$

Temperature change is proportional to the difference between object temperature and environment temperature.

Variables:
$T$:
temperature of object
$T_{env}$:
temperature of environment (constant)
$k$:
cooling constant (negative for cooling)
Courses Using This Skill

This skill is taught in the following courses. Create an account to access practice exercises and full course materials.