Differential Equations
Introduction to Differential Equations (CED Unit 7)
A differential equation (DE) is an equation that relates a function to one or more of its Derivatives. The order of a DE is the highest derivative that appears. A first-order DE involves Only ; a second-order DE involves .
A solution to a DE is a function that satisfies the equation. A general solution contains Arbitrary constants ( equal to the order of the DE), while a particular solution Satisfies additional initial conditions. Together, the DE and its initial conditions form an initial value problem (IVP).
Why differential equations matter. Nearly every physical system whose state evolves continuously In time is modelled by a DE: orbital mechanics, circuit analysis, fluid dynamics, population Biology, heat transfer, and pharmacokinetics all reduce to DEs at their core. The reason is simple: If a quantity changes at a rate that depends on the current state, then by definition And that is a differential equation.
First-Order Separable Equations
A first-order DE is separable if it can be written in the form:
The strategy is mechanical: move all terms involving (including ) to one side and all terms Involving (including ) to the other, then integrate both sides.
This works because and are related through the chain rule: Rewrites as And integrating both sides with respect to Gives Which is exactly the separated form Above.
Separability Test
Not every first-order DE is separable. The key diagnostic: can you algebraically factor the RHS into A product of a function of alone and a function of alone? For example, is not separable, because cannot be factored into .
Example
Solve with .
Separate: .
Integrate: .
Apply the initial condition: .
(We take the positive root since .)
Example
Solve with .
Separate: .
Integrate: .
Apply the initial condition: .
Worked Example: Separation with Partial Fractions
Solve with .
Separate:
Integrate both sides:
Apply : .
Therefore So .
Worked Example: Trigonometric Separation
Solve with .
Separate: .
Use the identity :
Apply : So .
The particular solution is:
This cannot be solved explicitly for in closed form, but it is a valid implicit solution.
Exponential Growth and Decay
Many natural phenomena are modelled by the DE:
Where is a constant.
- If : exponential growth
- If : exponential decay
Why This DE Is Ubiquitous
The equation says: “the rate of change is proportional to the current Quantity.” This is the simplest possible feedback loop. If you have a population of bacteria, each Bacterium divides independently, so the total growth rate is proportional to how many bacteria Exist. If you have a radioactive sample, each atom decays independently, so the total decay rate is Proportional to how many atoms remain. This single assumption generates the exponential.
Solution
Where .
Proof that the solution is unique. The function is continuous everywhere and is also continuous everywhere. By the existence and uniqueness Theorem, the IVP has exactly one solution on any interval containing .
Half-Life
For exponential decay with half-life :
Alternatively, since We get .
The half-life is a constant: no matter when you start measuring, the time for the quantity to halve Is always . This is a direct consequence of the exponential’s scale-invariance.
Example
Carbon-14 has a half-life of approximately 5730 years. A bone fragment contains 25% of its original Carbon-14. How old is the fragment?
T = \frac{\ln 0.25}{k} = \frac{-1.386}{-0.000121} \approx 11460 \mathrm{ years(Equivalently, So years.)
Doubling Time
For exponential growth with doubling time :
Logistic Growth (CED Unit 7.8)
The logistic differential equation models growth with a carrying capacity :
- When is small relative to Growth is approximately exponential (the factor ).
- As The growth rate .
- The carrying capacity is a horizontal asymptote.
- If The growth rate is negative, pulling back toward .
Solution
The general solution is:
Where depends on the initial condition.
Derivation
Starting with Separate:
Use partial fractions: .
Solving for : So:
Properties of the Logistic Curve
- Inflection point at : the curve changes from concave up to concave down.
- The maximum growth rate occurs at the inflection point.
Example
A population of bacteria grows logistically with carrying capacity 1000. Initially, there are 100 Bacteria, and after 1 hour there are 200. Find the population after 3 hours.
At : .
At : .
So approximately 559 bacteria.
Slope Fields
A slope field (or direction field) is a graphical representation of a first-order DE . At each point on a grid, a short line segment is drawn with Slope . Think of it as a vector field for the flow of solutions: each tiny line segment Shows the direction a solution curve must pass through that point.
Constructing Slope Fields
For any given grid point Compute and draw a short segment with that Slope. The density of the grid determines how accurately the field represents the DE.
Interpreting Slope Fields
- The general shape of solution curves can be visualized by following the direction of the line segments.
- Equilibrium solutions (horizontal lines) occur where for all .
- The slope field is unique to the DE, but multiple solution curves pass through different points.
- Solution curves cannot cross (by the uniqueness theorem).
Example
For :
- At : slope =
- At : slope =
- At : slope =
- At : slope =
The slopes increase as you move to the upper-right and decrease as you move to the lower-left.
Example
For :
When : slopes have the same sign as . When : slopes have the opposite sign of . When : slopes are undefined (vertical line segments).
The solution curves are hyperbolas Consistent with our earlier analytic solution.
Euler’s Method (CED Unit 7.6)
Euler’s method approximates the solution to with using a Simple iterative scheme:
Where is the step size.
Why Euler’s Method Works
The definition of the derivative gives us , so . This is a first-order Taylor expansion: we are Approximating the curve locally by its tangent line at each step.
Error Analysis
- Euler’s method is first-order accurate: the global error is proportional to .
- Local truncation error per step is But errors accumulate over steps, giving a global error of .
- Smaller step sizes produce more accurate approximations but require more computation.
- The method can diverge if the step size is too large, especially for rapidly changing solutions.
Example
Use Euler’s method with to approximate for .
| Step | ||||
|---|---|---|---|---|
| 0 | 1.0 | 0 | 1.0 | |
| 1 | 1.5 | 0.5 | 2.0 | |
| 2 | 2.0 | 1.5 | — |
So .
(The exact solution is Giving . The Approximation is poor due to the large step size. With The result is much closer.)
Worked Example: More Steps
Use Euler’s method with to approximate for .
| Step | ||||
|---|---|---|---|---|
| 0 | 0.00 | 1.000 | 1.000 | 1.250 |
| 1 | 0.25 | 1.250 | 1.313 | 1.578 |
| 2 | 0.50 | 1.578 | 1.828 | 2.035 |
| 3 | 0.75 | 2.035 | 2.613 | 2.688 |
| 4 | 1.00 | 2.688 | — | — |
So .
Applications
Newton’s Law of Cooling
Where is the temperature of the object, is the surrounding temperature, and .
Intuition: the rate of cooling is proportional to the temperature difference between the object And its surroundings. A large temperature difference drives rapid cooling; as the object approaches Room temperature, cooling slows down.
Solution:
This is an exponential decay toward . The object asymptotically approaches the surrounding Temperature but never quite reaches it.
Example
A cup of coffee at 90^\circ\mathrm{C is placed in a room at 20^\circ\mathrm{C. After 10 minutes, The coffee is 60^\circ\mathrm{C. When will the coffee reach 35^\circ\mathrm{C?
At : .
For :
T = \frac{\ln(14/3)}{k} = \frac{10\ln(14/3)}{\ln(7/4)} \approx \frac{10 \times 1.540}{0.5596} \approx 27.5 \mathrm{ minutesMixing Problems
A tank contains liters of water with kg of dissolved substance. Solution with Concentration kg/L flows in at rate L/min, and the mixture flows out at rate L/min.
The rate of change of the amount of dissolved substance is:
\frac{dQ}{dt} = \underbrace{r_i c_i}_{\mathrm{rate in} - \underbrace{\frac{r_o}{V} Q}_{\mathrm{rate out}The term is the current concentration in the tank, so is the rate at Which substance leaves.
Example
A tank holds 100 L of pure water. Brine with 0.5 kg/L salt flows in at 5 L/min, and the mixture Flows out at 5 L/min. Find the salt content after 20 minutes.
Since The volume stays at 100 L.
This is separable: .
With : .
Q(20) = 50(1 - e^{-1}) \approx 50(1 - 0.368) \approx 31.6 \mathrm{ kgWorked Example: Mixing with Variable Volume
A tank initially contains 200 L of pure water. Brine with 0.3 kg/L salt flows in at 4 L/min, and the Mixture flows out at 3 L/min. Find the salt content after 60 minutes.
Since The volume changes: .
This is a first-order linear DE:
The integrating factor is:
Integrate:
With : .
At : Q(60) = 0.3(260) - \frac{0.3 \cdot 200^4}{260^3} = 78 - \frac{0.3 \cdot 1.6 \times 10^9}{1.7576 \times 10^7} \approx 78 - 27.3 = 50.7 \mathrm{ kg.
Qualitative Analysis of Differential Equations
Existence and Uniqueness
If and are continuous on a rectangle containing Then the IVP , has a unique solution in some Interval around .
Consequences:
- Solution curves cannot cross (if they did, the IVP at the crossing point would have two solutions).
- The conditions are sufficient but not necessary: some IVPs without continuous partial derivatives still have unique solutions.
Equilibrium Solutions
An equilibrium solution (or constant solution) satisfies for all .
For autonomous equations :
- Find equilibrium solutions by solving .
- Classify stability by checking the sign of near each equilibrium.
| Sign of near equilibrium | Stability |
|---|---|
| below, above | Stable (attractor) |
| below, above | Unstable (repeller) |
| Same sign on both sides | Semi-stable |
Phase Line Analysis
For an autonomous DE The phase line is a one-dimensional diagram of the -axis with arrows indicating the direction of flow.
- Draw the -axis and mark the equilibrium points (zeros of ).
- In each interval between equilibria, test a point to determine the sign of .
- Draw rightward arrows where (increasing) and leftward arrows where (decreasing).
Example
Analyse .
Equilibria: , , .
| Interval | Test point | Direction | |
|---|---|---|---|
| Decreasing | |||
| Increasing | |||
| Decreasing | |||
| Increasing |
- : arrows point away — unstable
- : arrows point inward — stable
- : arrows point away — unstable
Bifurcation Analysis (CED Unit 7.9)
A bifurcation occurs when a small change in a parameter of the DE causes a qualitative change in The equilibrium structure.
Consider the one-parameter family:
- When : for all . No equilibria. All solutions increase monotonically.
- When : . One semi-stable equilibrium at . Solutions with decrease toward ; solutions with increase toward .
- When : has two equilibria at . The equilibrium at is unstable; the one at is stable.
The parameter value is a bifurcation point: as passes through zero, the system Transitions from having no equilibria to having two.
Numerical Methods: Beyond Euler
Euler’s method is the simplest numerical ODE solver, but it is rarely used in practice because Higher-order methods achieve the same accuracy with far fewer steps.
Improved Euler’s Method (Heun’s Method)
- Compute the “predictor”:
- Compute the average slope:
- Compute the “corrector”:
This is second-order accurate: the global error is .
Fourth-Order Runge-Kutta (RK4)
The gold standard for general-purpose ODE solving:
RK4 is fourth-order accurate: the global error is . For most AP-level problems, Euler’s method with small step size suffices, but understanding that more sophisticated methods Exist provides useful context.
RK4 Example
Use RK4 with to approximate for , .
Step 1 (, ):
Step 2 (, ):
So . The exact answer is So . Even RK4 with this large step size has significant error, but it is far more accurate than Euler’s Method would be.
Common Pitfalls
-
Forgetting the constant of integration. Always include and use the initial condition to find it. Every separable DE integration produces an arbitrary constant; dropping it means you have a family of curves, not the particular solution.
-
Incorrectly separating variables. All terms (including ) must be on one side, and all terms (including ) on the other. If you cannot algebraically factor into The equation is not separable and you need a different technique.
-
Not checking the domain of the solution. Some solutions may only be valid on a restricted interval. For example, the solution to is But if Then is undefined for .
-
Confusing the logistic growth equation with exponential growth. The logistic equation has the additional factor that caps growth at the carrying capacity.
-
Sign errors in Euler’s method. Remember: Not minus. The slope at the current point tells you which direction to step.
-
Identifying the wrong carrying capacity. In The carrying capacity is Not or . Check: setting gives or .
-
Forgetting that equilibrium solutions cannot be found by separation of variables (since you would divide by zero). Always check separately before separating.
-
Applying Euler’s method with too large a step size. The approximation can diverge significantly from the true solution. When in doubt, halve the step size and check convergence.
Practice Questions
-
Solve with .
-
A population grows according to with . Find the population after 50 years.
-
Use Euler’s method with and two steps to approximate for , .
-
A body at 80^\circ\mathrm{C is placed in a room at 25^\circ\mathrm{C. After 30 minutes, the body is at 50^\circ\mathrm{C. When will it reach 30^\circ\mathrm{C?
-
For Find all equilibrium solutions and classify their stability. Draw the phase line.
-
Sketch the slope field for and identify the equilibrium solutions (if any).
-
A tank initially contains 200 L of water with 10 kg of salt. Pure water flows in at 3 L/min and the mixture flows out at 3 L/min. How much salt remains after 60 minutes?
-
Show that the solution to the logistic equation with is .
-
Use Euler’s method with and four steps to approximate for , . Compare your result with the exact solution.
-
A tank contains 100 L of brine with 20 kg of salt. Fresh water flows in at 5 L/min and the mixture flows out at 5 L/min. How long does it take for the salt content to drop to 5 kg?
-
Analyse the bifurcation diagram for . Find the bifurcation point and describe the equilibrium structure on either side.
-
Use the improved Euler method (Heun’s method) with and two steps to approximate for , . Compare with the exact solution.
Practice Problems
Question 1: Separable differential equation
Solve the differential equation with the initial condition .
Answer
Separate variables: .
Integrate: .
where .
Using : So .
.
Question 2: Logistic growth model
A population grows according to the logistic equation with . Find (a) the population at And (b) the time when the population reaches half the carrying capacity.
Answer
Carrying capacity Growth rate .
Logistic solution: where .
.
(a) .
(b) Half carrying capacity: .
1 + 9e^{-0.05t} = 2$$9e^{-0.05t} = 1$$e^{-0.05t} = 1/9.
time units.
Question 3: Second-order linear DE
Solve with and .
Answer
Characteristic equation: r^2 - 5r + 6 = 0$$(r-2)(r-3) = 0. .
General solution: .
. .
From the second equation: . Substituting: -3C_2/2 + C_2 = 1$$-C_2/2 = 1$$C_2 = -2$$C_1 = 3.
.
Question 4: Slope field interpretation
The differential equation has a slope field. Identify the isocline (line where slopes are zero) and describe the long-term behaviour of solutions.
Answer
Zero slopes: So . This is the isocline where all slopes are zero (horizontal).
For (above the line ): So solutions decrease.
For (below the line ): So solutions increase.
All solutions approach the line as (this can be verified by solving the DE: the general solution is Which approaches ).
The line is a stable equilibrium solution.
Question 5: Euler's method
Use Euler’s method with step size to approximate for \frac{dy}{dx} = x + y$$y(1) = 0.
Answer
x_0 = 1$$y_0 = 0$$h = 0.5. Need 2 steps.
Step 1: at .
Step 2: at .
Euler’s method approximation: .
:::tip Diagnostic Test Ready to test your understanding of Differential Equations? The contains the hardest questions within the AP specification for this topic, each with a full worked solution.
Unit tests probe edge cases and common misconceptions. Integration tests combine Differential Equations with other AP Calculus topics to test synthesis under exam conditions.
See for instructions on self-marking and building a personal test matrix. :::
Summary
This topic covers the mathematical techniques and concepts related to differential equations, including key theorems, methods, and problem-solving approaches.
Key concepts include:
- sine, cosine, and tangent functions
- trigonometric identities
- solving trigonometric equations
- the sine and cosine rules
- radian measure and arc length
Regular practice with a variety of question types is essential to build fluency and confidence in applying these mathematical techniques.
Worked Examples
Worked examples demonstrating the application of key concepts are covered in the detailed sub-pages linked above.