Dove's LibraryDove's Library

7.6 - Finding General Solutions Using Separation of Variables

Review: Implicit Differentiation

Before learning separation of variables, let’s recall implicit differentiation.
When an equation isn’t solved for yy, meaning it isn’t in the form y=…y = \ldots, we differentiate implicitly with respect to xx.
Example: Differentiate x2+y2=25x^2 + y^2 = 25
ddx[x2+y2]=ddx[25]\frac{d}{dx}[x^2 + y^2] = \frac{d}{dx}[25]2x+2ydydx=02x + 2y\frac{dy}{dx} = 0
Solving for dydx\frac{dy}{dx}:
2ydydx=−2x⇒dydx=−xy2y\frac{dy}{dx} = -2x \quad \Rightarrow \quad \frac{dy}{dx} = -\frac{x}{y}
Separation of variables works in reverse. We start with dydx\frac{dy}{dx} and integrate to find yy.

General vs. Particular Solutions

General solution: contains an arbitrary constant CC, representing a whole family of solutions.
Particular solution: a specific solution, found by using an initial condition to determine CC.
This lesson focuses on general solutions, the ones with the +C+C. Particular solutions come in the next lesson.

What is Separation of Variables?

It’s a technique for solving differential equations by:
  1. Separating all the terms with yy (and dydy) onto one side
  1. Separating all the terms with xx (and dxdx) onto the other side
  1. Integrating both sides
This only works when dydx\frac{dy}{dx} can be written as (a function of xx) times (a function of yy). Some differential equations can’t be separated at all. For example, dydx=x+y\frac{dy}{dx} = x + y is a sum that won’t factor into an xx part times a yy part, so separation of variables can’t solve it. For equations like that, use a slope field (or, in BC, Euler’s method) instead.

Leibniz Notation

The notation dydx\frac{dy}{dx} is called Leibniz notation, named after Gottfried Leibniz.
While dydx\frac{dy}{dx} is not technically a fraction, we can treat it like one for separation of variables.
So we can “multiply both sides by dxdx” to separate the differentials:
dydx=f(x)⇒dy=f(x) dx\frac{dy}{dx} = f(x) \quad \Rightarrow \quad dy = f(x) \, dx

The Separation of Variables Process

Step 1: Separate the variables. Rearrange so all the yy terms (with dydy) are on one side and all the xx terms (with dxdx) are on the other.
Step 2: Integrate both sides.
∫g(y) dy=∫f(x) dx\int g(y) \, dy = \int f(x) \, dx
Step 3: Solve for yy if you can. Manipulate algebraically to get yy by itself, giving an explicit solution.

Example 1: Basic Separation

Solve the differential equation dydx=x2y\frac{dy}{dx} = \frac{x^2}{y}.
Step 1: Separate the variables
Multiply both sides by yy:
ydydx=x2y \frac{dy}{dx} = x^2
Treat dydx\frac{dy}{dx} as a fraction and multiply both sides by dxdx:
y dy=x2 dxy \, dy = x^2 \, dx
Step 2: Integrate both sides
∫y dy=∫x2 dx\int y \, dy = \int x^2 \, dxy22+C1=x33+C2\frac{y^2}{2} + C_1 = \frac{x^3}{3} + C_2
Note: we have two constants, but we can combine them:
y22=x33+C\frac{y^2}{2} = \frac{x^3}{3} + C
where C=C2−C1C = C_2 - C_1 is just one combined constant.
Step 3: Solve for yy to get the explicit solution
y2=2x33+2Cy^2 = \frac{2x^3}{3} + 2C
Since 2C2C is still just a constant, we can keep calling it CC:
y2=2x33+Cy^2 = \frac{2x^3}{3} + Cy=±2x33+Cy = \pm\sqrt{\frac{2x^3}{3} + C}
Important: don’t forget the ±\pm when taking even roots.
Answer: y=±2x33+Cy = \pm\sqrt{\frac{2x^3}{3} + C}

Implicit vs. Explicit Solutions

Implicit Solution

An equation relating xx and yy that is not solved for yy.
Example: 3y2−2x3=C3y^2 - 2x^3 = C

Explicit Solution

yy is isolated on one side.
Example: y=±2x33+Cy = \pm\sqrt{\frac{2x^3}{3} + C}
Most problems ask for an explicit solution when one is possible.

Example 2: Trigonometric Differential Equation

Solve y2dydx=sin⁡(x)y^2 \frac{dy}{dx} = \sin(x).
Step 1: Separate the variables
Multiply both sides by dxdx:
y2 dy=sin⁡(x) dxy^2 \, dy = \sin(x) \, dx
Step 2: Integrate
∫y2 dy=∫sin⁡(x) dx\int y^2 \, dy = \int \sin(x) \, dxy33=−cos⁡(x)+C\frac{y^3}{3} = -\cos(x) + C
From here on, we only write one constant CC, on the right side, since we’d combine them anyway.
Step 3: Solve for yy
y3=−3cos⁡(x)+3Cy^3 = -3\cos(x) + 3C
Again, 3C3C is just another constant:
y3=−3cos⁡(x)+Cy^3 = -3\cos(x) + Cy=−3cos⁡(x)+C3y = \sqrt[3]{-3\cos(x) + C}
Note: no ±\pm is needed here, because we’re taking a cube root, which is an odd root.
Answer: y=−3cos⁡(x)+C3y = \sqrt[3]{-3\cos(x) + C}

Example 3: Same Idea, Different Wording

Solve dydx=sin⁡(x)y2\frac{dy}{dx} = \frac{\sin(x)}{y^2}.
Step 1: Separate
y2 dy=sin⁡(x) dxy^2 \, dy = \sin(x) \, dx
This is the exact same separated equation as Example 2, just written differently in the original problem.
Step 2: Integrate
∫y2 dy=∫sin⁡(x) dx\int y^2 \, dy = \int \sin(x) \, dxy33=−cos⁡(x)+C\frac{y^3}{3} = -\cos(x) + C
Step 3: Solve for yy
y3=−3cos⁡(x)+Cy^3 = -3\cos(x) + Cy=−3cos⁡(x)+C3y = \sqrt[3]{-3\cos(x) + C}
Answer: y=−3cos⁡(x)+C3y = \sqrt[3]{-3\cos(x) + C}

Example 4: Negative Exponent Form

Solve dydx=y−2cos⁡(x)\frac{dy}{dx} = y^{-2} \cos(x).
Step 1: Separate
Rewrite y−2=1y2y^{-2} = \frac{1}{y^2}, so:
y2 dy=cos⁡(x) dxy^2 \, dy = \cos(x) \, dx
Step 2: Integrate
∫y2 dy=∫cos⁡(x) dx\int y^2 \, dy = \int \cos(x) \, dxy33=sin⁡(x)+C\frac{y^3}{3} = \sin(x) + C
Step 3: Multiply by 3
y3=3sin⁡(x)+Cy^3 = 3\sin(x) + C
Step 4: Solve for yy
y=3sin⁡(x)+C3y = \sqrt[3]{3\sin(x) + C}
Answer: y=3sin⁡(x)+C3y = \sqrt[3]{3\sin(x) + C}

Example 5: The Reciprocal Technique

Solve dydx=y2sin⁡(x)\frac{dy}{dx} = y^2 \sin(x).
Step 1: Separate
1y2 dy=sin⁡(x) dx\frac{1}{y^2} \, dy = \sin(x) \, dx
Step 2: Integrate
Rewrite 1y2=y−2\frac{1}{y^2} = y^{-2}, and recall that ∫y−2 dy=y−1−1=−1y\int y^{-2} \, dy = \frac{y^{-1}}{-1} = -\frac{1}{y}:
∫y−2 dy=∫sin⁡(x) dx\int y^{-2} \, dy = \int \sin(x) \, dx−1y=−cos⁡(x)+C-\frac{1}{y} = -\cos(x) + C
Step 3: Multiply by −1-1
1y=cos⁡(x)−C\frac{1}{y} = \cos(x) - C
Since a constant can be positive or negative, we just write it as +C+C:
1y=cos⁡(x)+C\frac{1}{y} = \cos(x) + C
Step 4: Take the reciprocal of both sides
y=1cos⁡(x)+Cy = \frac{1}{\cos(x) + C}
Answer: y=1cos⁡(x)+Cy = \frac{1}{\cos(x) + C}
Key point: the constant has to stay in the denominator when you take the reciprocal.

Example 6: Natural Logarithm and Exponentiating

Solve dydx=xy\frac{dy}{dx} = xy.
Step 1: Separate
1y dy=x dx\frac{1}{y} \, dy = x \, dx
Step 2: Integrate
∫1y dy=∫x dx\int \frac{1}{y} \, dy = \int x \, dxln⁡∣y∣=x22+C\ln|y| = \frac{x^2}{2} + C
Step 3: Exponentiate both sides
To solve for yy, raise ee to both sides:
eln⁡∣y∣=ex2/2+Ce^{\ln|y|} = e^{x^2/2 + C}∣y∣=ex2/2+C|y| = e^{x^2/2 + C}
Step 4: Simplify using exponent properties
Recall that ea+b=ea⋅ebe^{a+b} = e^a \cdot e^b:
∣y∣=ex2/2⋅eC|y| = e^{x^2/2} \cdot e^C
Dropping the absolute value gives y=±eC⋅ex2/2y = \pm e^C \cdot e^{x^2/2}. Since ±eC\pm e^C is just a constant, we call it CC:
y=Cex2/2y = Ce^{x^2/2}
Answer: y=Cex2/2y = Ce^{x^2/2}
Important: after exponentiating, the constant moves from the exponent to a multiplicative coefficient out front.

Why We Rewrite ex2/2+Ce^{x^2/2 + C} as Cex2/2Ce^{x^2/2}

Using exponent rules:
ex2/2+C=ex2/2⋅eCe^{x^2/2 + C} = e^{x^2/2} \cdot e^C
Since CC is an arbitrary constant, eCe^C is an arbitrary positive constant. The ±\pm from dropping the absolute value lets it be negative too, so we just call the whole thing CC:
y=Cex2/2y = Ce^{x^2/2}
This is the form that shows up in multiple choice answers, and it’s the preferred format.

Example 7: Another Exponential Solution

Solve dydx=3xy\frac{dy}{dx} = 3xy.
Step 1: Separate
dyy=3x dx\frac{dy}{y} = 3x \, dx
Step 2: Integrate
ln⁡∣y∣=3x22+C\ln|y| = \frac{3x^2}{2} + C
Step 3: Exponentiate
∣y∣=e3x2/2+C=e3x2/2⋅eC|y| = e^{3x^2/2 + C} = e^{3x^2/2} \cdot e^Cy=Ce3x2/2y = Ce^{3x^2/2}
Answer: y=Ce3x2/2y = Ce^{3x^2/2}

Example 8: Factoring Before Separating

Solve dydx+2xy=4x\frac{dy}{dx} + 2xy = 4x.

The Wrong Way

If you just subtract 2xy2xy:
dydx=4x−2xy\frac{dy}{dx} = 4x - 2xy
The right side is a difference of two terms, so you can’t split it into an xx part times a yy part yet. For separation of variables to work, dydx\frac{dy}{dx} has to equal a product: a function of xx multiplied by a function of yy.

The Right Way

Rearrange:
dydx=4x−2xy\frac{dy}{dx} = 4x - 2xy
Factor out 2x2x:
dydx=2x(2−y)\frac{dy}{dx} = 2x(2 - y)
Now it separates:
dy2−y=2x dx\frac{dy}{2 - y} = 2x \, dx
Integrate:
∫12−y dy=∫2x dx\int \frac{1}{2-y} \, dy = \int 2x \, dx−ln⁡∣2−y∣=x2+C-\ln|2 - y| = x^2 + Cln⁡∣2−y∣=−x2+C\ln|2 - y| = -x^2 + C
Exponentiate:
∣2−y∣=e−x2+C=Ce−x2|2 - y| = e^{-x^2 + C} = Ce^{-x^2}2−y=Ce−x22 - y = Ce^{-x^2}y=2−Ce−x2y = 2 - Ce^{-x^2}
Answer: y=2−Ce−x2y = 2 - Ce^{-x^2}

Key Technique Summary

Situation
Action
dydx\frac{dy}{dx} with separate xx and yy functions
Separate and integrate
Result has ln⁡∥y∥\ln\|y\|
Exponentiate both sides
After exponentiating: ef(x)+Ce^{f(x) + C}
Rewrite as Cef(x)Ce^{f(x)}
Need an explicit solution
Solve algebraically for yy
Even root (square root, 4th root, etc.)
Include ±\pm
Odd root (cube root, 5th root, etc.)
No ±\pm needed

Strategy Flowchart

Step 1: Can you factor to get dydx\frac{dy}{dx} multiplied by a function?
↓ Yes
Step 2: Separate the variables: g(y) dy=f(x) dxg(y) \, dy = f(x) \, dx
↓
Step 3: Integrate both sides. One CC on the right side is enough
↓
Step 4: If you have ln⁡∣y∣\ln|y|, exponentiate both sides
↓
Step 5: Simplify: ef(x)+C=Cef(x)e^{f(x) + C} = Ce^{f(x)}
↓
Step 6: Solve for yy explicitly if you can
↓
Step 7: Check your answer by differentiating

Key Takeaways

  • Separation of variables: rearrange to get all the yy terms with dydy and all the xx terms with dxdx
  • Not every equation separates. dydx\frac{dy}{dx} has to be a function of xx times a function of yy, so something like dydx=x+y\frac{dy}{dx} = x + y can’t be separated
  • Leibniz notation: treat dydx\frac{dy}{dx} as if it were a fraction for separation purposes
  • General solutions contain the arbitrary constant CC
  • One constant is enough. Write CC on only one side after integrating
  • Factor first. If dydx\frac{dy}{dx} is added to other terms, factor to get it into multiplication form
  • Natural log solutions: ln⁡∣y∣=f(x)+C\ln|y| = f(x) + C becomes y=Cef(x)y = Ce^{f(x)} after exponentiating
  • Exponent rule: ef(x)+C=ef(x)⋅eC=Cef(x)e^{f(x) + C} = e^{f(x)} \cdot e^C = Ce^{f(x)}, so the constant moves outside
  • Even roots need ±\pm. When solving y2=…y^2 = \ldots, write y=±…y = \pm\sqrt{\ldots}
  • Odd roots don’t need ±\pm. When solving y3=…y^3 = \ldots, write y=…3y = \sqrt[3]{\ldots}

AP® is a registered trademark of the College Board, which is not affiliated with Dove's Library and was not involved in the production of, and does not endorse, this website.

Providing free, high-quality AP notes to help students succeed, earn college credit, and reach their educational goals, ensuring everyone has access to the resources they need.

© 2026 Standard Learning Group, Inc., which operates Dove's Library. All rights reserved.