Skip to content
ExtendedSource checked

Runge-Kutta-Fehlberg

Solves ODEs with paired Runge-Kutta estimates used for adaptive step sizing.

Quick Facts

Compact metadata for implementation and discovery.

Category
Numerical Methods
Difficulty
Advanced
Family
ODE Solver
Tier
Extended
Status
Verified
Review
Source Checked
Sources
2
Formulas
1
Relationships
3
Code example
Ready
Visualization
Ready

Overview

Runge-Kutta-Fehlberg computes two estimates of different orders from shared stages, using their difference to adjust the next time step.

Core Concepts

adaptive step sizeembedded methodlocal error estimateode integration

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(stages)

Average

O(steps * stages)

Worst

O(steps * stages)

Space

O(state)

When to Use

  • Use when solving equations needs adaptive step size.
  • Use when the input matches the assumptions behind oDE Solver.

When Not to Use

  • Avoid when the problem is ill-conditioned and no scaling or stability checks are available.
  • Avoid when a simpler algorithm gives the required result with less setup.

What It Does

  • Solves ODEs with paired Runge-Kutta estimates used for adaptive step sizing
  • Uses adaptive step size and embedded method to guide the work.
  • Produces approximate numeric result.

Use Cases

  • Solving equations
  • Approximating integrals
  • Working with matrices and differential equations

Inputs

  • Numeric function, matrix, or sampled data
  • Initial estimate or discretization
  • Tolerance

Outputs

  • Approximate numeric result
  • Error estimate or residual

Key Formulas (1)

Step error

error = ||yhigh order − ylow order||
error = ||y_high_order - y_low_order||

Estimates local truncation error from two embedded solutions.

Pseudocode

  1. 1.Prepare the inputs and state needed for Runge-Kutta-Fehlberg.
  2. 2.Apply the adaptive step size step while the stopping condition has not been met.
  3. 3.Update intermediate state and discard invalid candidates.
  4. 4.Return approximate numeric result.

Canonical Example

Input
Runge-Kutta-Fehlberg input with a small representative case
Output
Approximate numeric result
Explanation
Runge-Kutta-Fehlberg applies adaptive step size to produce approximate numeric result.

Implementation Notes

  • Check convergence with residuals or estimated error, not iteration count alone.
  • Keep the adaptive step size step separate enough to test independently.

Common Pitfalls

  • Ignoring conditioning and residuals can produce plausible-looking but wrong numeric answers.
  • Forgetting to check edge cases can make Runge-Kutta-Fehlberg look correct on only ideal inputs.

Interactive Mechanism Walkthrough

Iterative Convergence & State Trajectory

Show the numeric approximation improving against the target function, matrix, or state.

Runge-Kutta-Fehlberg mechanism walkthrough step 1 of 4x₀x₁x₂x*
Step 1 of 4: Prepare the inputs and state needed for Runge-Kutta-Fehlberg.
numerical-methods-mechanism

Notes

Runge-Kutta-Fehlberg estimates local error from embedded formulas and adapts step size; poor tolerances can still miss important dynamics.

Sources (2)

What each reference supports for this entry.

NASA TR R-315

Paper

Fehlberg's NASA technical report on low-order Runge-Kutta formulas with step-size control.

Open source

Numerical Recipes

Book

Reference text and implementation-oriented treatment for root finding, interpolation, integration, and ODE methods.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Both solve ODEs with different step-control strategies.

Runge-Kutta-Fehlberg is an adaptive Runge-Kutta method.

Tags

Numerical MethodsOde SolverAdaptiveNumerical Integration