Introduction to differential equations
Section titled “Introduction to differential equations”A differential equation usually describes how a function changes rather than giving its value directly. This makes differential equations useful when the known information is a rate: population growth, cooling, radioactive decay, motion, spread of a disease, charging a capacitor, or any situation where the future depends on the current state.
For example, saying
does not give the population immediately. It says the population grows at a rate proportional to how much population is already present. Solving the differential equation turns that rate rule into an actual population model.
For
the slope at a point depends on the coordinates of that point. A solution curve is a function whose tangent slope matches the differential equation everywhere it passes through.
However, a solution to a differential equation may be valid only on an interval, even if the algebraic expression looks broader. Restrictions can come from:
- division by zero during separation,
- logarithms introduced while integrating,
- initial conditions that choose one branch,
- points where the differential equation itself is undefined.
When solving an initial value problem, the interval of validity is usually the largest interval containing the initial input where the solution and differential equation both make sense.
Verifying a proposed solution
Section titled “Verifying a proposed solution”Solving an equation and verifying a solution are different tasks. To verify, calculate the proposed function’s derivative, substitute the proposed function wherever the equation contains , and show the two sides agree throughout the stated interval. Then check the initial condition separately.
A function may satisfy the differential equation while failing the initial condition. It may also satisfy both at a single input without satisfying the equation nearby. A solution must work on an interval, not merely at the point where its value is specified.
Example. Determine whether solves with .
The derivative is
Substitute both expressions into the differential equation:
The identity holds for every real . Also,
Thus the function satisfies both requirements and is a solution on the entire real line. The exponential terms cancel because the homogeneous part of the equation is , while the polynomial terms account for the forcing term .
Translating a verbal rate law
Section titled “Translating a verbal rate law”“Proportional to” identifies multiplication by a constant. A growth rate proportional to the current population gives . A cooling rate proportional to the difference between the object’s temperature and room temperature gives for a positive cooling constant.
Choose the sign so the equation matches the physical behavior. For an object hotter than its room, and cooling requires a negative derivative. For a colder object, the same model predicts warming because that difference is negative.
Check units when introducing the constant. In , has units of inverse time. In a model , the constant instead has units of inverse population per time. The two logistic forms are equivalent only after their constants are related correctly.
Slope fields
Section titled “Slope fields”A slope field shows small line segments representing at many points.
In a slope field, each small segment represents the slope assigned by the differential equation at that point. Solution curves should follow the little segments smoothly. When the equation satisfies a local uniqueness condition, distinct solution curves cannot cross at the same input-output point. A sufficient condition near that point is continuity of both and its partial derivative with respect to .
To sketch a solution curve through an initial condition, start at the given point and move in the direction of the nearby line segments. Do not connect the segments with sharp corners; the solution should be a smooth curve whose tangent direction matches the field. You can reason about the solution without solving the differential equation by asking where slopes are positive, negative, zero, steep, or shallow.
Rows, columns, and zero-slope curves
Section titled “Rows, columns, and zero-slope curves”For , the slope depends only on height, so every segment in a horizontal row has the same slope. For , the slope depends only on the horizontal coordinate, so segments repeat in vertical columns. When both variables appear, neither repetition is guaranteed.
The equation identifies places where a solution has a horizontal tangent. It need not identify a constant solution. For , slopes are zero along the diagonal , but the function itself has derivative one, so it does not solve the equation. A constant solution must remain on a horizontal line whose assigned slopes are zero everywhere.
Example. For , describe the slope field and find the tangent line and concavity of the solution through .
Slopes are zero on the parabola . Above that parabola, slopes are positive; below it, slopes are negative. These conclusions follow from comparing the height to .
At ,
so the tangent line is . To determine concavity, differentiate along a solution:
At the initial point, , so the solution is concave down locally. Its tangent line gives an overestimate for nearby values as long as this concavity persists between the initial point and the target input.
The parabola of horizontal segments is not a solution curve. Moving along that parabola would require derivative , which usually differs from the zero slopes assigned there.
The uniqueness condition matters. For example, with allows both the constant solution zero and a solution that remains zero until a chosen nonnegative time, then follows a translated square. The right side is not differentiable with respect to at zero, so the sufficient uniqueness condition fails. Ordinary polynomial and smooth exponential models generally do not have this ambiguity near their initial points.
Euler’s method (BC-only)
Section titled “Euler’s method (BC-only)”Euler’s method is repeated linear approximation. At each step, use the current slope to move forward:
Starting from with step size :
where
Also keep track of the input:
The approximation improves when the step size is smaller, but AP questions usually care more about setting up the method correctly than about perfect numerical accuracy.
Euler’s method is like repeatedly using a tangent line for a short time. At , the differential equation gives the slope . If the step size is , then the tangent-line estimate says
So the next point is
Each step uses the slope at the old point. Only after taking that step do you recalculate the slope at the new estimated point.
Example. Given with , use Euler’s method with step size to approximate in two steps.
At each step the new is the old plus times the slope at the current point. Start at .
Step 1. The slope at is , so
Step 2. The slope at is , so
Collecting the steps in a table:
So Euler’s method gives the approximation .
Error direction and dependence on the estimated point
Section titled “Error direction and dependence on the estimated point”Euler’s method repeatedly replaces a curved solution by a tangent segment. For a forward step on a concave-up solution, the tangent lies below the true solution locally. On a concave-down solution, it lies above. To claim an overall error direction over several steps, the relevant solution region and the way later slopes respond to earlier errors must support that conclusion.
In particular, the slope at a later step must be calculated using the estimated value . Substituting an exact value from a separate formula changes the numerical method. Smaller steps generally improve the approximation for a smooth, well-behaved equation over a fixed interval, but halving a step is not a guarantee against every instability.
Example. For with , use two forward Euler steps of length to estimate . Compare with the exact solution and explain the error.
At the starting point, the slope is one:
The second slope is the square of the new estimated value:
Separation gives , so the exact value at is two. The Euler approximation is low.
Along the positive solution, , so each forward tangent step lies below the corresponding exact solution starting at that step. Also, a smaller positive estimated height gives a smaller slope , preserving the underestimate in subsequent steps. This explains the accumulated error rather than relying only on one tangent-line picture.
Separable differential equations
Section titled “Separable differential equations”A separable equation has the variables separated into an part and a part.
If
rewrite as
and integrate both sides.
The constant of integration belongs after integration, and an initial condition turns the general solution into a particular solution.
A general solution contains an arbitrary constant and represents a whole family of possible solution curves. A particular solution uses an initial condition to choose exactly one curve from that family.
For example, after separating variables you might get
That is a general solution because different values of give different curves. If the problem also says , then you substitute that point to find , giving the particular solution
Example. Solve with the initial condition .
Separate the variables, moving all factors with and all factors with :
Integrate both sides:
Multiplying by and renaming the constant gives the general solution
Apply the initial condition :
Since , take the positive square root to get the particular solution
Equilibria lost during division
Section titled “Equilibria lost during division”Before dividing by in , solve . Each root can give a constant solution. These solutions cannot be recovered by assigning a finite value to an integration constant after the division has already excluded them.
You only need one arbitrary constant when integrating the separated equation. Writing a different constant on each side is allowed, but their difference is still a single arbitrary constant. After exponentiating a logarithm, the resulting multiplicative constant can absorb a sign on an interval where the solution does not cross a zero.
Initial conditions select a branch and an interval
Section titled “Initial conditions select a branch and an interval”An algebraic equation such as describes two branches. An initial value above the axis chooses the positive branch; an initial value below it chooses the negative branch. A solution cannot switch branches arbitrarily while still satisfying the original differential equation.
Example. Solve with , and state the largest interval of validity containing zero.
Separate and integrate:
The initial value gives
Since the initial output is negative, the required branch is
The radicand must be positive, not merely nonnegative, because the original differential equation divides by . Thus the maximal interval is .
The formula has values at the endpoints, but there makes the original equation undefined and the slopes unbounded. Including those endpoint values does not extend the solution as a differentiable solution of the stated equation.
Example. Solve with , and identify the equilibrium solution.
The right side vanishes for the constant function , so record that solution first. For other solutions, separate:
Exponentiating and absorbing the sign gives
Use the initial value:
The particular solution is for all real inputs. It remains above three, as expected from its positive exponential term. Setting in this extended family recovers the equilibrium, but that recovery is valid because it is checked directly in the original equation.
First-order linear differential equations (extension)
Section titled “First-order linear differential equations (extension)”A first-order linear differential equation has the form
The standard method of solving is to multiply by an integrating factor
Then the left side becomes the derivative of a product:
After that, integrate both sides and solve for .
Example. Solve
with .
Here
The integrating factor is
Multiply the differential equation by :
The left side is
So
Integrate both sides:
Divide by :
Use :
Therefore the particular solution is
Why the integrating factor works
Section titled “Why the integrating factor works”The goal is to turn the left side into a product derivative. The product rule says
Multiplying by produces on the left. These expressions agree if , whose nonzero solution is . This is the reason for the exponential, rather than an unrelated formula to memorize.
Put the differential equation into standard form before identifying . If a coefficient multiplies , first divide by that coefficient on an interval where it is nonzero. That division may restrict the solution interval.
Example. Solve with , and explain the domain restriction.
On the positive interval containing the initial input, divide by :
The integrating factor is . Multiplying by it gives
Integrate and apply the initial condition:
Thus
This expression becomes unbounded as . Although the original undivided equation can be written at zero, this particular solution cannot be continued through zero as a finite differentiable function. The largest interval containing one is .
Second derivative from a differential equation
Section titled “Second derivative from a differential equation”If
then
often comes from differentiating implicitly:
When differentiating, remember that depends on . After finding , use its sign to describe whether solution curves are concave up or concave down.
Example. For solutions of
find in terms of and , then determine the concavity at the point .
Differentiate both sides with respect to :
Since depends on ,
Substitute :
At ,
The second derivative is zero there, so its value alone does not establish an inflection point. In fact, satisfies both the equation and the initial point. Since this equation has a unique solution through , the solution is that straight line, with zero second derivative everywhere and no change in concavity.
Exponential growth and decay
Section titled “Exponential growth and decay”If the rate of change is proportional to the amount present:
then
Proof (Exponential model equation). If
then the relative rate of change is constant:
Integrating gives
Exponentiating both sides gives
So exponentials are the natural functions whose rate of change stays proportional to their current value.
Example. A radioactive sample decays according to and has a half-life of years. Find the decay constant , and determine how much of an initial -gram sample remains after years.
The solution has the form , where is the initial amount. A half-life of years means that after the amount is half of :
Take the natural log of both sides and solve for :
With , the amount after years is
So grams remain. This matches the intuition that years is exactly three half-lives, leaving of the original.
Cooling toward a nonzero equilibrium
Section titled “Cooling toward a nonzero equilibrium”Exponential behavior often applies to the difference from an equilibrium rather than to the original quantity. If the room stays at temperature , Newton’s cooling model is
Let . Because is constant, , so
Only the temperature excess is multiplied by the exponential. Multiplying the entire initial temperature by an exponential would incorrectly predict cooling toward zero.
Example. An object cools in a room held at degrees Celsius. Its initial temperature is degrees, and after ten minutes it is degrees. Under Newton’s cooling model, find its temperature after twenty minutes and the time when it reaches degrees.
The initial excess above room temperature is eighty:
Using the ten-minute measurement,
After twenty minutes, the excess has halved twice:
To reach thirty degrees,
Therefore minutes. The temperature excess has a ten-minute half-life, while the temperature itself does not.
Equilibrium solutions and stability
Section titled “Equilibrium solutions and stability”Equilibrium solutions are constant solutions where . For an autonomous differential equation
an equilibrium solution occurs when
At those -values, the slope is zero for every , so the solution can remain constant.
Stability:
- stable if nearby solutions move toward it,
- unstable if nearby solutions move away,
- semistable if nearby solutions move toward it from one side and away from it on the other.
For autonomous equations , a sign chart on is an efficient way to classify equilibria.
Example. Classify the equilibrium solutions of
Set the right side equal to zero:
Thus the equilibrium solutions are
Test the sign of on the intervals determined by and :
- If , then , so solutions move downward.
- If , then , so solutions move upward.
- If , then , so solutions move downward.
Solutions move away from , so is unstable. Solutions move toward from both sides, so is stable.
Logistic differential equation (BC-only)
Section titled “Logistic differential equation (BC-only)”The logistic model is
where is the carrying capacity.
Behavior:
- equilibrium solutions at and ,
- growth is fastest near ,
- solutions with increase toward when .
Example. A population is modeled by . State the carrying capacity, the population at which growth is fastest, and the value of at that population.
Comparing with the standard form , we read off and . The carrying capacity is therefore
Growth is fastest at half the carrying capacity:
At , the rate of change is
So the population grows fastest, at individuals per unit time, when it reaches .
Deriving the logistic solution
Section titled “Deriving the logistic solution”The factor reduces the per-capita growth rate as the population approaches the carrying capacity. When is small relative to , this factor is near one and growth resembles unrestricted exponential growth. Near , the factor approaches zero.
Assume , , and first consider a nonequilibrium solution with . Separate variables:
The useful decomposition is
The second term integrates with a minus sign because the derivative of is negative one. Therefore,
Solving for gives the standard form
When , the constant is positive, so the denominator decreases toward one and the population increases toward . When , the constant is negative and the positive-time population decreases toward . The equilibrium must still be recorded separately; is obtained when .
Locating the greatest growth rate
Section titled “Locating the greatest growth rate”Treat the growth rate as a function of population:
This is a downward-opening quadratic. Its maximum occurs at , where . That describes the largest possible positive growth rate in the model, but a particular solution may never pass through that population during the time interval being studied.
Differentiating along a solution also gives
For a growing population between zero and , the curve is concave up below and concave down above it. The inflection occurs when that particular population crosses half the carrying capacity.
Example. A population satisfies and . Find the solution, the time of greatest growth for , and the maximum rate.
Here , , and
Thus
The greatest growth occurs at population five hundred:
Taking logarithms gives
At that time, individuals per unit time. The population begins below five hundred, so it actually reaches this rate in the future. Had the initial population already exceeded five hundred but remained below one thousand, its growth rate would decrease from the start, and its largest rate for would occur at the initial time.
Matching qualitative and exact answers
Section titled “Matching qualitative and exact answers”Before calculating, a logistic phase line predicts that an initial population between zero and capacity remains positive, rises, and approaches the capacity. The explicit formula should agree with all three predictions. A negative denominator, a curve crossing its equilibrium, or unbounded positive-time growth would indicate an algebra or sign error for this initial condition.
For other separable models, the exact solution can reveal finite-time blow-up. The solution for becomes unbounded at one, so a numerical table with rapidly increasing values near one is reflecting the model’s behavior. Continuing a numerical method past that singularity does not extend the original solution through it.
The phase line, slope field, initial condition, explicit solution, and numerical approximation describe the same rate law from different directions. Comparing them is a stronger check than substituting the initial point alone.
Inferring parameters from local measurements
Section titled “Inferring parameters from local measurements”An initial rate can determine a model constant without solving the equation. After finding that constant, differentiating the rate law can predict whether the rate is increasing or decreasing at that same instant.
For example, suppose , , and . Substitution gives , so . Along a solution,
At the initial time, . The population is increasing, and its rate of increase is itself increasing. No explicit formula for was needed for either conclusion.
The derivative data and the function data have different roles. The initial population chooses a solution within the model family, while the initial rate identifies the parameter governing that family.
A threshold model with harvesting (extension)
Section titled “A threshold model with harvesting (extension)”Adding a constant removal rate can change the qualitative behavior of a population model. Consider
Equilibria solve , giving
For there are two positive equilibria. The rate is positive between them and negative outside them. The lower equilibrium is unstable: populations slightly below it fall, while populations slightly above it rise. The upper equilibrium is stable.
At , the equation becomes . Rates are nonpositive on both sides of two. Populations above two approach it, while populations below two move away downward, so the equilibrium is semistable.
For there are no equilibria and the modeled population decreases everywhere. If it reaches zero, continuing the formula to negative populations is no longer physically meaningful. The mathematical equation may continue, but the population interpretation stops at extinction.
This example uses the same sign-chart method as the standard logistic equation. The new feature is that changing one parameter can remove a stable long-term population entirely.
Tips for the exam
Section titled “Tips for the exam”Differential equation questions often move among four representations:
- a formula for ,
- a slope field,
- a particular solution through an initial condition,
- a verbal model of growth, decay, or limiting behavior.