---
title: "Finding General Solutions Using Separation of Variables | FiveStudy"
description: "All the y's on one side, all the x's on the other, then integrate both at once."
url: https://fivestudy.com/guides/ap-calculus-bc-7-6-finding-general-solutions-using-separation-of-variables
---

[AP Calculus BC](https://fivestudy.com/ap-calculus-bc) · Study guide

# Finding General Solutions Using Separation of Variables

[Figure: FiveStudy]

FiveStudy

AP® Calculus BC · Unit 7 · Differential Equations

AP® Calculus BC · Unit 7 · Differential Equations

# Separation of *Variables*

Many differential equations can be solved by gathering each variable on its own side and integrating. This guide shows the method, where the constant goes, and what can be lost along the way.

1. When it works 2. The method 3. Solving for y 4. What can go wrong

The idea in one paragraph

A differential equation is **separable** if it can be written as \(\frac{dy}{dx} = g(x)\,h(y)\). Move everything with \(y\) to the left with \(dy\) and everything with \(x\) to the right with \(dx\): \(\frac{1}{h(y)}\,dy = g(x)\,dx\). Integrate both sides, add one constant \(C\), then solve for \(y\) if you can. The result is the **general solution**: a family of functions, one for each \(C\).

## 1 When it works

| Equation | Separable? |
| --- | --- |
| \(\frac{dy}{dx} = xy\) | Yes: \(x \cdot y\) |
| \(\frac{dy}{dx} = \frac{x}{y}\) | Yes: \(x \cdot \frac1y\) |
| \(\frac{dy}{dx} = e^{x - y}\) | Yes: \(e^x \cdot e^{-y}\) |
| \(\frac{dy}{dx} = x + y\) | No: a sum cannot be split into a product |

## 2 The method

Worked Example 1 Exponential type

### \(\dfrac{dy}{dx} = xy\)

1. 1

   Separate: put every \(y\) with \(dy\) and every \(x\) with \(dx\): \(\dfrac{1}{y}\,dy = x\,dx\).

2. 2

   Integrate both sides: \(\ln|y| = \dfrac{x^2}{2} + C\). One constant is enough; it absorbs the constants from both sides.

3. 3

   Solve for \(y\): \(|y| = e^{x^2/2 + C} = e^C e^{x^2/2}\). Write \(\pm e^C\) as a single constant \(C\).

**Answer:** \(y = Ce^{x^2/2}\)

**Figure 1.** Separating variables produces one formula with a constant C. Every value of C gives a solution curve, including C = 0, the flat solution that dividing by y would have hidden.

Write it like this

“Separating variables, \(\frac{1}{y}\,dy = x\,dx\). Integrating both sides, \(\ln|y| = \frac{x^2}{2} + C\), so \(y = Ce^{x^2/2}\).”

Common Mistake 1 · Putting a constant on each side

\(\ln|y| + C_1 = \frac{x^2}{2} + C_2\) is correct but wasteful: subtracting gives one constant. Write a single \(C\) on one side.

Common Mistake 2 · Adding C after exponentiating

From \(\ln|y| = \frac{x^2}{2} + C\), the next line is \(|y| = e^{x^2/2 + C} = e^Ce^{x^2/2}\), so the constant multiplies. Writing \(y = e^{x^2/2} + C\) is wrong.

Worked Example 2 Squares on both sides

### \(\dfrac{dy}{dx} = \dfrac{x}{y}\)

1. 1

   \(y\,dy = x\,dx\). Integrate: \(\dfrac{y^2}{2} = \dfrac{x^2}{2} + C\).

2. 2

   Multiply by 2 and rename the constant: \(y^2 = x^2 + C\).

**Answer:** \(y^2 = x^2 + C\), or \(y = \pm\sqrt{x^2 + C}\). The sign is chosen later from an initial condition.

## 3 Solving for y

Worked Example 3 A power of y

### \(\dfrac{dy}{dx} = y^2\)

1. 1

   \(y^{-2}\,dy = dx\). Integrate: \(-y^{-1} = x + C\).

2. 2

   Solve: \(y = -\dfrac{1}{x + C}\).

**Answer:** \(y = -\dfrac{1}{x + C}\) (and the constant solution \(y = 0\)).

Worked Example 4 Split an exponential first

### \(\dfrac{dy}{dx} = e^{x - y}\)

1. 1

   Rewrite: \(e^{x - y} = e^x e^{-y}\). Then \(e^y\,dy = e^x\,dx\).

2. 2

   Integrate: \(e^y = e^x + C\). Take ln: \(y = \ln(e^x + C)\).

**Answer:** \(y = \ln(e^x + C)\)

Worked Example 5 A shifted exponential

### \(\dfrac{dy}{dx} = 0.5(y - 4)\)

1. 1

   Separate: \(\dfrac{1}{y - 4}\,dy = 0.5\,dx\).

2. 2

   Integrate: \(\ln|y - 4| = 0.5x + C\).

3. 3

   Exponentiate and rename the constant: \(y - 4 = Ce^{0.5x}\).

**Answer:** \(y = 4 + Ce^{0.5x}\). The constant solution \(y = 4\) is the case \(C = 0\).

Worked Example 6 When y cannot be isolated

### \(\dfrac{dy}{dx} = \dfrac{2x}{3y^2 + 1}\)

1. 1

   Separate: \((3y^2 + 1)\,dy = 2x\,dx\).

2. 2

   Integrate: \(y^3 + y = x^2 + C\).

3. 3

   There is no simple formula for \(y\) from \(y^3 + y = \dots\), so stop here.

**Answer:** \(y^3 + y = x^2 + C\). An equation with \(y\) not isolated is still the general solution.

## 4 What can go wrong

Common Mistake 3 · Losing a solution when dividing

Dividing by \(y\) assumes \(y \neq 0\). But \(y = 0\) also satisfies \(\frac{dy}{dx} = xy\). It reappears as \(C = 0\) in \(y = Ce^{x^2/2}\); in other equations, check constant solutions separately.

### Quick reference

| Step | Action |
| --- | --- |
| 1 | Write as \(\frac{dy}{dx} = g(x)h(y)\) |
| 2 | Separate: \(\frac{1}{h(y)}dy = g(x)dx\) |
| 3 | Integrate both sides; one + C |
| 4 | Solve for y; rename constants |
| 5 | Check for constant solutions lost by dividing |

FiveStudy AP® Calculus BC · Separation of variables
