Variable Separable Method
Introduction
The Variable Separable Method is one of the most fundamental techniques for solving first-order differential equations. It works when variables can be separated to opposite sides of the equation.
Definition
A differential equation is called variable separable if it can be written in the form:
$$\boxed{f(x)dx = g(y)dy}$$or equivalently:
$$\boxed{\frac{dy}{dx} = \frac{f(x)}{g(y)}}$$
where $f(x)$ is a function of $x$ only and $g(y)$ is a function of $y$ only.
Standard Form
A first-order DE is variable separable if it can be written as:
$$\boxed{\frac{dy}{dx} = h(x) \cdot k(y)}$$
where $h(x)$ depends only on $x$ and $k(y)$ depends only on $y$.
Separating variables:
$$\frac{dy}{k(y)} = h(x)dx$$Interactive Demo: Solve Variable Separable DEs
Variable Separable DE Solver
Practice identifying variable separable equations
Solve: dy/dx = xy
Step 1: Separate variables: dy/y = x dx
Step 2: Integrate: ∫(1/y)dy = ∫x dx
Step 3: Result: ln|y| = x²/2 + C
Step 4: Solve for y: y = Ae^(x²/2), where A = ±e^C
1. dy/dx = 2xy → Separate: dy/y = 2x dx
2. dy/dx = (1+y²)/x → Separate: dy/(1+y²) = dx/x
3. dy/dx = e^(x+y) → Separate: e^(-y) dy = e^x dx
Solution Method
Step-by-Step Procedure
Step 1: Write the DE in the form $\frac{dy}{dx} = f(x, y)$
Step 2: Separate variables: Collect all $y$ terms with $dy$ and all $x$ terms with $dx$
Step 3: Integrate both sides:
$$\int \frac{dy}{k(y)} = \int h(x)dx$$Step 4: Add constant of integration $C$ (only on one side)
Step 5: Solve for $y$ if possible (or leave in implicit form)
Standard Forms and Solutions
Form 1: Direct Separable
$$\boxed{\frac{dy}{dx} = f(x) \cdot g(y)}$$Solution: $\int \frac{dy}{g(y)} = \int f(x)dx + C$
Form 2: Product Form
$$\boxed{\frac{dy}{dx} = \frac{f(x)}{g(y)}}$$Solution: $\int g(y)dy = \int f(x)dx + C$
Form 3: With Coefficients
$$\boxed{f_1(x)g_1(y)dx + f_2(x)g_2(y)dy = 0}$$Separable if: Can be written as $\frac{f_1(x)}{f_2(x)}dx = -\frac{g_2(y)}{g_1(y)}dy$
Interactive Demo: Visualize Variable Separable Solutions
Plot solution curves for different variable separable differential equations.
Memory Tricks
🎯 Separation Rule
“X with dx, Y with dy”:
- All $x$ terms go with $dx$
- All $y$ terms go with $dy$
- Move across equal sign to separate
🎯 Integration Constant
“One C is enough”:
- Add $C$ on only ONE side (usually right)
- Don’t write $C_1$ and $C_2$ (they combine)
🎯 Recognition Pattern
“If you can say ’times’ between x-part and y-part, it’s separable”:
Example: $\frac{dy}{dx} = x^2 \times y^3$ → Separable ✓
Counter: $\frac{dy}{dx} = x + y$ → NOT separable (it’s addition) ✗
Common Mistakes to Avoid
❌ Mistake 1: Forgetting to Separate Completely
Wrong: $\frac{dy}{dx} = xy$ → $\int dy = \int xy dx$ ✗
Correct: $\frac{dy}{y} = x dx$ → $\int \frac{dy}{y} = \int x dx$ ✓
❌ Mistake 2: Adding C on Both Sides
Wrong: $\int \frac{dy}{y} = \int x dx$ gives $\ln|y| + C_1 = \frac{x^2}{2} + C_2$ ✗
Correct: $\ln|y| = \frac{x^2}{2} + C$ (where $C = C_2 - C_1$) ✓
❌ Mistake 3: Wrong Variable Movement
Wrong: $\frac{dy}{dx} = \frac{x}{y}$ → $y dy = \frac{1}{x} dx$ ✗
Correct: $y dy = x dx$ ✓
❌ Mistake 4: Treating Non-Separable as Separable
Wrong: $\frac{dy}{dx} = x + y$ is separable ✗
Correct: $x + y$ cannot be factored as $f(x) \cdot g(y)$ ✓ (This requires linear DE method)
Solved Examples
Example 1: Basic Separation (JEE Main)
Solve: $\frac{dy}{dx} = xy$
Solution: Separate variables:
$$\frac{dy}{y} = x dx$$Integrate both sides:
$$\int \frac{dy}{y} = \int x dx$$ $$\ln|y| = \frac{x^2}{2} + C_1$$ $$|y| = e^{x^2/2 + C_1} = e^{C_1} \cdot e^{x^2/2}$$Let $C = \pm e^{C_1}$:
$$\boxed{y = Ce^{x^2/2}}$$Example 2: With Initial Condition (JEE Main)
Solve: $\frac{dy}{dx} = \frac{1 + y^2}{1 + x^2}$ with $y(0) = 1$
Solution: Separate variables:
$$\frac{dy}{1 + y^2} = \frac{dx}{1 + x^2}$$Integrate:
$$\int \frac{dy}{1 + y^2} = \int \frac{dx}{1 + x^2}$$ $$\tan^{-1}y = \tan^{-1}x + C$$Using initial condition $y(0) = 1$:
$$\tan^{-1}(1) = \tan^{-1}(0) + C$$ $$\frac{\pi}{4} = 0 + C$$ $$C = \frac{\pi}{4}$$Solution: $\boxed{\tan^{-1}y = \tan^{-1}x + \frac{\pi}{4}}$
or $\boxed{y = \tan\left(\tan^{-1}x + \frac{\pi}{4}\right)}$
Using addition formula: $y = \frac{x + 1}{1 - x}$ (for $|x| < 1$)
Example 3: Exponential Form (JEE Main)
Solve: $\frac{dy}{dx} = e^{x+y}$
Solution: Rewrite: $\frac{dy}{dx} = e^x \cdot e^y$
Separate:
$$\frac{dy}{e^y} = e^x dx$$ $$e^{-y} dy = e^x dx$$Integrate:
$$\int e^{-y} dy = \int e^x dx$$ $$-e^{-y} = e^x + C$$ $$e^{-y} = -e^x - C$$ $$-y = \ln(-e^x - C)$$ $$\boxed{y = -\ln(-e^x - C)}$$or in different form: $\boxed{e^x + e^{-y} + C = 0}$
Example 4: Trigonometric (JEE Advanced)
Solve: $\cos x \cos y dy = \sin x \sin y dx$
Solution: Separate:
$$\frac{\cos y}{\sin y} dy = \frac{\sin x}{\cos x} dx$$ $$\cot y dy = \tan x dx$$Integrate:
$$\int \cot y dy = \int \tan x dx$$ $$\ln|\sin y| = \ln|\sec x| + C_1$$ $$\ln|\sin y| = -\ln|\cos x| + C_1$$ $$\ln|\sin y| + \ln|\cos x| = C_1$$ $$\ln|\sin y \cos x| = C_1$$ $$\boxed{\sin y \cos x = C}$$where $C = \pm e^{C_1}$
Example 5: Rational Function (JEE Advanced)
Solve: $(1 + x^2)\frac{dy}{dx} + (1 + y^2) = 0$
Solution: Rearrange:
$$(1 + x^2)\frac{dy}{dx} = -(1 + y^2)$$ $$\frac{dy}{1 + y^2} = -\frac{dx}{1 + x^2}$$Integrate:
$$\int \frac{dy}{1 + y^2} = -\int \frac{dx}{1 + x^2}$$ $$\tan^{-1}y = -\tan^{-1}x + C$$ $$\boxed{\tan^{-1}y + \tan^{-1}x = C}$$or
$$\boxed{y = \tan(C - \tan^{-1}x)}$$Example 6: With Product (JEE Advanced)
Solve: $xy\frac{dy}{dx} = 1 + x + y + xy$
Solution: Factor RHS:
$$xy\frac{dy}{dx} = (1 + x) + y(1 + x) = (1 + x)(1 + y)$$Separate:
$$\frac{y dy}{1 + y} = \frac{(1 + x)dx}{x}$$ $$\frac{y dy}{1 + y} = \left(1 + \frac{1}{x}\right)dx$$For LHS, write: $\frac{y}{1 + y} = \frac{y + 1 - 1}{1 + y} = 1 - \frac{1}{1 + y}$
$$\int \left(1 - \frac{1}{1 + y}\right)dy = \int \left(1 + \frac{1}{x}\right)dx$$ $$y - \ln|1 + y| = x + \ln|x| + C$$ $$\boxed{y - x - \ln|1 + y| - \ln|x| = C}$$or
$$\boxed{y - x = C + \ln|x(1 + y)|}$$Practice Problems
Level 1: JEE Main Basics
Problem 1.1: Solve $\frac{dy}{dx} = y$.
Solution
$\frac{dy}{y} = dx$
$\int \frac{dy}{y} = \int dx$
$\ln|y| = x + C$
$y = Ae^x$ where $A = \pm e^C$
Problem 1.2: Solve $\frac{dy}{dx} = x^2y$.
Solution
$\frac{dy}{y} = x^2 dx$
$\int \frac{dy}{y} = \int x^2 dx$
$\ln|y| = \frac{x^3}{3} + C$
$y = Ae^{x^3/3}$
Problem 1.3: Solve $\frac{dy}{dx} = \frac{x}{y}$ with $y(0) = 2$.
Solution
$y dy = x dx$
$\int y dy = \int x dx$
$\frac{y^2}{2} = \frac{x^2}{2} + C$
$y^2 = x^2 + 2C$
Using $y(0) = 2$: $4 = 0 + 2C$, so $C = 2$
$y^2 = x^2 + 4$
$y = \sqrt{x^2 + 4}$ (taking positive root since $y(0) = 2 > 0$)
Level 2: JEE Main Advanced
Problem 2.1: Solve $\frac{dy}{dx} = e^{x-y}$.
Solution
$\frac{dy}{dx} = \frac{e^x}{e^y}$
$e^y dy = e^x dx$
$\int e^y dy = \int e^x dx$
$e^y = e^x + C$
$y = \ln(e^x + C)$
Problem 2.2: Solve $(1 + x)\frac{dy}{dx} - xy = 0$ with $y(2) = 3$.
Solution
$(1 + x)\frac{dy}{dx} = xy$
$\frac{dy}{y} = \frac{x dx}{1 + x}$
For RHS: $\frac{x}{1 + x} = \frac{x + 1 - 1}{1 + x} = 1 - \frac{1}{1 + x}$
$\int \frac{dy}{y} = \int \left(1 - \frac{1}{1 + x}\right)dx$
$\ln|y| = x - \ln|1 + x| + C$
Using $y(2) = 3$: $\ln 3 = 2 - \ln 3 + C$
$C = 2\ln 3 - 2$
$\ln y = x - \ln(1 + x) + 2\ln 3 - 2$
$y = \frac{9e^{x-2}}{1 + x}$
Problem 2.3: Solve $\sin x \frac{dy}{dx} + y = 0$ with $y\left(\frac{\pi}{2}\right) = 1$.
Solution
$\sin x \frac{dy}{dx} = -y$
$\frac{dy}{y} = -\frac{dx}{\sin x}$
$\int \frac{dy}{y} = -\int \csc x dx$
$\ln|y| = -(-\ln|\csc x + \cot x|) + C$
$\ln|y| = \ln|\csc x + \cot x| + C$
Using $y(\pi/2) = 1$: $\ln 1 = \ln|1 + 0| + C$, so $C = 0$
$\ln y = \ln(\csc x + \cot x)$
$y = \csc x + \cot x$
Level 3: JEE Advanced
Problem 3.1: Solve $\frac{dy}{dx} = \frac{y(y^2 - 1)}{x(x^2 - 1)}$.
Solution
$\frac{dy}{y(y^2 - 1)} = \frac{dx}{x(x^2 - 1)}$
Use partial fractions on both sides:
$\frac{1}{y(y^2-1)} = \frac{1}{y(y-1)(y+1)}$
Using partial fractions: $\frac{A}{y} + \frac{B}{y-1} + \frac{C}{y+1}$
$1 = A(y-1)(y+1) + By(y+1) + Cy(y-1)$
Solving: $A = -1, B = 1/2, C = 1/2$
Similarly for $x$ side.
$\int \left(-\frac{1}{y} + \frac{1/2}{y-1} + \frac{1/2}{y+1}\right)dy = \int \left(-\frac{1}{x} + \frac{1/2}{x-1} + \frac{1/2}{x+1}\right)dx$
$-\ln|y| + \frac{1}{2}\ln|y-1| + \frac{1}{2}\ln|y+1| = -\ln|x| + \frac{1}{2}\ln|x-1| + \frac{1}{2}\ln|x+1| + C$
$\ln\left|\frac{(y-1)(y+1)}{y^2}\right|^{1/2} = \ln\left|\frac{(x-1)(x+1)}{x^2}\right|^{1/2} + C$
$\frac{y^2-1}{y^2} = K \cdot \frac{x^2-1}{x^2}$ where $K = e^{2C}$
Problem 3.2: Solve $\frac{dy}{dx} + \frac{y}{x} = \frac{y^2}{x^2}$.
Solution
This looks like Bernoulli, but let’s try separation:
$\frac{dy}{dx} = \frac{y^2}{x^2} - \frac{y}{x}$
$\frac{dy}{dx} = \frac{y^2 - xy}{x^2}$
$\frac{dy}{y^2 - xy} = \frac{dx}{x^2}$
Factor LHS: $\frac{dy}{y(y - x)} = \frac{dx}{x^2}$
This is NOT separable as written. This requires substitution method (Bernoulli equation).
Actually, rewrite: $\frac{dy}{dx} = \frac{y}{x}\left(\frac{y}{x} - 1\right)$
Let $v = y/x$, so $y = vx$ and $\frac{dy}{dx} = v + x\frac{dv}{dx}$
$v + x\frac{dv}{dx} = v(v - 1)$
$x\frac{dv}{dx} = v^2 - 2v$
$\frac{dv}{v(v-2)} = \frac{dx}{x}$
Now it’s separable!
$\frac{1}{v(v-2)} = \frac{A}{v} + \frac{B}{v-2}$
$1 = A(v-2) + Bv$
$A = -1/2, B = 1/2$
$\int \left(-\frac{1/2}{v} + \frac{1/2}{v-2}\right)dv = \int \frac{dx}{x}$
$-\frac{1}{2}\ln|v| + \frac{1}{2}\ln|v-2| = \ln|x| + C$
$\ln\left|\frac{v-2}{v}\right|^{1/2} = \ln|x| + C$
$\frac{v-2}{v} = Kx^2$
$\frac{y/x - 2}{y/x} = Kx^2$
$\frac{y - 2x}{y} = Kx^2$
$y - 2x = Kx^2y$
$y(1 - Kx^2) = 2x$
$y = \frac{2x}{1 - Kx^2}$
Problem 3.3: Find the curve for which the slope at any point equals the ratio of ordinate to abscissa, and which passes through $(1, 2)$.
Solution
Slope = $\frac{dy}{dx}$, ordinate = $y$, abscissa = $x$
$\frac{dy}{dx} = \frac{y}{x}$
Separate: $\frac{dy}{y} = \frac{dx}{x}$
$\int \frac{dy}{y} = \int \frac{dx}{x}$
$\ln|y| = \ln|x| + C$
$\ln|y| - \ln|x| = C$
$\ln\left|\frac{y}{x}\right| = C$
$\frac{y}{x} = A$ where $A = e^C$
Using $(1, 2)$: $\frac{2}{1} = A$, so $A = 2$
Curve: $y = 2x$
Recognition of Variable Separable DEs
A DE $\frac{dy}{dx} = f(x, y)$ is variable separable if:
Direct Check: Can be written as $\frac{dy}{dx} = g(x) \cdot h(y)$
Factor Test: RHS can be factored into product of $x$-function and $y$-function
Examples:
- $\frac{dy}{dx} = xy$ ✓ (product form)
- $\frac{dy}{dx} = x^2y^3$ ✓ (product form)
- $\frac{dy}{dx} = e^{x+y} = e^x \cdot e^y$ ✓ (can be factored)
- $\frac{dy}{dx} = x + y$ ✗ (sum, not product)
- $\frac{dy}{dx} = \sin(xy)$ ✗ (cannot separate)
Important Integration Formulas
| Function | Integral |
|---|---|
| $\int \frac{dx}{x}$ | $\ln\|x\| + C$ |
| $\int \frac{dx}{x^2 + a^2}$ | $\frac{1}{a}\tan^{-1}\left(\frac{x}{a}\right) + C$ |
| $\int \frac{dx}{\sqrt{a^2 - x^2}}$ | $\sin^{-1}\left(\frac{x}{a}\right) + C$ |
| $\int e^{ax}dx$ | $\frac{1}{a}e^{ax} + C$ |
| $\int \tan x dx$ | $\ln\|\sec x\| + C$ |
| $\int \cot x dx$ | $\ln\|\sin x\| + C$ |
| $\int \sec x dx$ | $\ln\|\sec x + \tan x\| + C$ |
| $\int \csc x dx$ | $\ln\|\csc x - \cot x\| + C$ |
Cross-References
- Integration Techniques: Required for solving → Indefinite Integrals
- Advanced Integration: For complex integrals → Integration Techniques
- Trigonometric Integration: For trig-based DEs → Trigonometric Integration
- Homogeneous DEs: Another solution method → Homogeneous DE
- Linear DEs: Alternative method → Linear DE
- Order and Degree: Classification → Order and Degree
- Inverse Trig Functions: For inverse trig integrals → Inverse Trigonometry
Quick Revision Checklist
- Recognize separable form: $\frac{dy}{dx} = g(x) \cdot h(y)$
- Separate variables correctly: $X$ with $dx$, $Y$ with $dy$
- Integrate both sides
- Add constant $C$ on one side only
- Apply initial conditions if given
- Verify solution by substitution
Last updated: November 12, 2025