EFORK Solver
Extended Fractional-Order Runge-Kutta integrator: usage, memory considerations, and published validation against Ghoreishi et al. (2023).
The EFORKSolver implements an explicit Extended Fractional-Order Runge-Kutta method. It is the default solver in the hidden-attractors-fo workflows due to its excellent balance of execution speed and numerical stability.
Mathematical Preliminaries
The following definitions follow Section 2 of Ghoreishi, Ghaffari, and Saad (2023).
Riemann–Liouville Fractional Integral
Definition 1. The Riemann–Liouville fractional integral operator of order for a function with is defined as
Caputo Fractional Derivative
Definition 2. The Caputo fractional derivative of order of a function , with , is defined as
The Caputo derivative is preferred in physical modeling because its initial conditions match those of classical integer-order ODEs, giving clear physical interpretation to prescribed data.
Generalized Taylor Formula
Theorem 1 (Generalized Taylor formula for the Caputo fractional derivative). Suppose for , where . Then, for all , there exists such that
Applied step-by-step from (not just from ), this formula is the foundation for deriving FORK methods that are independent of the global starting point.
Mittag-Leffler Function
Definition 3. The Mittag-Leffler function and its two-parameter form are
Note that and . These functions generalize the exponential and play essential roles in fractional stability analysis.
EFORK Method Definition
Consider the fractional initial-value problem with :
Set where is the step size.
Definition 4 (Ghoreishi et al. 2023, Def. 4). A family of -stage Explicit Fractional-Order Runge-Kutta (EFORK) methods is defined as
where the unknown coefficients and weights are determined by matching powers of in the Caputo generalized Taylor expansion.
Memory Correction Term
For , the key distinction from classical RK is the history-correction that adjusts the local Caputo derivative to account for the trajectory before :
At , (no history). For , the sum accumulates piecewise-linear interpolation corrections from all previous steps. This convolution is the “memory” of fractional calculus and is the primary source of computational cost.
3-Stage Butcher Tableau
The three-stage EFORK method (order ) is:
The system of six equations (22) in Ghoreishi et al. that determine these coefficients is:
The validated stage formula for used in this library is therefore:
K3 = h^alpha * F_n(t_n + c3*h, y_n + a31*K1 + a32*K2)
where F_n includes the Caputo-history contribution at each internal stage.
Theory
The Caputo fractional derivative of order is defined as:
Because the integral evaluates the history of the function from , fractional derivatives possess “memory”.
The EFORK method adapts the classical 4th-order Runge-Kutta scheme to account for this memory by convolving the recent trajectory history (up to a defined memory length ) with a fractional weighting kernel.
Usage
from hidden_attractors.solvers import EFORKSolver
from hidden_attractors.models import rhs_nonsmooth, chua_nonsmooth_parameters
params = chua_nonsmooth_parameters()
solver = EFORKSolver(
rhs=lambda x, t: rhs_nonsmooth(x, params),
q=0.98, # Fractional order (0 < q <= 1)
dt=0.01, # Integration time step
memory=500 # Number of past steps to keep in memory
)
x0 = [0.1, 0.0, 0.0]
t_span = (0.0, 100.0)
t, x = solver.integrate(x0, t_span)
Batch Processing
If you pass a 2D array of initial conditions (shape (N, 3)) to solver.integrate(), the solver will integrate all trajectories simultaneously. If the C backend is active, this loop is parallelized using OpenMP.
import numpy as np
# 50 random initial conditions
X0 = np.random.rand(50, 3)
# Integrate all 50 trajectories
t, X = solver.integrate(X0, t_span)
print(X.shape) # (10001, 50, 3) -> (time_steps, n_trajectories, dimensions)
Memory Considerations
The memory parameter dictates how many previous states are used to evaluate the next step.
- A memory of
500withdt=0.01means the system “remembers” the last 5.0 seconds of simulation. - As memory increases, the computational cost per step increases linearly.
- If the simulation time exceeds the memory window, the oldest states are discarded (sliding window approximation).
Published Validation
The three-stage EFORK implementation is validated independently from any chaotic-system classification using the manufactured-solution examples in Ghoreishi, Ghaffari, and Saad (2023).
Validated Stage Formula
The published method evaluates
K3 = h^alpha F_n(t_n + c3 h, y_n + a31 K1 + a32 K2)
where F_n includes the known Caputo-history contribution at each internal
stage. This is also the ordering used by the independent ejemplo1.py script
supplied by Dr. Luis Gerardo de la Fraga of CINVESTAV Unidad Zacatenco.
Published Tables Reproduced
The validation runs Examples 1 and 2 at T=1, for
N = 40, 80, 160, 320, 640.
| Table | Example | Fractional order | Status |
|---|---|---|---|
| 3 | Example 1 | 0.25 | Reproduced |
| 4 | Example 1 | 0.50 | Reproduced |
| 9 | Example 2 | 0.25 | Reproduced |
| 10 | Example 2 | 0.50 | Reproduced |
The largest absolute difference from a displayed paper value is
5.5489224e-9, within a 6e-9 threshold selected for the article’s printed
rounding.

Registered Evidence
The library validation package contains the computed CSV, the machine-readable
summary, the convergence plot above, and source-hashed copies of
constantes_efork.py and ejemplo1.py:
version_2/validation/reference_cases/efork3_ghoreishi_ghaffari/
This numerical-method validation is separate from the integer Chua hidden-attractor reference run. A chaotic trajectory is only reported after its integration-dependent outputs have been calculated with the corrected validated stage ordering.
It validates the published EFORK-3 reference implementation and the corrected
q=1 rerun; it does not by itself validate truncated-memory fractional native
trajectories. Those require separate fractional evidence.
Reference
F. Ghoreishi, R. Ghaffari, and N. Saad, “Fractional Order Runge-Kutta Methods,” Fractal and Fractional, vol. 7, article 245, 2023.