IB Mathematics AI – Topic 5
Calculus: Differential Equations (HL Only)
Overview: Differential equations relate functions to their derivatives. They model real-world phenomena like population growth, radioactive decay, cooling, and motion.
Key Applications: Exponential growth/decay, Newton's Law of Cooling, population models, chemical reactions, mechanical systems.
Introduction to Differential Equations
Definitions & Classification
Definition:
A differential equation is an equation involving a function and its derivatives
General form: relates \(y\), \(\frac{dy}{dx}\), \(\frac{d^2y}{dx^2}\), etc.
Order of Differential Equation:
- First order: Contains only \(\frac{dy}{dx}\) (no higher derivatives)
- Second order: Contains \(\frac{d^2y}{dx^2}\)
Types of Solutions:
- General solution: Contains arbitrary constant(s)
- Particular solution: Uses initial conditions to find specific constant values
Common Notation:
\(\frac{dy}{dx}\) can also be written as \(y'\) or \(\dot{y}\)
⚠️ Common Pitfalls & Tips:
- Order determined by highest derivative present
- General solution needs +C, particular solution has specific C value
- Always check solution by substituting back into original equation
- Initial conditions typically given as y(x₀) = y₀
Solving First Order Differential Equations
Separation of Variables
Separable Differential Equations:
Form: \(\frac{dy}{dx} = f(x)g(y)\)
Can separate variables so all y terms on one side, all x terms on other
Method - Separation of Variables:
- Write equation as \(\frac{dy}{dx} = f(x)g(y)\)
- Separate: \(\frac{1}{g(y)}dy = f(x)dx\)
- Integrate both sides: \(\int \frac{1}{g(y)}dy = \int f(x)dx\)
- Add constant of integration +C
- Solve for y if possible (may need to leave implicit)
- Apply initial condition to find C
Common Models:
1. Exponential Growth/Decay:
\[ \frac{dy}{dx} = ky \]
Solution: \(y = Ae^{kx}\)
k > 0: growth, k < 0: decay
2. Newton's Law of Cooling:
\[ \frac{dT}{dt} = -k(T - T_s) \]
T = temperature, T_s = surrounding temperature
3. Logistic Growth:
\[ \frac{dP}{dt} = kP\left(1 - \frac{P}{L}\right) \]
P = population, L = carrying capacity
⚠️ Common Pitfalls & Tips:
- Don't forget to separate variables completely before integrating
- Always add +C after integration
- Check if equation is separable before attempting this method
- May need to use ln rules when integrating 1/y
📝 Worked Example 1: Solving by Separation
Question: Solve the differential equation \(\frac{dy}{dx} = xy\) with initial condition y(0) = 2
Solution:
Step 1: Separate variables
\[ \frac{1}{y}dy = x\,dx \]
Step 2: Integrate both sides
\[ \int \frac{1}{y}dy = \int x\,dx \]
\[ \ln|y| = \frac{x^2}{2} + C \]
Step 3: Solve for y
\[ |y| = e^{\frac{x^2}{2} + C} = e^C \cdot e^{\frac{x^2}{2}} \]
\[ y = Ae^{\frac{x^2}{2}} \]
where \(A = \pm e^C\) is an arbitrary constant
Step 4: Apply initial condition y(0) = 2
\[ 2 = Ae^0 = A \]
Therefore A = 2
Answer: \(y = 2e^{\frac{x^2}{2}}\)
Slope Fields (Direction Fields)
Graphical Representation of DEs
Definition:
A slope field is a visual representation of a differential equation
Shows small line segments with slope given by \(\frac{dy}{dx}\) at each point (x, y)
Purpose:
- Visualize behavior of solutions without solving analytically
- Identify equilibrium solutions (horizontal lines)
- See how solutions behave for different initial conditions
- Sketch solution curves through any point
How to Draw Slope Field:
- For differential equation \(\frac{dy}{dx} = f(x, y)\)
- Create grid of (x, y) points
- At each point, calculate slope = f(x, y)
- Draw short line segment with that slope
- Solution curves follow the flow of line segments
Reading Slope Fields:
- Solution curves are tangent to slope segments at every point
- Horizontal segments indicate \(\frac{dy}{dx} = 0\) (equilibrium)
- Vertical segments indicate undefined slope
- Solution curves cannot cross each other
⚠️ Common Pitfalls & Tips:
- Use GDC to generate and visualize slope fields
- Solution curves follow the "flow" of the field
- Equilibrium solutions are where all slopes are zero
- Different initial conditions give different solution curves
Euler's Method
Numerical Approximation
Definition:
Numerical method to approximate solutions to differential equations
Uses tangent line approximations to step forward
Euler's Method Formula:
For \(\frac{dy}{dx} = f(x, y)\) with initial condition y(x₀) = y₀:
\[ y_{n+1} = y_n + h \cdot f(x_n, y_n) \]
where:
- h = step size (interval width)
- \(x_{n+1} = x_n + h\)
- \(y_n\) = approximate y-value at \(x_n\)
Algorithm:
- Start with initial point \((x_0, y_0)\)
- Calculate slope: \(m = f(x_0, y_0)\)
- Move forward: \(x_1 = x_0 + h\)
- Estimate: \(y_1 = y_0 + h \cdot m\)
- Repeat from new point \((x_1, y_1)\)
- Continue until desired x-value reached
Accuracy:
- Smaller h → better approximation (but more steps)
- Error accumulates with each step
- Best for short intervals
⚠️ Common Pitfalls & Tips:
- Smaller step size h gives better accuracy
- Always start from the initial condition
- Show each iteration step by step in exams
- Use GDC to perform calculations efficiently
📝 Worked Example 2: Euler's Method
Question: Use Euler's method with step size h = 0.5 to approximate y(1.5) for \(\frac{dy}{dx} = x + y\) with y(0) = 1
Solution:
Given: \(\frac{dy}{dx} = x + y\), h = 0.5, \((x_0, y_0) = (0, 1)\)
Step 1: From x = 0 to x = 0.5
Slope at (0, 1): \(f(0, 1) = 0 + 1 = 1\)
\[ y_1 = y_0 + h \cdot f(x_0, y_0) = 1 + 0.5(1) = 1.5 \]
Point: (0.5, 1.5)
Step 2: From x = 0.5 to x = 1.0
Slope at (0.5, 1.5): \(f(0.5, 1.5) = 0.5 + 1.5 = 2\)
\[ y_2 = y_1 + h \cdot f(x_1, y_1) = 1.5 + 0.5(2) = 2.5 \]
Point: (1.0, 2.5)
Step 3: From x = 1.0 to x = 1.5
Slope at (1.0, 2.5): \(f(1.0, 2.5) = 1.0 + 2.5 = 3.5\)
\[ y_3 = y_2 + h \cdot f(x_2, y_2) = 2.5 + 0.5(3.5) = 4.25 \]
Answer: y(1.5) ≈ 4.25
| n | \(x_n\) | \(y_n\) | slope |
|---|---|---|---|
| 0 | 0 | 1 | 1 |
| 1 | 0.5 | 1.5 | 2 |
| 2 | 1.0 | 2.5 | 3.5 |
| 3 | 1.5 | 4.25 | - |
Coupled Differential Equations & Phase Portraits
Systems of DEs
Coupled Differential Equations:
System where multiple variables depend on each other
\[ \frac{dx}{dt} = f(x, y) \]
\[ \frac{dy}{dt} = g(x, y) \]
Phase Portrait:
Graphical representation in the x-y plane (phase plane)
Shows trajectories (solution curves) of the system
Key Features:
- Equilibrium points: Where \(\frac{dx}{dt} = 0\) and \(\frac{dy}{dt} = 0\)
- Trajectories: Paths showing how system evolves over time
- Direction arrows: Show direction of motion along trajectories
Types of Equilibrium Points:
- Stable (sink): Trajectories converge to point
- Unstable (source): Trajectories diverge from point
- Saddle point: Stable in one direction, unstable in another
- Center: Closed trajectories (periodic solutions)
Predator-Prey Model (Lotka-Volterra):
Classic example of coupled system:
\[ \frac{dR}{dt} = aR - bRP \quad \text{(prey)} \]
\[ \frac{dP}{dt} = -cP + dRP \quad \text{(predator)} \]
R = prey population, P = predator population
⚠️ Common Pitfalls & Tips:
- Equilibrium points are where both derivatives equal zero
- Use GDC to generate phase portraits
- Arrows show direction of motion in time
- Stability determined by behavior near equilibrium
📊 Differential Equations Quick Reference
Solving Methods
- Separation: Split x and y
- Integrate both sides
- Apply initial conditions
Slope Fields
- Visual representation
- Solution curves follow flow
- Use GDC to generate
Euler's Method
- \(y_{n+1} = y_n + h \cdot f(x_n, y_n)\)
- Smaller h = better
- Show all steps
Phase Portraits
- Coupled systems
- Equilibrium points
- Trajectory behavior
✍️ IB Exam Strategy
- Identify DE type: Separable? Order? Initial condition given?
- Separation method: Show all steps clearly including integration
- Don't forget +C: Always add constant after integration
- Apply initial conditions: Use to find specific value of C
- Euler's method: Create clear table showing each iteration
- Slope fields: Use GDC to visualize, describe behavior
- Phase portraits: Identify equilibrium points and stability
- Check answers: Substitute back into original equation
🚫 Top Mistakes to Avoid
- Forgetting +C constant after integration
- Not applying initial conditions to find C
- Incomplete variable separation before integrating
- Wrong integration (especially with ln and exponentials)
- Euler's method: wrong formula or arithmetic errors
- Not showing intermediate steps in calculations
- Slope fields: drawing slopes at wrong angles
- Phase portraits: missing equilibrium points
- Not checking solution by substitution
- Losing track of which variable is which in coupled systems