AP Calculus BC Unit 7 Notes: Solving Differential Equations (Separable, Exponential, Logistic)

Separation of Variables: General and Particular Solutions

A differential equation is an equation that relates a function to one or more of its derivatives. In AP Calculus, you most often see first-order differential equations, where the derivative looks like dydx\frac{dy}{dx} or dPdt\frac{dP}{dt}. Solving a differential equation means finding a function (or family of functions) whose derivative behavior matches the equation.

A powerful and commonly testable technique is separation of variables. You use it when the differential equation can be rearranged so that all the yy-terms are on one side and all the xx-terms are on the other side. Once separated, you integrate both sides to “undo” the derivatives.

What “separable” means (and why it matters)

A first-order differential equation is separable if it can be written (or rearranged) in the form

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

where g(x)g(x) is a function of xx only and h(y)h(y) is a function of yy only. This matters because it lets you treat the derivative as a fraction (with care) and move factors around:

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

and then

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

At that point, each side involves only one variable, so you can integrate both sides.

Conceptually, separation of variables works because you’re rewriting the statement “the rate of change of yy depends on both xx and yy” into a form where changes in yy can be matched to changes in xx through integrals.

General solution vs. particular solution

When you integrate, you introduce an arbitrary constant. That’s because many different functions can have the same derivative “pattern” except for a vertical shift or scaling.

  • A general solution is a whole family of solutions that includes an arbitrary constant (often CC).
  • A particular solution is the single solution you get after using an initial condition, like y(0)=5y(0)=5, to determine that constant.

In AP questions, you’re often expected to find the general solution first, then apply an initial condition to produce the particular solution.

The standard separation procedure (mechanism)

Suppose you’re given a separable differential equation.

  1. Rewrite the equation so that you clearly see which parts depend on xx and which depend on yy.
  2. Separate: move all yy expressions (including dydy) to one side and all xx expressions (including dxdx) to the other.
  3. Integrate both sides.
  4. Combine constants into a single constant CC.
  5. Solve for yy if possible (sometimes an implicit solution is acceptable or even expected).
  6. Apply the initial condition (if given) to find the particular solution.

A common point of confusion: you’ll sometimes see an implicit step where dydx\frac{dy}{dx} is treated like a fraction. This is justified here because the separation comes from algebraic manipulation consistent with the chain rule, but you still need to separate correctly before integrating.

Important notation (so you don’t get tripped up)

In calculus, the derivative can be written in different ways. These are equivalent when yy depends on xx:

MeaningCommon notationAnother common notation
derivative of yy with respect to xxdydx\frac{dy}{dx}yy'
derivative of PP with respect to ttdPdt\frac{dP}{dt}PP'

On the AP exam, dydx\frac{dy}{dx} and Leibniz notation are common in differential equations because they make separation more visually natural.

Example 1: Solving a separable differential equation (general solution)

Solve

dydx=xy2\frac{dy}{dx} = xy^2

Step 1: Separate variables. Put all yy terms with dydy and all xx terms with dxdx.

1y2dy=xdx\frac{1}{y^2}dy = xdx

Step 2: Integrate both sides.

y2dy=xdx\int y^{-2}dy = \int xdx

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

Step 3: Solve for yy.

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

Multiply by 1-1 and absorb the sign into the constant (renaming constants is allowed):

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

Invert:

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

This is a general solution because it contains an arbitrary constant CC.

What can go wrong here: forgetting that y2dy=y1+C\int y^{-2}dy = -y^{-1}+C (the negative sign is easy to miss), or incorrectly integrating xdx\int xdx.

Example 2: Particular solution using an initial condition

Solve the initial value problem

dydx=xy\frac{dy}{dx} = xy

with y(0)=3y(0)=3.

Separate:

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

Integrate:

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

A key detail: 1ydy=lny+C\int \frac{1}{y}dy = \ln|y| + C, not ln(y)\ln(y) without absolute value.

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

Exponentiate to solve for yy:

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

Rewrite eCe^C as a positive constant KK:

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

This implies

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

where AA can be any nonzero real constant (positive or negative), which accounts for the absolute value.

Apply the initial condition y(0)=3y(0)=3:

3=Ae03 = Ae^{0}

A=3A=3

So the particular solution is

y=3ex22y = 3e^{\frac{x^2}{2}}

What can go wrong here: dropping the absolute value too early and accidentally excluding negative solutions, or mishandling exponent rules when solving for yy.

A subtle but important point: equilibrium (constant) solutions

Sometimes you divide by an expression involving yy to separate variables. If that expression can be zero, you may accidentally lose solutions.

For example, if

dydx=y(1y)\frac{dy}{dx} = y(1-y)

and you divide by y(1y)y(1-y), you are assuming y0y \neq 0 and y1y \neq 1. But y=0y=0 and y=1y=1 are actually valid constant (equilibrium) solutions because they make dydx=0\frac{dy}{dx}=0 everywhere.

A good habit: before dividing by something involving yy, quickly ask, “Could that be zero? If so, does it create a constant solution?”

Exam Focus
  • Typical question patterns:
    • “Solve the differential equation” followed by “use y(a)=by(a)=b to find the particular solution.”
    • “Find yy as a function of xx” and then evaluate yy at a new input.
    • “Show that the solution can be written as …” (often expecting separation, integration, and algebraic rearrangement).
  • Common mistakes:
    • Forgetting the constant of integration CC or failing to use the initial condition to determine it.
    • Incorrect integration, especially 1ydy\int \frac{1}{y}dy and negative exponents.
    • Dividing by a factor like yy and losing an equilibrium solution (not always tested, but it’s a classic trap).

Exponential Models with Differential Equations

An exponential growth/decay model is based on the idea that the rate of change of a quantity is proportional to the amount present. This is one of the most important modeling ideas in calculus because it turns a real-world statement about “rate” into a differential equation you can solve.

The core idea: “proportional to the amount present”

If y(t)y(t) is a quantity depending on time tt, “the rate of change is proportional to the amount present” translates to

dydt=ky\frac{dy}{dt} = ky

Here:

  • y(t)y(t) is the amount at time tt.
  • kk is a constant of proportionality.
    • k>0k>0 means growth.
    • k<0k<0 means decay.
  • Units: kk has units of “per unit time” (for example, per year).

This differential equation is separable, so you can solve it with the method from the previous section.

Solving the exponential differential equation

Start with

dydt=ky\frac{dy}{dt} = ky

Separate variables:

1ydy=kdt\frac{1}{y}dy = kdt

Integrate:

1ydy=kdt\int \frac{1}{y}dy = \int kdt

lny=kt+C\ln|y| = kt + C

Exponentiate:

y=ekt+C|y| = e^{kt+C}

Rewrite eCe^C as a positive constant AA:

y=Aekt|y| = Ae^{kt}

So

y=Cekty = Ce^{kt}

where CC can be any nonzero real constant. In most applied settings, yy represents a positive amount, so you usually take C>0C>0.

Why initial conditions matter in models

In modeling problems, you rarely want the whole family y=Cekty=Ce^{kt}. You want the specific model that matches the initial amount:

If y(0)=y0y(0)=y_0, then

y0=Ce0y_0 = Ce^{0}

C=y0C=y_0

so

y(t)=y0ekty(t) = y_0e^{kt}

This gives a clear interpretation: y0y_0 is the starting amount, and kk controls how quickly it grows or decays.

Doubling time and half-life (how they connect)

Even when a problem doesn’t explicitly ask for kk, you may be given a doubling time (growth) or half-life (decay). These come from solving for the time when the amount is multiplied by a factor.

If y(t)=y0ekty(t)=y_0e^{kt}:

  • Doubling time TdT_d satisfies 2y0=y0ekTd2y_0 = y_0e^{kT_d}, so

2=ekTd2 = e^{kT_d}

ln2=kTd\ln 2 = kT_d

Td=ln2kT_d = \frac{\ln 2}{k}

  • Half-life T1/2T_{1/2} satisfies 12y0=y0ekT1/2\frac{1}{2}y_0 = y_0e^{kT_{1/2}}, so

12=ekT1/2\frac{1}{2} = e^{kT_{1/2}}

ln(12)=kT1/2\ln\left(\frac{1}{2}\right) = kT_{1/2}

T1/2=ln(12)kT_{1/2} = \frac{\ln\left(\frac{1}{2}\right)}{k}

For decay, k<0k<0, which makes T1/2T_{1/2} positive as expected.

Example 1: Find an exponential model from data

A population follows dPdt=kP\frac{dP}{dt} = kP. You are told P(0)=500P(0)=500 and P(3)=800P(3)=800. Find P(t)P(t).

From the general solution,

P(t)=CektP(t) = Ce^{kt}

Use P(0)=500P(0)=500:

500=Ce0500 = Ce^{0}

C=500C=500

So

P(t)=500ektP(t)=500e^{kt}

Use P(3)=800P(3)=800:

800=500e3k800 = 500e^{3k}

85=e3k\frac{8}{5} = e^{3k}

Take natural log:

ln(85)=3k\ln\left(\frac{8}{5}\right)=3k

k=13ln(85)k=\frac{1}{3}\ln\left(\frac{8}{5}\right)

Therefore,

P(t)=500e(13ln(85))tP(t)=500e^{\left(\frac{1}{3}\ln\left(\frac{8}{5}\right)\right)t}

It’s common (and often cleaner) to rewrite using exponent properties:

P(t)=500(eln(85))t/3P(t)=500\left(e^{\ln\left(\frac{8}{5}\right)}\right)^{t/3}

Since eln(a)=ae^{\ln(a)}=a for a>0a>0,

P(t)=500(85)t/3P(t)=500\left(\frac{8}{5}\right)^{t/3}

Both forms are equivalent. AP problems usually accept either, as long as it’s correct.

Example 2: Interpreting the constant kk

Suppose a substance decays according to dAdt=kA\frac{dA}{dt}=kA. If k=0.2k=-0.2 (per day), then

A(t)=A0e0.2tA(t)=A_0e^{-0.2t}

The negative sign tells you the amount decreases, and the magnitude 0.20.2 controls how quickly. A common mistake is to write A(t)=A0e0.2tA(t)=A_0e^{0.2t} just because you associate exponentials with growth—always check the sign of kk.

Exam Focus
  • Typical question patterns:
    • Given dydt=ky\frac{dy}{dt}=ky with one or two data points, find y(t)y(t) or find kk.
    • Given a half-life or doubling time, write an exponential function and use it to predict a future value.
    • Interpret the meaning of kk in context (growth rate vs. decay rate, units).
  • Common mistakes:
    • Forgetting that the solution is y=Cekty=Ce^{kt} (not y=Cety=Ce^{t} unless k=1k=1).
    • Using base-10 logs instead of natural logs when solving for kk.
    • Losing the sign: decay requires k<0k<0, and that affects algebra and interpretation.

Logistic Models with Differential Equations

Exponential models assume “more present means proportionally faster growth,” forever. That’s often unrealistic—populations run out of resources, infections slow as fewer susceptible people remain, and growth levels off. The logistic model modifies exponential growth by building in a limiting value called a carrying capacity.

The key idea: growth slows as you approach a maximum

A standard logistic differential equation is

dPdt=kP(1PL)\frac{dP}{dt} = kP\left(1-\frac{P}{L}\right)

where:

  • P(t)P(t) is the population (or quantity).
  • k>0k>0 is a growth constant.
  • L>0L>0 is the carrying capacity, the long-term maximum sustainable value.

The factor (1PL)\left(1-\frac{P}{L}\right) is the “slowdown” term:

  • If PP is small compared to LL, then PL\frac{P}{L} is near 0, so 1PL1-\frac{P}{L} is near 1, and the equation behaves almost like exponential growth dPdtkP\frac{dP}{dt} \approx kP.
  • If PP is close to LL, then 1PL1-\frac{P}{L} is near 0, so growth slows dramatically.
  • If P>LP > L, then 1PL1-\frac{P}{L} becomes negative, making dPdt<0\frac{dP}{dt}<0, so the model pushes the population back down toward LL.

This built-in feedback is why logistic growth tends to level off.

Equilibrium solutions and what they mean

Set dPdt=0\frac{dP}{dt}=0:

kP(1PL)=0kP\left(1-\frac{P}{L}\right)=0

This happens when:

P=0P=0

or

1PL=01-\frac{P}{L}=0

which gives

P=LP=L

So the logistic model has two equilibrium (constant) solutions: P(t)=0P(t)=0 and P(t)=LP(t)=L.

In many contexts, P=0P=0 is an unstable equilibrium (tiny positive populations grow away from 0), while P=LP=L is stable (solutions approach it). You don’t usually need formal stability analysis in AP Calculus, but you should be able to interpret that LL is the long-term limiting value.

Solving the logistic differential equation (separation of variables)

Because it’s separable, you can solve it analytically.

Start with

dPdt=kP(1PL)\frac{dP}{dt} = kP\left(1-\frac{P}{L}\right)

Rewrite the right-hand side in a form that’s easier to separate:

dPdt=kP(LPL)\frac{dP}{dt} = kP\left(\frac{L-P}{L}\right)

dPdt=kLP(LP)\frac{dP}{dt} = \frac{k}{L}P(L-P)

Separate variables:

1P(LP)dP=kLdt\frac{1}{P(L-P)}dP = \frac{k}{L}dt

To integrate the left side, you use partial fractions:

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

So

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

Integrate term-by-term (and be careful: 1LPdP=lnLP+C\int \frac{1}{L-P}dP = -\ln|L-P| + C because the derivative of LPL-P is 1-1):

1L(lnPlnLP)=kLt+C\frac{1}{L}\left(\ln|P| - \ln|L-P|\right) = \frac{k}{L}t + C

Multiply both sides by LL:

lnPlnLP=kt+C\ln|P| - \ln|L-P| = kt + C

Combine logs:

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

Exponentiate:

PLP=ekt+C\left|\frac{P}{L-P}\right| = e^{kt+C}

Let A=eC>0A=e^C>0 and absorb sign into a new constant (in typical population contexts 0<P<L0<P<L so the fraction is positive anyway):

PLP=Aekt\frac{P}{L-P} = Ae^{kt}

Solve for PP:

P=Aekt(LP)P = Ae^{kt}(L-P)

P=ALektAektPP = ALe^{kt} - Ae^{kt}P

P+AektP=ALektP + Ae^{kt}P = ALe^{kt}

P(1+Aekt)=ALektP(1+Ae^{kt}) = ALe^{kt}

P=ALekt1+AektP = \frac{ALe^{kt}}{1+Ae^{kt}}

A common equivalent form divides numerator and denominator by AektAe^{kt}:

P=L1+BektP = \frac{L}{1+Be^{-kt}}

where B=1AB=\frac{1}{A}. This form is often easiest for applying an initial condition.

Applying an initial condition in the logistic model

If P(0)=P0P(0)=P_0, use

P(0)=L1+Be0P(0) = \frac{L}{1+Be^{0}}

P0=L1+BP_0 = \frac{L}{1+B}

Solve for BB:

1+B=LP01+B = \frac{L}{P_0}

B=LP01B = \frac{L}{P_0}-1

So the particular solution can be written as

P(t)=L1+(LP01)ektP(t)=\frac{L}{1+\left(\frac{L}{P_0}-1\right)e^{-kt}}

This is a great form to remember because it directly shows how P0P_0 sets the curve.

Shape facts you’re expected to understand (not just the formula)

The logistic model has a characteristic S-shape when 0<P0<L0<P_0<L:

  • Early on, growth is almost exponential.
  • Growth speeds up until a point, then slows.
  • The population approaches LL asymptotically.

A particularly important, testable idea: the growth rate dPdt\frac{dP}{dt} is maximized when P=L2P=\frac{L}{2}. You can see this without heavy calculus by noticing P(LP)P(L-P) is a parabola in PP with its maximum at the midpoint.

That midpoint is also the inflection point of the logistic solution curve (where concavity changes), which sometimes appears in interpretation questions.

Example 1: Logistic model with an initial condition

A population follows

dPdt=0.4P(1P1000)\frac{dP}{dt} = 0.4P\left(1-\frac{P}{1000}\right)

and P(0)=100P(0)=100. Write P(t)P(t).

Here k=0.4k=0.4 and L=1000L=1000, so

P(t)=L1+BektP(t)=\frac{L}{1+Be^{-kt}}

P(t)=10001+Be0.4tP(t)=\frac{1000}{1+Be^{-0.4t}}

Use P(0)=100P(0)=100:

100=10001+B100 = \frac{1000}{1+B}

1+B=101+B = 10

B=9B=9

So

P(t)=10001+9e0.4tP(t)=\frac{1000}{1+9e^{-0.4t}}

Common pitfall: mixing up where the negative sign goes. The standard approach with k>0k>0 leads to ekte^{-kt} in the denominator form; if you instead keep ekte^{kt}, your constant will change form, but the final model should still behave correctly (increasing toward LL when P0<LP_0<L).

Example 2: When does the population reach a certain size?

Using

P(t)=10001+9e0.4tP(t)=\frac{1000}{1+9e^{-0.4t}}

find when P(t)=500P(t)=500.

Set up the equation:

500=10001+9e0.4t500 = \frac{1000}{1+9e^{-0.4t}}

Invert both sides:

1500=1+9e0.4t1000\frac{1}{500} = \frac{1+9e^{-0.4t}}{1000}

Multiply by 1000:

2=1+9e0.4t2 = 1+9e^{-0.4t}

1=9e0.4t1 = 9e^{-0.4t}

19=e0.4t\frac{1}{9} = e^{-0.4t}

Take natural log:

ln(19)=0.4t\ln\left(\frac{1}{9}\right) = -0.4t

t=ln(9)0.4t = \frac{\ln(9)}{0.4}

This is a typical AP-style “solve for time” step after building the model.

What goes wrong most often in logistic algebra

Logistic solutions are algebra-heavy, so many errors are not calculus errors—they’re equation-solving errors.

Common issues include:

  • Losing parentheses when solving for PP (for example, distributing incorrectly when you have P(1+Aekt)P(1+Ae^{kt})).
  • Sign mistakes in the logarithm step, especially with lnLP\ln|L-P|.
  • Forgetting that equilibrium solutions P=0P=0 and P=LP=L exist even though separation divides by P(LP)P(L-P).
Exam Focus
  • Typical question patterns:
    • Given a logistic differential equation, solve for P(t)P(t) using an initial condition.
    • Interpret parameters: identify the carrying capacity LL and explain what it means in context.
    • Solve for the time when PP hits a threshold, or find when the growth rate is greatest (often at P=L2P=\frac{L}{2}).
  • Common mistakes:
    • Treating logistic growth as exponential and predicting it grows without bound.
    • Dropping equilibrium solutions by dividing by PP or LPL-P without noting P=0P=0 or P=LP=L.
    • Incorrect partial fraction setup or missing the negative sign in 1LPdP\int \frac{1}{L-P}dP.