1 / 10
Chapter 1 · First-Order ODEs

Separable Differential Equations

The Separation of Variables Technique
Dr. Mohamed Mabrok · Qatar University

What is a Separable Equation?

A separable equation is one where we can put all y's on one side and all x's on the other.
Definition
A first-order ODE is separable if it can be written as:
$$\frac{dy}{dx} = f(x) \cdot g(y)$$
Equivalently, we can rewrite this as:
$$\frac{1}{g(y)}\,dy = f(x)\,dx$$
Variables separated! All y terms on the left, all x terms on the right.

Identifying Separable Equations

Separable
$\dfrac{dy}{dx} = xy$ factors as $x \cdot y$
$\dfrac{dy}{dx} = e^{x+y} = e^x \cdot e^y$ product form
$\dfrac{dy}{dx} = \dfrac{x}{y}$ $y\,dy = x\,dx$
$\dfrac{dy}{dx} = \dfrac{x^2}{1+y^2}$ factorable
Not Separable
$\dfrac{dy}{dx} = x + y$ sum, can't factor
$\dfrac{dy}{dx} = \sin(xy)$ mixed argument
$\dfrac{dy}{dx} = x^2 + y^2$ sum of squares
$\dfrac{dy}{dx} = e^{xy}$ mixed exponent
Key test: Can you write the right side as a product of a function of $x$ alone times a function of $y$ alone?

The Separation Technique

Starting from a separable equation, here's the core idea:
$$\frac{dy}{dx} = f(x) \cdot g(y)$$
STEP 1 Divide both sides by $g(y)$ — assuming $g(y) \neq 0$
$$\frac{1}{g(y)} \cdot \frac{dy}{dx} = f(x)$$
STEP 2 Rewrite in differential form
$$\frac{1}{g(y)}\,dy = f(x)\,dx$$
STEP 3 Integrate both sides
$$\int \frac{1}{g(y)}\,dy = \int f(x)\,dx + C$$

Step-by-Step Solution Method

STEP 1
Write in separable form
Rewrite as $\frac{dy}{dx} = f(x) \cdot g(y)$
STEP 2
Separate variables
Get $\frac{1}{g(y)}\,dy = f(x)\,dx$
STEP 3
Integrate both sides
$\int \frac{1}{g(y)}\,dy = \int f(x)\,dx + C$
STEP 4
Solve for $y$ if possible
Otherwise, leave as implicit solution
STEP 5
Apply initial conditions
Use $y(x_0) = y_0$ to find constant $C$
STEP 6
Check equilibrium solutions
Set $g(y)=0$ — these are constant solutions!
Worked Example

Solve: $\dfrac{dy}{dx} = xy$,   $y(0) = 2$

STEPS 1–2 Separate the variables
$$\frac{dy}{dx} = x \cdot y \quad \Longrightarrow \quad \frac{dy}{y} = x\,dx$$
STEP 3 Integrate both sides
$$\int \frac{dy}{y} = \int x\,dx \quad \Longrightarrow \quad \ln|y| = \frac{x^2}{2} + C$$
STEP 4 Solve for $y$
$$|y| = e^{x^2/2 + C} = e^C \cdot e^{x^2/2} \quad \Longrightarrow \quad y = A\,e^{x^2/2}$$
Worked Example (continued)

Applying Initial Condition: $y(0) = 2$

STEP 5 Substitute $x=0$, $y=2$ into the general solution
$$y = A\,e^{x^2/2} \quad \Longrightarrow \quad 2 = A\,e^{0} = A$$
Therefore $A = 2$, giving us the particular solution:
$$\boxed{y = 2\,e^{x^2/2}}$$
Step 6 — Equilibrium Check
Here $g(y) = y$, so $y = 0$ is an equilibrium solution.
Our initial condition $y(0) = 2 \neq 0$, so the equilibrium doesn't apply here.
The solution $y = 2e^{x^2/2}$ is defined for all real $x$ (global existence).

Common Pitfall: Lost Solutions

Critical Warning
When we divide by $g(y)$, we assume $g(y) \neq 0$.
The values where $g(y) = 0$ give equilibrium (constant) solutions that can be lost during separation!
Example: Consider $\dfrac{dy}{dx} = y(1-y)$
What separation gives
$$\int \frac{dy}{y(1-y)} = \int dx$$
General family of logistic curves — but misses the constant solutions!
The lost solutions
Setting $g(y) = y(1-y) = 0$:
$$y = 0 \quad \text{and} \quad y = 1$$
Always check these separately!

Implicit vs. Explicit Solutions

Sometimes we can't solve for $y$ explicitly — and that's perfectly fine.
Explicit Solution
$y$ written directly as a function of $x$
$$y = 2e^{x^2/2}$$
Plug in any $x$ and get $y$ directly.
Implicit Solution
An equation relating $x$ and $y$
$$y^2 + \sin(y) = x^3 + C$$
Can't isolate $y$ — but still a valid solution!
Verification tip: For implicit solutions, use implicit differentiation to verify. Differentiate both sides with respect to $x$, and confirm you recover the original ODE.

Key Takeaways

🎯
Recognize separable form
$\frac{dy}{dx} = f(x) \cdot g(y)$ — the RHS must be a product of a function of $x$ and a function of $y$.
✂️
Separate, then integrate
Move all $y$'s to one side, all $x$'s to the other, and integrate. Don't forget the $+C$!
⚠️
Never lose equilibrium solutions
When dividing by $g(y)$, check $g(y) = 0$ separately. These constant solutions are easy to miss!
Verify your answer
Substitute back into the original ODE. For implicit solutions, use implicit differentiation.
$$\text{Separable} \;\Longrightarrow\; \text{Separate} \;\Longrightarrow\; \text{Integrate} \;\Longrightarrow\; \text{Solve} \;\Longrightarrow\; \text{Verify}$$
🔊 Voice