Differential Equations in Context: Modeling and Slope Fields (AP Calc AB Unit 7)
Modeling Situations with Differential Equations
A differential equation is an equation that relates an unknown function to one or more of its derivatives. In AP Calculus AB, you usually work with first-order differential equations, meaning the highest derivative that appears is first derivative. A typical form looks like:
\frac{dy}{dx} = f(x,y)
What modeling with differential equations means (and why you do it)
When you “model” a real situation with a differential equation, you are not trying to guess a formula for y right away. Instead, you describe how y changes.
That’s powerful because many real processes are easier to describe by their rate of change than by an explicit formula. For example:
- A population might grow at a rate proportional to how many individuals exist.
- A tank’s salt content might change at a rate equal to “salt in minus salt out.”
- A falling object’s velocity changes due to gravity (and maybe air resistance).
In each case, you can often write a sentence like “the rate of change of y is …” and translate it into an equation involving \frac{dy}{dt}.
A key mindset shift: differential equations model local behavior. They tell you the slope (instantaneous change) at each moment or position, not the whole story all at once.
Translating words into a differential equation
Most modeling problems in this scope follow a consistent pattern:
- Choose variables: Decide what y represents and what the independent variable is (often t for time).
- Write a rate statement: Express the meaning of \frac{dy}{dt} in words.
- Translate each part into math: Use proportionality, known rates, or “in minus out.”
- (Often) include an initial condition: A starting value like y(0) = y_0 creates an initial value problem (IVP).
Common derivative notation you may see:
| Meaning | Notation | Notes |
|---|---|---|
| Derivative of y with respect to x | \frac{dy}{dx} | Common when independent variable is x |
| Derivative of y with respect to t | \frac{dy}{dt} | Common in time-based models |
| Derivative of y (Leibniz alternative) | y' | Equivalent to \frac{dy}{dx} when variable is x |
Be careful: the symbol y' depends on context; if the independent variable is t, then y' means \frac{dy}{dt}.
Proportionality models
A very common modeling phrase is “proportional to.”
- “The rate of change of y is proportional to y” translates to:
\frac{dy}{dt} = ky
Here, k is a constant of proportionality. If k > 0 you get growth; if k < 0 you get decay.
Another common phrase:
- “The rate of change of y is proportional to the difference between y and a limiting value L” translates to:
\frac{dy}{dt} = k(L - y)
This kind of model shows up when something approaches an equilibrium.
“In minus out” (accumulation) models
For quantities that accumulate (like volume in a tank, salt amount, or money in an account with deposits/withdrawals), the core structure is:
\frac{dQ}{dt} = (\text{rate in}) - (\text{rate out})
- Q is the amount of “stuff” you’re tracking.
- Each “rate” must be in units of Q per unit time.
A common mistake is mixing up “amount” and “concentration.” If concentration is \frac{\text{mass}}{\text{volume}}, and flow rate is \frac{\text{volume}}{\text{time}}, then:
\text{mass rate} = (\text{concentration})(\text{flow rate})
Worked example 1: Proportional growth
Situation: A bacteria culture grows at a rate proportional to its current population. Let P(t) be the population at time t hours. Suppose the constant of proportionality is 0.4.
Build the model: “Rate of change proportional to population” means:
\frac{dP}{dt} = 0.4P
If you’re also told P(0)=500, then you have an IVP:
\frac{dP}{dt} = 0.4P
P(0)=500
Notice you have not solved it yet; the modeling step is producing the differential equation (and initial condition).
Worked example 2: Mixing problem (setting up the DE)
Situation: A tank contains 100 liters of water with 5 kg of salt dissolved. Brine with concentration 0.2 kg/L flows in at 3 L/min. The mixture is well-stirred and flows out at 3 L/min.
Let S(t) be the amount of salt (kg) at time t minutes.
- Volume stays 100 L (inflow equals outflow).
- Salt in rate:
\text{rate in} = (0.2)(3) = 0.6
Units: kg/min.
- Salt out rate: concentration in tank is \frac{S(t)}{100} kg/L, outflow is 3 L/min, so:
\text{rate out} = \frac{S(t)}{100} \cdot 3 = \frac{3}{100}S(t)
So the differential equation is:
\frac{dS}{dt} = 0.6 - \frac{3}{100}S
And the initial condition is:
S(0)=5
A frequent error here is to write rate out as 3S (forgetting to divide by volume) or to treat S as concentration rather than amount.
What “autonomous” means (useful for slope fields later)
A differential equation is autonomous if it does not explicitly involve the independent variable. For example:
\frac{dy}{dt} = y(1-y)
This matters because autonomous equations produce slope fields where slopes depend only on y, creating horizontal “bands” of equal slope.
Exam Focus
- Typical question patterns
- Translate a verbal description into a differential equation (often proportionality or “in minus out”) and state an initial condition.
- Identify what each term represents physically (what is “in,” what is “out,” what does the constant mean).
- Determine whether a model predicts increase/decrease based on sign of \frac{dy}{dt}.
- Common mistakes
- Confusing amount with rate: writing Q where \frac{dQ}{dt} is needed, or mixing units.
- Forgetting that outflow mass rate requires concentration times flow rate.
- Not stating the initial condition when it is given (or misreading what time corresponds to the starting value).
Verifying Solutions for Differential Equations
Verifying a solution means checking whether a proposed function actually satisfies a differential equation (and, if present, an initial condition). This is a core skill because in many problems you are given a candidate solution and asked to justify it without re-solving the differential equation from scratch.
What it means to “satisfy” a differential equation
Suppose you are given:
\frac{dy}{dx} = f(x,y)
A function y=g(x) is a **solution** on an interval if, when you compute \frac{dy}{dx} from g(x) and substitute y=g(x) into the right-hand side, the equation becomes true for all x in that interval.
In practice, verifying is a substitution-and-simplify process.
If you also have an initial condition, such as:
y(x_0)=y_0
then the function must satisfy that as well to solve the initial value problem.
Why verification matters
- Error-checking: If you solved a differential equation and got an answer, verification is how you confirm you didn’t separate variables incorrectly, drop a constant, or make an algebra slip.
- Understanding models: In applied settings, a proposed formula might come from data-fitting. Verification checks whether it’s consistent with the model’s rate law.
- Multiple solutions: Many differential equations have families of solutions. The initial condition selects the correct one.
How to verify a proposed solution (step-by-step)
When you are given y=g(x) and \frac{dy}{dx} = f(x,y):
- Differentiate g(x) to find g'(x).
- Compute the right-hand side by plugging x and y=g(x) into f(x,y).
- Compare: check whether g'(x) = f(x,g(x)).
- Check the initial condition if one is provided.
A subtle but important point: if the function involves a logarithm, square root, or denominator, you may need to consider the interval/domain where the function is defined. AP questions typically keep domains straightforward, but it’s good to notice restrictions.
Worked example 1: Verifying a solution
Differential equation:
\frac{dy}{dx} = x(1+y)
Proposed solution:
y = e^{x^2/2} - 1
Step 1: Differentiate y.
\frac{dy}{dx} = \frac{d}{dx}\left(e^{x^2/2} - 1\right) = e^{x^2/2} \cdot x
Step 2: Compute the right-hand side x(1+y) using the proposed y.
First find 1+y:
1+y = 1 + (e^{x^2/2} - 1) = e^{x^2/2}
So:
x(1+y) = x e^{x^2/2}
Step 3: Compare.
Left side derivative is x e^{x^2/2} and right side is x e^{x^2/2}, so the function satisfies the differential equation.
Worked example 2: Verifying an initial value problem
Differential equation:
\frac{dy}{dt} = -0.3y
Initial condition:
y(0)=12
Proposed solution:
y = 12e^{-0.3t}
Differentiate:
\frac{dy}{dt} = 12e^{-0.3t}(-0.3) = -0.3(12e^{-0.3t})
But 12e^{-0.3t} is exactly y, so:
\frac{dy}{dt} = -0.3y
Now check the initial condition:
y(0)=12e^0=12
So it satisfies both the differential equation and the initial condition.
What commonly goes wrong when verifying
- Not substituting for y: Students sometimes compute f(x,y) but forget to replace y with the proposed expression.
- Chain rule errors: Many solutions involve exponentials like e^{g(x)}; missing the factor g'(x) is a classic mistake.
- Checking only at one point: Verification is not “plug in one value.” You must show equality as expressions (unless the problem explicitly asks to check at a particular point, which is less common).
Exam Focus
- Typical question patterns
- Given \frac{dy}{dx} = f(x,y) and a proposed y=g(x), show it satisfies the differential equation by substitution.
- Given a general solution with a constant, use an initial condition to determine the constant, then verify.
- Identify whether a given function is a solution to a differential equation on a stated interval.
- Common mistakes
- Differentiation slips, especially with product rule and chain rule.
- Verifying the differential equation but forgetting to check the initial condition.
- Algebra errors when simplifying both sides to see they match.
Sketching and Interpreting Slope Fields
A slope field (also called a direction field) is a graphical way to represent a differential equation of the form:
\frac{dy}{dx} = f(x,y)
Instead of graphing a single solution curve, you draw many short line segments throughout the xy-plane. Each segment has slope equal to f(x,y) at that point. The slope field tells you, visually, how any solution curve would move through the plane.
Why slope fields matter
- They show behavior without solving: Many differential equations are difficult (or impossible in this course) to solve explicitly, but a slope field still shows trends like growth, decay, leveling off, or blowing up.
- They connect calculus to differential equations: You are literally seeing the derivative as slope everywhere, not just along one curve.
- They help approximate solutions: Starting from an initial condition, you can sketch the solution curve that follows the field.
How to sketch a slope field (the mechanics)
Given \frac{dy}{dx} = f(x,y):
- Pick a grid of points (usually the graph provides it).
- At each point (x,y) , compute the slope m = f(x,y).
- Draw a short segment through the point with that slope.
You do not draw long lines; the short segments are meant to guide the eye.
Quick slope interpretation cues
- If f(x,y) = 0, segments are horizontal.
- If f(x,y) > 0, segments slope upward to the right.
- If f(x,y) < 0, segments slope downward to the right.
- Large magnitude values of f(x,y) produce steeper segments.
Worked example 1: Building a few segments
Consider:
\frac{dy}{dx} = x - y
Compute slopes at a few points:
- At (0,0) :
\frac{dy}{dx} = 0 - 0 = 0
So the segment is horizontal.
- At (1,0) :
\frac{dy}{dx} = 1 - 0 = 1
So slope is 1.
- At (0,1) :
\frac{dy}{dx} = 0 - 1 = -1
So slope is -1.
A useful pattern: since the slope depends on x-y, points with the same value of x-y share the same slope. In particular, along the line y=x, you get slope 0 everywhere.
Sketching solution curves from a slope field
A solution curve is a function whose tangent line at each point matches the segment in the slope field. If you are given an initial condition like y(x_0)=y_0, you plot the point (x_0,y_0) and then sketch a smooth curve that always stays tangent to the local segments.
Important: you are not connecting the segments piecewise like a polygon. The solution should be smooth because (in typical AP settings) solutions are differentiable.
Equilibrium solutions and stability (a key interpretation skill)
An equilibrium solution is a constant solution y=c that makes the derivative zero (so the solution stays constant).
For an autonomous differential equation:
\frac{dy}{dt} = g(y)
equilibria occur when:
g(y)=0
If you draw a slope field for an autonomous equation, equilibria show up as horizontal rows of zero slope.
Stability idea (conceptual)
- An equilibrium is stable if nearby solution curves move toward it over time.
- An equilibrium is unstable if nearby solutions move away.
You can often decide this just by checking the sign of g(y) above and below the equilibrium.
Worked example 2: Equilibria from an autonomous DE
Consider:
\frac{dy}{dt} = y(2-y)
Equilibria occur when:
y(2-y)=0
So:
y=0
and
y=2
Now check signs:
- If 0
- If y>2, then 2-y
Interpretation:
- Near y=2, solutions from below increase toward 2 and from above decrease toward 2. That makes y=2 stable.
- Near y=0, solutions slightly above 0 increase away from 0, and slightly below 0 decrease away from 0. That makes y=0 unstable.
Even without graphing, you can predict how a slope field would look: horizontal bands with positive slopes between 0 and 2 and negative slopes above 2.
Interpreting slope fields to answer questions
AP questions often use slope fields to make you reason qualitatively:
- Where is the solution increasing/decreasing? Look for where the slope segments are positive/negative.
- Where is the solution concave up/down? This is trickier: concavity depends on whether the slopes along the solution are increasing or decreasing as you move. Conceptually, if the slope segments along your path are getting steeper, the curve tends to be concave up; if they are flattening, concave down.
- Which curve matches an initial condition? You choose the curve that passes through the given point and follows the direction field.
A common misconception is thinking solution curves can cross. For a well-behaved differential equation (where f(x,y) is continuous and satisfies conditions that guarantee uniqueness), two different solutions cannot pass through the same point, so drawn solution curves should not intersect. AP problems typically assume this “no crossing” behavior in their slope fields.
Matching a differential equation to a slope field
Sometimes you’re given multiple differential equations and asked which one matches a displayed slope field. Here are patterns you can look for:
- If slopes are the same along horizontal lines (depend only on y), the DE is likely autonomous: \frac{dy}{dx} = g(y).
- If slopes are the same along vertical lines (depend only on x), the DE looks like \frac{dy}{dx} = h(x).
- If there’s a diagonal line where slopes are zero (like along y=x), the DE might involve a difference like x-y.
Worked example 3: Using a slope field idea to compare solutions
Suppose you have an autonomous differential equation and you know that for y>5 the slopes are negative, and for y