AP Calculus AB Unit 7 Notes: Solving Differential Equations by Separation

Finding General Solutions Using Separation of Variables

A differential equation is an equation that relates an unknown function (like y as a function of x) to its derivative(s) (like \frac{dy}{dx}). In AP Calculus AB, you’ve already seen differential equations in slope fields and in modeling contexts—where the key idea is that the derivative describes how a quantity changes.

Separation of variables is a method for solving certain first-order differential equations by rewriting the equation so that:

  • all the y-stuff (terms involving y and dy) is on one side, and
  • all the x-stuff (terms involving x and dx) is on the other side,

and then integrating both sides.

What “separable” means (and why it matters)

A first-order differential equation is called separable if you can algebraically rearrange it into the form

\frac{dy}{dx} = g(x)h(y)

or equivalently

\frac{1}{h(y)}\frac{dy}{dx} = g(x)

The reason this matters is that if you can get it into that form, you can “separate” and integrate:

\frac{1}{h(y)}dy = g(x)dx

Then integrating both sides gives an implicit (or sometimes explicit) solution.

This is powerful because many growth/decay and rate-of-change models naturally appear as “rate = (function of x) times (function of y),” which is exactly the separable structure.

Notation you’ll see on the AP Exam

You may see derivatives written in multiple equivalent ways.

MeaningCommon notationNotes
derivative of y with respect to x\frac{dy}{dx}Most common in separation of variables
derivative of y with respect to xy'Equivalent to \frac{dy}{dx}
derivative of y with respect to t\frac{dy}{dt}Common in modeling with time
derivative of P with respect to t\frac{dP}{dt}Emphasizes dependent variable P

A key mindset shift: in separation of variables, you often treat \frac{dy}{dx} like a fraction to move dx and dy around. Formally, this corresponds to rewriting the equation in differential form and integrating; in AP Calculus, this manipulation is standard and expected when done consistently.

The core process (mechanism) of separation of variables

When you solve by separation, you’re following a predictable chain of reasoning:

  1. Identify separability. Can you rewrite the right-hand side as a product of a function of x and a function of y?
  2. Algebraically separate. Rearrange so that all factors involving y are with dy and all factors involving x are with dx.
  3. Integrate both sides.
  4. Combine constants correctly. You only need one arbitrary constant in the final general solution.
  5. Solve for y if asked (optional). Sometimes the AP question accepts an implicit form; sometimes it requests explicit y=.

A typical separation step looks like:

\frac{dy}{dx} = g(x)h(y)

Multiply by \frac{1}{h(y)} and by dx:

\frac{1}{h(y)}dy = g(x)dx

Then integrate:

\int \frac{1}{h(y)}dy = \int g(x)dx

A subtle but important issue: dividing by an expression that could be zero

When you “separate,” you often divide by something involving y (like y itself). If that expression can be zero, you must consider whether you accidentally threw away a solution.

Example: If

\frac{dy}{dx} = xy

you might divide by y to get

\frac{1}{y}\frac{dy}{dx} = x

But if y=0, the original differential equation becomes \frac{dy}{dx}=0, which is true for the constant function y=0. Dividing by y would not be legal at y=0, so you should separately note that y=0 is a solution (an equilibrium solution).

This is a common AP pitfall: you do correct algebra for nonzero y, but you forget to include constant solutions that were excluded by division.

Logs and absolute values

Another common place students lose points is integrating \frac{1}{y} (or similar forms).

Remember:

\int \frac{1}{y}dy = \ln|y| + C

The absolute value is important in the general antiderivative. Sometimes, after applying an initial condition (later), you can remove the absolute value because you know the sign of y on the relevant interval.

Worked Example 1: Solving a basic separable equation

Solve for the general solution:

\frac{dy}{dx} = xy

Step 1: Separate. For y \neq 0, divide by y and multiply by dx:

\frac{1}{y}dy = xdx

Step 2: Integrate.

\int \frac{1}{y}dy = \int xdx

So

\ln|y| = \frac{x^2}{2} + C

Step 3: Solve for y (optional but common). Exponentiate both sides:

|y| = e^{\frac{x^2}{2} + C}

Rewrite e^C as a positive constant K:

|y| = Ke^{\frac{x^2}{2}}

Absorb the sign into a new nonzero constant A:

y = Ae^{\frac{x^2}{2}}

Don’t forget the excluded solution: y=0 also satisfies the original equation, and it is actually included if you allow A=0 in the final form.

So the general solution can be written as

y = Ae^{\frac{x^2}{2}}

where A is any real constant.

Worked Example 2: A separable equation leading to an implicit solution

Solve:

\frac{dy}{dx} = \frac{x^2+1}{y^2}

Step 1: Separate. Multiply by y^2 and by dx:

y^2dy = (x^2+1)dx

Step 2: Integrate.

\int y^2dy = \int (x^2+1)dx

So

\frac{y^3}{3} = \frac{x^3}{3} + x + C

This is already a valid general solution (implicit form). If you want, multiply by 3:

y^3 = x^3 + 3x + C

You could solve explicitly:

y = \sqrt[3]{x^3 + 3x + C}

but AP questions often accept the implicit form unless they explicitly ask for y=.

Worked Example 3: A model-style differential equation (variable-dependent rate)

Suppose a quantity y changes according to

\frac{dy}{dx} = (1+x)y^2

This says: the rate of change is larger when x is larger, and it also increases dramatically as y grows (because of y^2).

Separate:

\frac{1}{y^2}dy = (1+x)dx

Integrate:

\int y^{-2}dy = \int (1+x)dx

So

-\frac{1}{y} = x + \frac{x^2}{2} + C

You might solve for y:

\frac{1}{y} = -x - \frac{x^2}{2} - C

Rename the constant -C as C (still arbitrary):

\frac{1}{y} = C - x - \frac{x^2}{2}

Thus

y = \frac{1}{C - x - \frac{x^2}{2}}

A common algebra mistake here is mishandling the negative sign from integrating y^{-2}.

Exam Focus
  • Typical question patterns
    • “Solve the differential equation \frac{dy}{dx} = g(x)h(y) and express the solution implicitly or explicitly.”
    • “Show that the differential equation is separable, then find the general solution.”
    • “Find an equation of the solution curve that satisfies a given initial condition” (this bridges to the next topic).
  • Common mistakes
    • Dividing by an expression like y and forgetting to check whether y=0 (or another value making the divisor zero) is a solution.
    • Integrating incorrectly, especially forgetting \ln|y| or making sign errors on power rules.
    • Leaving constants on both sides, like \ln|y| + C_1 = \frac{x^2}{2} + C_2, instead of combining into a single constant.

Finding Particular Solutions Using Initial Conditions

A general solution to a differential equation represents a whole family of functions (usually containing an arbitrary constant such as C). A particular solution is one specific function in that family that fits a given situation.

An initial condition gives you a starting point on the solution curve—typically a value of the function at a specific input. In AP Calculus AB, this often looks like

y(x_0) = y_0

or (when the independent variable is time)

y(t_0) = y_0

Initial conditions matter because differential equations typically do not have a unique solution until you specify an initial condition. Intuitively: a slope field gives many curves; the initial condition picks the one passing through the given point.

How initial conditions “choose” the constant

When you solve by separation, you typically end with something like

F(y) = G(x) + C

To apply an initial condition y(x_0)=y_0, you substitute x=x_0 and y=y_0 into that equation and solve for C. Then you substitute back to get the particular solution.

A small strategy note: it’s often easier to apply the initial condition while the solution is still implicit, before doing messy algebra like exponentiating or solving for y. Either approach works, but the implicit approach reduces algebra mistakes.

Worked Example 1: Exponential growth/decay with an initial value

Solve the initial value problem:

\frac{dy}{dx} = 5y

y(0) = 2

Step 1: Separate. For y \neq 0,

\frac{1}{y}dy = 5dx

Step 2: Integrate.

\int \frac{1}{y}dy = \int 5dx

So

\ln|y| = 5x + C

Step 3: Apply the initial condition. Substitute x=0 and y=2:

\ln|2| = 5(0) + C

So

C = \ln 2

Step 4: Write the particular solution.

\ln|y| = 5x + \ln 2

Exponentiate:

|y| = e^{5x}e^{\ln 2}

So

|y| = 2e^{5x}

Because the initial value is positive, the solution stays positive (and you can drop the absolute value for this particular solution):

y = 2e^{5x}

A common mistake is to jump directly to y=Ce^{5x} (which is fine) but then forget that you must use y(0)=2 to determine C.

Worked Example 2: Initial condition leading to a trigonometric explicit solution

Solve:

\frac{dy}{dx} = \frac{x}{1+y^2}

y(0) = 0

Step 1: Separate. Multiply both sides by (1+y^2) and by dx:

(1+y^2)dy = xdx

Step 2: Integrate.

\int (1+y^2)dy = \int xdx

So

y + \frac{y^3}{3} = \frac{x^2}{2} + C

Step 3: Apply the initial condition. Substitute x=0 and y=0:

0 + 0 = 0 + C

So

C = 0

Particular solution (implicit):

y + \frac{y^3}{3} = \frac{x^2}{2}

This is a perfectly valid final answer unless the problem explicitly asks you to solve for y.

Here, solving explicitly for y would require solving a cubic, which is not expected in AB. This is an important exam-awareness point: implicit forms are often the intended endpoint.

Worked Example 3: Logistic growth as a classic separable model

A common AP modeling differential equation is the logistic differential equation, which describes growth that is approximately exponential when the population is small but slows as it approaches a carrying capacity.

A standard form is

\frac{dP}{dt} = kP\left(1-\frac{P}{M}\right)

where:

  • P is the population (dependent variable)
  • t is time (independent variable)
  • k is a positive constant (growth rate parameter)
  • M is the carrying capacity (the limiting population)

Why separation fits: the right-hand side is a product of a function of P and a constant (with respect to t), so it’s separable.

Separate variables. First rewrite:

\frac{dP}{dt} = kP\left(1-\frac{P}{M}\right) = kP\frac{M-P}{M}

So

\frac{dP}{dt} = \frac{k}{M}P(M-P)

Separate:

\frac{1}{P(M-P)}dP = \frac{k}{M}dt

To integrate the left side, you use partial fractions:

\frac{1}{P(M-P)} = \frac{1}{M}\left(\frac{1}{P} + \frac{1}{M-P}\right)

(You can verify by combining the right-hand side over the common denominator P(M-P).)

Then

\int \frac{1}{P(M-P)}dP = \int \frac{1}{M}\left(\frac{1}{P} + \frac{1}{M-P}\right)dP

So

\int \frac{1}{P(M-P)}dP = \frac{1}{M}\left(\ln|P| - \ln|M-P|\right) + C

The right side integrates as:

\int \frac{k}{M}dt = \frac{k}{M}t + C

Set them equal and multiply by M:

\ln|P| - \ln|M-P| = kt + C

Combine logs:

\ln\left|\frac{P}{M-P}\right| = kt + C

Exponentiate:

\left|\frac{P}{M-P}\right| = e^{kt+C}

Rewrite e^C as a positive constant A:

\left|\frac{P}{M-P}\right| = Ae^{kt}

Typically, in population contexts you assume 0