# Modeling situations with differential equations

> AP Calculus AB · AP Calculus AB CED Unit 7
> Source: https://www.owlsprep.com/study/ap-calculus-ab-u7-modeling-situations-with-differential-equations/

This module covers translating contextual descriptions of rates of change into differential equations, classifying DEs by order, and verifying candidate solutions, aligned to AP Calculus AB CED Unit 7 learning objectives.

**Prerequisites:** [Derivative interpretation as instantaneous rate of change](https://www.owlsprep.com/study/ap-calculus-ab-u2-definition-derivative/); Differentiation rules for exponential and composite functions; Basic algebraic rearrangement of equations

## Learning objectives

- Translate verbal/contextual rate descriptions into differential equations
- Classify differential equations by order
- Verify candidate solutions to differential equations
- Apply modeling skills to common real-world contexts

## What Is Modeling with Differential Equations?

A differential equation is any equation that contains one or more derivatives of an unknown function. Modeling with differential equations is the core process of translating verbal, contextual, or graphical descriptions of relationships between a quantity and its rate of change into a formal mathematical equation. This is always the first step in almost all differential equation problems on the AP exam: you cannot solve a differential equation if you cannot write it correctly from the given description.

According to the AP Calculus AB CED, Unit 7 (Differential Equations) makes up 6-12% of the total exam weight, and this specific topic is the gateway to all other differential equation skills in the unit, including slope fields, separation of variables, and exponential growth/decay. It appears in both multiple-choice and free-response questions, almost always as the opening part of a longer FRQ that leads into solving the differential equation or interpreting its solution.

> **info**
>
> This skill is also referred to as "setting up a differential equation" or "translating rate descriptions to DEs" in AP exam wording.

## Translating Contextual Rate Descriptions

The core idea of this skill is that any description of how a quantity changes automatically translates to the derivative of that quantity. The most common scenario is a rate of change proportional to the quantity itself, but you will also see rates proportional to a difference between the quantity and a fixed constant, rates proportional to a power of the quantity, and rates equal to a combination of multiple terms.

1. Explicitly identify your dependent variable (the quantity that changes) and independent variable (almost always time $t$ in AP problems).
2. Translate the phrase "the rate of change of [dependent variable]" directly to the derivative of the dependent variable with respect to the independent variable.
3. "Is proportional to X" always means "equals $k$ times X", where $k>0$ is the constant of proportionality by convention.
4. Add the correct sign: if the quantity is decreasing, the derivative will have a negative sign, even with $k>0$.

**Worked example:** The number of people $N$ infected with a virus in a closed population increases at a rate proportional to the product of the number of infected people and the difference between the total population of 5000 and the number of infected people. Write the differential equation that models this situation.

1. 1. Identify variables: Dependent variable is $N$ (number of infected people at time $t$), independent variable is time $t$.
2. 2. Translate the description: "rate of change of $N$" becomes:
3. $$\frac{dN}{dt}$$
4. The rate is proportional to the product of $N$ and $(5000 - N)$, which becomes $k \cdot N(5000 - N)$.
5. 3. Confirm sign: the problem states $N$ is increasing, so the derivative is positive. All terms are positive for $0 < N < 5000$ with $k>0$, so no negative sign is needed.
6. 4. Final differential equation:
7. $$\frac{dN}{dt} = kN(5000 - N) \quad \text{for } k>0$$

> **Exam tip:** Always translate the problem word-for-word, do not add extra assumptions. If a problem says "the difference between $y$ and 100", write $(y - 100)$, do not swap it to $(100 - y)$ unless the problem explicitly tells you the direction of change.

## Classifying Differential Equations by Order

The order of a differential equation is defined as the order of the highest-order derivative that appears in the equation. For example, a first-order differential equation only contains first derivatives of the unknown function, while a second-order differential equation contains a second derivative. AP Calculus AB almost exclusively works with first-order differential equations, but you are expected to correctly identify the order of any DE, a common trick on MCQs.

> **warning**
>
> A common student confusion is mixing up the order of the derivative with the power the derivative is raised to. For example, $\left(\frac{dy}{dx}\right)^4 + 2y = 0$ is still a first-order differential equation, because the highest derivative is the first derivative — it is just raised to the 4th power. The power does not change the order of the DE.

Order matters because the number of arbitrary constants in the general solution of a DE is equal to the order of the DE, so first-order DEs require one initial condition to find a particular solution, which is the standard AP problem.

**Worked example:** What is the order of the differential equation $\frac{d^2y}{dt^2} - 4t\left(\frac{dy}{dt}\right)^3 + 7y = \cos t$? Justify your answer.

1. 1. Recall: Order is determined by the highest order of any derivative present in the equation, not the power of the derivative.
2. 2. List all derivatives present and their orders: $\frac{dy}{dt}$ is first-order, and $\frac{d^2y}{dt^2}$ is second-order.
3. 3. Note that $\frac{dy}{dt}$ is raised to the 3rd power, but that does not change its order as a first derivative.
4. 4. The highest order derivative present is second-order, so the differential equation is second-order.

> **Exam tip:** When asked for the order, circle every derivative in the DE and write its order next to it, then pick the maximum number. This eliminates the common mistake of confusing order with power.

## Verifying Solutions to Differential Equations

To confirm a given candidate function is a solution to a differential equation, you substitute the function and all its required derivatives into the DE and check that both sides of the equation are equal for all values of the independent variable in the domain. This is a regularly tested skill on both MCQ and FRQ, often as the second part of a question after setting up the DE.

1. Compute all derivatives of the candidate function that appear in the DE (for a first-order DE, you only need the first derivative).
2. Substitute the candidate function $y$ and its derivatives into the left-hand side and right-hand side of the DE.
3. Simplify both sides. If they are identical, the candidate is a solution; if not, it is not.

> **tip**
>
> This works for both general solutions (with an arbitrary constant $C$) and particular solutions (with a fixed value of $C$ from an initial condition). Never waste time solving the DE from scratch to check a solution: the candidate is already given to you.

**Worked example:** Verify that $y = 3e^{2x} + 4x + 1$ is a solution to the differential equation $\frac{dy}{dx} = 2y - 8x - 6$.

1. 1. Compute the first derivative of the candidate solution:
2. $$\frac{dy}{dx} = \frac{d}{dx}\left(3e^{2x} + 4x + 1\right) = 6e^{2x} + 4$$
3. 2. Substitute $y$ into the right-hand side of the DE and simplify:
4. $$2y - 8x - 6 = 2\left(3e^{2x} + 4x + 1\right) - 8x - 6 = 6e^{2x} + 8x + 2 - 8x - 6 = 6e^{2x} - 4$$
5. 3. Compare the left-hand side ($\frac{dy}{dx} = 6e^{2x} + 4$) to the simplified right-hand side. The two sides are not equal.
6. 4. Conclusion: Since $\text{LHS} \neq \text{RHS}$ for all $x$, $y = 3e^{2x} + 4x + 1$ is not a solution to the DE.

**Check your understanding**

Test your understanding with this AP-style multiple choice question:

1. Which of the following is the correct differential equation for the statement: *The acceleration of a particle moving along the $x$-axis is proportional to the displacement $x$ of the particle from the origin, where acceleration is negative when $x$ is positive.* Let displacement $x$ be a function of time $t$, and $k>0$ be a constant.

   - $\frac{dx}{dt} = -kx$
   - $\frac{d^2x}{dt^2} = -kx$
   - $\frac{d^2x}{dt^2} = kx$
   - $\frac{dx}{dt} = kx$

   *Answer:* $\frac{d^2x}{dt^2} = -kx$

   *Why:* Correct: Acceleration is the second derivative of displacement with respect to time, and the negative sign gives the correct required relationship for $k>0$.

> **Exam tip:** Double-check your differentiation and arithmetic when verifying solutions: small sign errors can lead you to incorrectly reject a valid solution or accept an invalid one.

## Common pitfalls

- **Wrong:** Writing $\frac{dV}{dt} = k\sqrt{V}$ for a leaking tank where volume is decreasing, leaving out the negative sign.
  - Why it fails: Students remember "proportional" but forget to account for the direction of change described in the problem.
  - Correct: After writing the proportionality, explicitly ask "is the quantity increasing or decreasing?" Add a negative sign to the derivative if it is decreasing, keeping $k>0$ by convention.
- **Wrong:** Classifying $\left(\frac{d^2y}{dx^2}\right)^3 + \frac{dy}{dx} = 0$ as third-order because the highest derivative is cubed.
  - Why it fails: Students confuse the order of the derivative (how many times you differentiate) with the power the derivative is raised to.
  - Correct: Circle every derivative in the DE, write down what order each is, then pick the maximum number, ignoring powers and coefficients of the derivatives.
- **Wrong:** When verifying a solution, substituting only $y$ into the DE and forgetting to substitute the derivative.
  - Why it fails: Students rush and forget that a DE requires the derivative to be substituted.
  - Correct: Follow the explicit 2-step rule for verification: 1) Compute all required derivatives of the candidate solution first, 2) Substitute both $y$ and all derivatives into the DE before checking equality.
- **Wrong:** Writing $\frac{dy}{dt} = k(100 - y)$ for a problem that says "the rate of change of $y$ is proportional to the difference between $y$ and 100".
  - Why it fails: Students assume $y$ is always approaching 100 so swap the order, but the problem explicitly states the order of the difference.
  - Correct: Translate the phrase word-for-word: "difference between A and B" = $A - B$, unless the problem specifies it is the absolute difference.
- **Wrong:** Writing $\frac{dP}{dt} = P$ when the problem says "rate of change of population $P$ is proportional to $P$", leaving out the constant of proportionality $k$.
  - Why it fails: Students know proportional means multiply, but forget that proportionality requires a constant of proportionality, which is not the variable itself.
  - Correct: Always introduce a constant of proportionality (usually $k$) when the problem says "proportional", unless it explicitly gives the constant in the problem.

## Cheatsheet

| Category | Rule/Formula | Notes |
| --- | --- | --- |
| Rate of change of $y$ proportional to $y$ | $\frac{dy}{dt} = ky$ | $k>0$ = growth, $-k$ = decay; use $k>0$ by convention |
| Rate proportional to difference between $y$ and $C$ | $\frac{dy}{dt} = k(y - C)$ | Translate "difference between A and B" word-for-word |
| Order of a differential equation | = order of highest derivative present | Ignore powers of derivatives, only count how many times differentiated |
| Acceleration as a derivative | $a(t) = \frac{d^2x}{dt^2}$ | Acceleration = second derivative of displacement $x(t)$ |
| Velocity as a derivative | $v(t) = \frac{dx}{dt}$ | Velocity = first derivative of displacement $x(t)$ |
| Verifying a solution | Substitute $y$ + all derivatives into DE | Confirm LHS = RHS; do not solve DE from scratch |
| Logistic growth rate | $\frac{dN}{dt} = kN(a - N)$ | $a$ = carrying capacity, $k>0$ = growth constant |

## What's next

Modeling with differential equations is the foundational prerequisite for every other topic in Unit 7: you cannot draw a slope field, separate variables to solve a DE, or find a particular solution from an initial condition if you cannot first correctly write the DE from the given problem description. This topic also builds on your derivative interpretation skills from earlier units and connects directly to exponential growth and decay models, which are a frequent AP FRQ topic. Without mastering the skills in this module, you will lose easy points on the opening part of almost every differential equation FRQ, and will struggle to solve the rest of the problem even if you know separation of variables.

- [Verifying solutions for differential equations](https://www.owlsprep.com/study/ap-calculus-ab-u7-verifying-solutions-for-differential-equations/)
- [Sketching Slope Fields](https://www.owlsprep.com/study/ap-calculus-ab-u7-sketching-slope-fields/)
- [Reasoning using slope fields](https://www.owlsprep.com/study/ap-calculus-ab-u7-reasoning-using-slope-fields/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ap-calculus-ab-u7-modeling-situations-with-differential-equations/
