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 yy as a function of xx) to its derivative(s) (like dydx\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 yy-stuff (terms involving yy and dydy) is on one side, and
  • all the xx-stuff (terms involving xx and dxdx) 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

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

or equivalently

1h(y)dydx=g(x)\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:

1h(y)dy=g(x)dx\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 xx) times (function of yy),” 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 yy with respect to xxdydx\frac{dy}{dx}Most common in separation of variables
derivative of yy with respect to xxyy'Equivalent to dydx\frac{dy}{dx}
derivative of yy with respect to ttdydt\frac{dy}{dt}Common in modeling with time
derivative of PP with respect to ttdPdt\frac{dP}{dt}Emphasizes dependent variable PP

A key mindset shift: in separation of variables, you often treat dydx\frac{dy}{dx} like a fraction to move dxdx and dydy 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 xx and a function of yy?
  2. Algebraically separate. Rearrange so that all factors involving yy are with dydy and all factors involving xx are with dxdx.
  3. Integrate both sides.
  4. Combine constants correctly. You only need one arbitrary constant in the final general solution.
  5. Solve for yy if asked (optional). Sometimes the AP question accepts an implicit form; sometimes it requests explicit y=y=.

A typical separation step looks like:

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

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

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

Then integrate:

1h(y)dy=g(x)dx\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 yy (like yy itself). If that expression can be zero, you must consider whether you accidentally threw away a solution.

Example: If

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

you might divide by yy to get

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

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

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

Logs and absolute values

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

Remember:

1ydy=lny+C\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 yy on the relevant interval.

Worked Example 1: Solving a basic separable equation

Solve for the general solution:

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

Step 1: Separate. For y0y \neq 0, divide by yy and multiply by dxdx:

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

Step 2: Integrate.

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

So

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

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

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}}

Absorb the sign into a new nonzero constant AA:

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

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

So the general solution can be written as

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

where AA is any real constant.

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

Solve:

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

Step 1: Separate. Multiply by y2y^2 and by dxdx:

y2dy=(x2+1)dxy^2dy = (x^2+1)dx

Step 2: Integrate.

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

So

y33=x33+x+C\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:

y3=x3+3x+Cy^3 = x^3 + 3x + C

You could solve explicitly:

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

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

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

Suppose a quantity yy changes according to

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

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

Separate:

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

Integrate:

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

So

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

You might solve for yy:

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

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

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

Thus

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

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

Exam Focus
  • Typical question patterns
    • “Solve the differential equation dydx=g(x)h(y)\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 yy and forgetting to check whether y=0y=0 (or another value making the divisor zero) is a solution.
    • Integrating incorrectly, especially forgetting lny\ln|y| or making sign errors on power rules.
    • Leaving constants on both sides, like lny+C1=x22+C2\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 CC). 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(x0)=y0y(x_0) = y_0

or (when the independent variable is time)

y(t0)=y0y(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)+CF(y) = G(x) + C

To apply an initial condition y(x0)=y0y(x_0)=y_0, you substitute x=x0x=x_0 and y=y0y=y_0 into that equation and solve for CC. 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 yy. 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:

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

y(0)=2y(0) = 2

Step 1: Separate. For y0y \neq 0,

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

Step 2: Integrate.

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

So

lny=5x+C\ln|y| = 5x + C

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

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

So

C=ln2C = \ln 2

Step 4: Write the particular solution.

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

Exponentiate:

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

So

y=2e5x|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=2e5xy = 2e^{5x}

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

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

Solve:

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

y(0)=0y(0) = 0

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

(1+y2)dy=xdx(1+y^2)dy = xdx

Step 2: Integrate.

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

So

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

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

0+0=0+C0 + 0 = 0 + C

So

C=0C = 0

Particular solution (implicit):

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

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

Here, solving explicitly for yy 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

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

where:

  • PP is the population (dependent variable)
  • tt is time (independent variable)
  • kk is a positive constant (growth rate parameter)
  • MM is the carrying capacity (the limiting population)

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

Separate variables. First rewrite:

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

So

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

Separate:

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

To integrate the left side, you use partial fractions:

1P(MP)=1M(1P+1MP)\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(MP)P(M-P).)

Then

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

So

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

The right side integrates as:

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

Set them equal and multiply by MM:

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

Combine logs:

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

Exponentiate:

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

Rewrite eCe^C as a positive constant AA:

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

Typically, in population contexts you assume 0<P<M0<P<M, so PMP\frac{P}{M-P} is positive and you can drop the absolute value:

PMP=Aekt\frac{P}{M-P} = Ae^{kt}

Solve for PP:

P=Aekt(MP)P = Ae^{kt}(M-P)

P=AMektAektPP = AM e^{kt} - A e^{kt}P

P+AektP=AMektP + A e^{kt}P = AM e^{kt}

P(1+Aekt)=AMektP(1 + A e^{kt}) = AM e^{kt}

P=AMekt1+AektP = \frac{AM e^{kt}}{1 + A e^{kt}}

A common equivalent form is obtained by dividing numerator and denominator by AektA e^{kt}:

P=M1+1AektP = \frac{M}{1 + \frac{1}{A}e^{-kt}}

Renaming 1A\frac{1}{A} as BB gives the widely recognized logistic solution:

P=M1+BektP = \frac{M}{1 + Be^{-kt}}

Applying an initial condition. If you are given P(0)=P0P(0)=P_0, then

P0=M1+BP_0 = \frac{M}{1 + B}

So

B=MP01B = \frac{M}{P_0} - 1

This gives a fully determined particular solution.

Two important constant solutions also exist in the logistic model: P=0P=0 and P=MP=M. These can be lost if you divide by P(MP)P(M-P) without noting them.

Common conceptual errors when using initial conditions
  1. Plugging in the initial condition too late and creating algebra traps. If you exponentiate early, you can accidentally mishandle absolute values or constants.
  2. Forgetting what the initial condition means. y(1)=3y(1)=3 means “when x=1x=1, y=3y=3,” so you must substitute both values.
  3. Using multiple constants. After integrating both sides, you should combine constants into one. If you keep C1C_1 and C2C_2, it’s easy to apply the initial condition incorrectly.
Interpreting the particular solution

Once you have a particular solution, you can connect it back to the behavior of the differential equation:

  • If dydx\frac{dy}{dx} is proportional to yy, the solution behaves exponentially.
  • If dydx\frac{dy}{dx} contains y2y^2 or other powers, solutions may “blow up” (become unbounded) in finite time depending on the initial condition.
  • If the model includes factors like (MP)(M-P), growth slows near P=MP=M, reflecting a limiting value.

These interpretations are often tested qualitatively: you might be asked whether the solution is increasing, whether it levels off, or what happens as tt \to \infty.

Exam Focus
  • Typical question patterns
    • “Solve the differential equation and use the initial condition y(a)=by(a)=b to find the particular solution.”
    • “Find the value of the constant CC in the general solution that satisfies the given initial condition.”
    • “A model is given by dPdt=\frac{dP}{dt}=\dots; find P(t)P(t) given P(0)=P0P(0)=P_0” (often logistic or exponential-style).
  • Common mistakes
    • Dropping absolute values in lny\ln|y| without justification (you can often drop them only after the initial condition tells you the sign).
    • Solving for CC incorrectly because you substitute only xx or only yy, not both.
    • Losing equilibrium solutions (like y=0y=0 or P=MP=M) when you divide during separation; you should check for constant solutions before dividing by an expression involving the dependent variable.