01 / 20

General Solutions:
Separation of Variables

Master the technique of separating variables to solve first-order differential equations and find their general solutions.

Calculus 2

What Is a Differential Equation?

A differential equation (DE) is any equation that contains one or more derivatives of an unknown function. Our goal is to find the function itself.

ODE
Ordinary differential equation: involves derivatives with respect to one independent variable.
Order
The highest derivative present. We focus on first-order ODEs: \(\frac{dy}{dx} = f(x,y)\).

General vs. Particular Solutions

Solving a DE means finding every function that satisfies it. We call this family the general solution: it contains an arbitrary constant \(C\).

General Solution
The full family of curves: includes the constant \(C\).
Example: \(y = Ce^{x}\)
Particular Solution
One specific curve chosen by an initial condition like \(y(0)=5\).
Example: \(y = 5e^{x}\)

A Family of Solution Curves

Each value of \(C\) gives a different curve. Together, they form a family of curves that represents the general solution.

x y C = 0.5 C = 1 C = 2 1 2 3 4 5 6

The Core Idea: Separation of Variables

If a first-order ODE can be written so that all \(y\)-terms are on one side and all \(x\)-terms are on the other, we can integrate each side independently.

The Method in Detail

Step 1
Write as \(g(x) \cdot h(y)\)
Step 2 Separate variables Step 3 Integrate both sides Step 4
Solve for \(y\) (if possible)
Step 5
Write \(+ C\)
Result: the General Solution \(y = f(x, C)\)

How to Apply the Method

1
Identify separability. Check that \(\frac{dy}{dx}\) can be written as \(g(x) \cdot h(y)\).
2
Separate. Move all \(y\)-terms (including \(dy\)) to the left and all \(x\)-terms (including \(dx\)) to the right.
3
Integrate both sides. \(\displaystyle\int \frac{1}{h(y)}\,dy = \int g(x)\,dx\).
4
Solve for \(y\) if possible. Sometimes the answer stays in implicit form.
5
Include \(+\,C\). One constant of integration is enough: place it on one side only.

Separable vs. Non-Separable

Not every first-order ODE can be solved by separation of variables. You must be able to factor the right side into \(g(x) \cdot h(y)\).

Equation Separable? Reason
\(\frac{dy}{dx} = x^2 y\) ✓ Yes \(g(x)=x^2,\; h(y)=y\)
\(\frac{dy}{dx} = \frac{y}{x}\) ✓ Yes \(g(x)=\frac{1}{x},\; h(y)=y\)
\(\frac{dy}{dx} = x + y\) ✕ No Sum, not a product
\(\frac{dy}{dx} = e^{x+y}\) ✓ Yes \(e^{x+y} = e^x \cdot e^y\)

Example 1: Basic Separation

1
Separate: \(\displaystyle\frac{1}{y}\,dy = 3x^2\,dx\)
2
Integrate: \(\displaystyle\int \frac{1}{y}\,dy = \int 3x^2\,dx\)
3
Evaluate: \(\ln|y| = x^3 + C_1\)
4
Solve for \(y\): \(|y| = e^{x^3 + C_1} = e^{C_1}\cdot e^{x^3}\)
5
General solution: \(\boxed{y = Ce^{x^3}}\) where \(C = \pm e^{C_1}\)

Example 2: Quadratic in \(y\)

1
Separate: \(y^2\,dy = x\,dx\)
2
Integrate: \(\displaystyle\int y^2\,dy = \int x\,dx\)
3
Evaluate: \(\displaystyle\frac{y^3}{3} = \frac{x^2}{2} + C\)
4
Solve for \(y\): \(y^3 = \frac{3x^2}{2} + K\) where \(K = 3C\)
5
General solution: \(\displaystyle\boxed{y = \left(\frac{3x^2}{2} + K\right)^{1/3}}\)

Example 3: Exponential Separation

1
Rewrite: \(e^{x+y} = e^x \cdot e^y\), so \(\frac{dy}{dx} = e^x \cdot e^y\)
2
Separate: \(e^{-y}\,dy = e^x\,dx\)
3
Integrate: \(-e^{-y} = e^x + C\)
4
Solve for \(y\): \(e^{-y} = -e^x - C\), so \(-y = \ln(-e^x - C)\)
5
General solution: \(\displaystyle\boxed{y = -\ln(-e^x + A)}\) where \(A = -C\)

Why \(+\,C\) Is Essential

Integration produces a family of antiderivatives. The constant \(C\) represents infinitely many valid solutions. Dropping it gives only one curve instead of the complete answer.

x y -2 -1 1 2 C = 0 C = 1 C = 3

Common Mistakes to Avoid

✕ Forgetting \(+\,C\)
Every indefinite integral needs a constant. Without it, you have a particular solution, not the general one.
✕ Two Constants
Writing \(+\,C_1\) on the left and \(+\,C_2\) on the right. Combine them: use one \(C\) on one side only.
✕ Wrong Separation
Leaving mixed \(x\) and \(y\) terms on one side. Every \(y\) must travel with \(dy\), every \(x\) with \(dx\).

Summary of Key Ideas

Concept Definition Example
Separable ODE \(\frac{dy}{dx} = g(x)\cdot h(y)\) \(\frac{dy}{dx} = xy\)
Separation step Move \(y\) with \(dy\), \(x\) with \(dx\) \(\frac{dy}{y} = x\,dx\)
Integration Integrate both sides independently \(\ln|y| = \frac{x^2}{2} + C\)
General solution Family with arbitrary constant \(y = Ae^{x^2/2}\)
Particular solution Use initial condition for \(C\) \(y(0)=3 \Rightarrow A=3\)

Before the Assessment

Separate
Factor the RHS as \(g(x) \cdot h(y)\), then split \(dy\) and \(dx\).
Integrate
Evaluate \(\int \frac{1}{h(y)}\,dy\) and \(\int g(x)\,dx\) with one \(+\,C\).
Solve
Isolate \(y\) when algebraically possible. Include \(C\) in the final answer.

Question 1 of 5

What is the general solution of \(\displaystyle\frac{dy}{dx} = 2xy\)?

Question 2 of 5

Which of these ODEs is not separable?

Question 3 of 5

After separating \(\displaystyle\frac{dy}{dx} = \frac{x^2}{y}\), which integral equation is correct?

Question 4 of 5

Find the general solution of \(\displaystyle\frac{dy}{dx} = \frac{1+y^2}{1+x^2}\).

Question 5 of 5

A student solves \(\frac{dy}{dx} = 6x^2 y\) and writes \(y = e^{2x^3}\). What is wrong with this answer?