Differential Equations Modeling Lab
Visualize slope fields, step through Euler's method, and explore real-world differential equation models. Draw solution curves, compare Euler and Heun approximations with exact solutions, and analyze population growth, predator-prey dynamics, and cooling processes.
Guided Experiment: Euler's Method Convergence
If you decrease the step size h in Euler's method, what do you predict will happen to the approximation error?
Write your hypothesis in the Lab Report panel, then click Next.
Controls
Click on the graph to draw a solution curve through that point
Differential Equation
The slope field shows the direction of the solution at each grid point. Each small segment has slope f(x, y) at that location.
Click anywhere on the graph to draw a solution curve passing through that point. The curve is computed using the RK4 numerical method.
Slope Field
Data Table
(0 rows)| # | Trial | Model | Parameters | Initial Condition | Step Size | Method | Final Value | Exact Value | Error |
|---|
Reference Guide
Slope Fields
A slope field (direction field) visualizes the derivative dy/dx = f(x, y) across the xy-plane. At each grid point, a small line segment shows the slope of the solution passing through that point.
Clicking on the field draws a solution curve using fourth-order Runge-Kutta integration. Multiple curves show the family of solutions, each determined by its initial condition.
Euler's Method
Euler's method approximates the solution by stepping along the tangent line at each point. Starting from (x₀, y₀), each step computes the next value using the slope.
Smaller step sizes h give better accuracy but require more steps. Heun's method (improved Euler) averages the slopes at the start and end of each interval for second-order accuracy.
Logistic Growth Model
The logistic equation models population growth with a carrying capacity K. Growth slows as the population approaches K, producing the characteristic S-shaped (sigmoid) curve.
Equilibria exist at P = 0 (unstable) and P = K (stable). The maximum growth rate occurs at P = K/2.
Predator-Prey (Lotka-Volterra)
The Lotka-Volterra system models two interacting species: prey x and predators y. The populations oscillate cyclically around an equilibrium point.
The phase portrait shows closed orbits around the interior equilibrium at (γ/δ, α/β). Prey peaks are followed by predator peaks with a time lag.