Mathwords logoMathwords

Separable Differential Equation

Separable Differential Equation

A first order ordinary differential equation which can be solved by separating all occurrences of the two variables on either side of the equal sign and then integrating.

 

Example and solution of separable differential equation: dy/dx = x²/y, solved to y = ±√((2/3)x³ + C)

 

 

See also

Differential equation, ordinary differential equation

Key Formula

dydx=f(x)g(y)1g(y)dy=f(x)dx1g(y)dy=f(x)dx\frac{dy}{dx} = f(x)\,g(y) \quad\Longrightarrow\quad \frac{1}{g(y)}\,dy = f(x)\,dx \quad\Longrightarrow\quad \int \frac{1}{g(y)}\,dy = \int f(x)\,dx
Where:
  • yy = The dependent variable (unknown function of x)
  • xx = The independent variable
  • f(x)f(x) = A function of x only
  • g(y)g(y) = A function of y only
  • dydx\frac{dy}{dx} = The derivative of y with respect to x

Worked Example

Problem: Solve the differential equation dy/dx = 3x²y.
Step 1: Identify the separable form. The right side is the product of a function of x and a function of y.
dydx=3x2yf(x)=3x2,  g(y)=y\frac{dy}{dx} = 3x^2 \cdot y \quad\Rightarrow\quad f(x) = 3x^2,\; g(y) = y
Step 2: Separate the variables by dividing both sides by y and multiplying both sides by dx.
1ydy=3x2dx\frac{1}{y}\,dy = 3x^2\,dx
Step 3: Integrate both sides independently.
1ydy=3x2dxlny=x3+C\int \frac{1}{y}\,dy = \int 3x^2\,dx \quad\Rightarrow\quad \ln|y| = x^3 + C
Step 4: Solve for y by exponentiating both sides.
y=ex3+C=eCex3y=Aex3|y| = e^{x^3 + C} = e^C \cdot e^{x^3} \quad\Rightarrow\quad y = Ae^{x^3}
Step 5: Here A = ±e^C is an arbitrary constant. Note that y = 0 is also a solution (set A = 0).
y=Aex3,ARy = Ae^{x^3}, \quad A \in \mathbb{R}
Answer: The general solution is y = Ae^(x³), where A is an arbitrary constant.

Another Example

This example includes an initial condition (initial value problem) and shows a case where the solution is given implicitly or requires a cube root, unlike the first example where the solution was a clean exponential.

Problem: Solve the initial value problem dy/dx = (x + 1)/(y²) with y(0) = 2.
Step 1: Separate variables by multiplying both sides by y² and by dx.
y2dy=(x+1)dxy^2\,dy = (x + 1)\,dx
Step 2: Integrate both sides.
y2dy=(x+1)dxy33=x22+x+C\int y^2\,dy = \int (x+1)\,dx \quad\Rightarrow\quad \frac{y^3}{3} = \frac{x^2}{2} + x + C
Step 3: Apply the initial condition y(0) = 2 to find C.
(2)33=02+0+CC=83\frac{(2)^3}{3} = \frac{0}{2} + 0 + C \quad\Rightarrow\quad C = \frac{8}{3}
Step 4: Write the particular solution and solve for y.
y33=x22+x+83y3=3x22+3x+8y=(3x22+3x+8)1/3\frac{y^3}{3} = \frac{x^2}{2} + x + \frac{8}{3} \quad\Rightarrow\quad y^3 = \frac{3x^2}{2} + 3x + 8 \quad\Rightarrow\quad y = \left(\frac{3x^2}{2} + 3x + 8\right)^{1/3}
Answer: y = ((3x²/2) + 3x + 8)^(1/3)

Frequently Asked Questions

How do you know if a differential equation is separable?
A first-order ODE is separable if you can write dy/dx as a product of a function of x alone and a function of y alone, i.e., dy/dx = f(x)·g(y). If the right side mixes x and y in a way that cannot be factored into such a product — for example, dy/dx = x + y — then the equation is not separable.
What is the difference between a separable and a linear differential equation?
A separable equation has the form dy/dx = f(x)·g(y), where variables can be split to opposite sides. A first-order linear equation has the form dy/dx + P(x)y = Q(x) and is solved using an integrating factor. Some equations are both separable and linear (like dy/dx = 2xy), while others are one but not the other.
Can you lose solutions when separating variables?
Yes. When you divide by g(y) to separate variables, any value of y where g(y) = 0 may be a constant solution (called an equilibrium or singular solution) that gets lost. You should always check whether g(y) = 0 produces a valid solution and state it separately if it does.

Separable Differential Equation vs. First-Order Linear Differential Equation

Separable Differential EquationFirst-Order Linear Differential Equation
Standard Formdy/dx = f(x)·g(y)dy/dx + P(x)y = Q(x)
Solution MethodSeparate variables, then integrate both sidesMultiply by integrating factor μ(x) = e^(∫P(x)dx)
Can be nonlinear in y?Yes (e.g., dy/dx = xy²)No — y and dy/dx appear only to the first power
OverlapSome separable equations are also linearSome linear equations are also separable
Exampledy/dx = x/ydy/dx + 2y = e^x

Why It Matters

Separable differential equations are typically the first type of ODE you learn to solve in a calculus or differential equations course, making them foundational. They model many real-world processes — exponential growth and decay, Newton's law of cooling, and simple population models are all separable. Mastering the separation-of-variables technique also builds the intuition needed for more advanced methods like integrating factors and substitution.

Common Mistakes

Mistake: Forgetting to check for lost solutions when dividing by g(y).
Correction: Before dividing by g(y), note any values where g(y) = 0. These may yield constant solutions (e.g., y = 0) that the general solution misses. Always check and list them separately.
Mistake: Forgetting the constant of integration or placing +C on both sides.
Correction: When you integrate both sides, each side technically gets its own constant, but you only need one. Combine them into a single constant C on one side of the equation. Omitting C entirely loses the family of solutions.

Related Terms