This project studies adaptive step-size control strategies for explicit Runge–Kutta (ERK) methods applied to the numerical solution of initial value problems (IVPs) for ordinary differential equations.
The work was developed for the Numerical Methods course at the University of Bologna.
The project is divided into two phases.
We implement and test three embedded Runge–Kutta pairs with adaptive step control:
- BS3(2) – Bogacki–Shampine method
- ERK4(3) – Embedded fourth/third-order Runge–Kutta
- DP5(4) – Dormand–Prince method
The methods are tested on:
- the Brusselator system
- two scalar ODE test problems.
To run a predefined experiment with fixed parameters:
run_solver.mThis script runs the solvers and prints the results for a fixed configuration.
To explore the parameters interactively, open the MATLAB app:
adaptive_steps_app.mlappThe app allows the user to:
- select the ODE problem
- choose the Runge–Kutta method
- set absolute and relative tolerances
- modify the safety factor
It visualizes the solution, the step-size evolution and the errors behaviour.
In the second phase, we compare adaptive and fixed-step methods on the Brusselator system.
Adaptive methods:
- BS3(2)
- ERK4(3)
- DP5(4)
Fixed-step methods:
- ERK3
- ERK4
- ERK4 with Richardson extrapolation
The performance comparison is based on a work–precision diagram, where global error is evaluated against the number of function evaluations. To complement the global trends, a comparison table provides a detailed performance snapshot for one representative configuration.
run_full_comparison.mThis script generates the work–precision plot and the table used to compare the methods.
- MATLAB (with support for
.mlappapps)
For a full description of the methods, experiments, and results, see the full report: report_adaptive_step_control
The adaptive step-size control strategy implemented in this project follows the framework described in:
E. Hairer, S. P. Nørsett, G. Wanner,
Solving Ordinary Differential Equations I: Nonstiff Problems,
Springer Series in Computational Mathematics.
Andrea Tribotti
Leonardo Cittadini
Werther Solazzi