Skip to main content

Crate numra_fde

Crate numra_fde 

Source
Expand description

FDE (Fractional Differential Equation) solvers for Numra.

This crate provides methods for solving fractional differential equations using the Caputo derivative:

D^α y(t) = f(t, y),  y(0) = y₀

where D^α is the Caputo fractional derivative of order α ∈ (0, 1].

§The Caputo Derivative

The Caputo fractional derivative of order α is defined as:

D^α y(t) = (1/Γ(1-α)) ∫₀ᵗ (t-s)^(-α) y'(s) ds

Key properties:

  • Reduces to ordinary derivative when α = 1
  • D^α c = 0 for constants (unlike Riemann-Liouville)
  • Has “memory” - depends on full history of y

§Solvers

  • L1Solver - L1 scheme for Caputo derivative (order 2-α accuracy)

§Example

use numra_fde::{FdeSystem, L1Solver, FdeSolver, FdeOptions};

// Fractional relaxation: D^α y = -λy, y(0) = 1
struct FractionalRelaxation { lambda: f64 }

impl FdeSystem<f64> for FractionalRelaxation {
    fn dim(&self) -> usize { 1 }
    fn alpha(&self) -> f64 { 0.5 }  // Half-order derivative
    fn rhs(&self, _t: f64, y: &[f64], f: &mut [f64]) {
        f[0] = -self.lambda * y[0];
    }
}

let system = FractionalRelaxation { lambda: 1.0 };
let opts = FdeOptions::default().dt(0.01);
let result = L1Solver::solve(&system, 0.0, 1.0, &[1.0], &opts);

Author: Moussa Leblouba Date: 2 February 2026 Modified: 2 May 2026

Structs§

FdeOptions
Options for FDE solvers.
FdeResult
Result of FDE integration.
L1Solver
L1 scheme solver for Caputo fractional differential equations.

Traits§

FdeSolver
Trait for FDE solvers.
FdeSystem
Trait for fractional differential equation systems.
Scalar
A real scalar type suitable for numerical computation.

Functions§

caputo_weights
Compute the L1 scheme weights for Caputo derivative discretization.
gamma
Gamma function approximation using Lanczos approximation.
mittag_leffler
Mittag-Leffler function E_{α,β}(z).
mittag_leffler_1
Mittag-Leffler function E_α(z) = E_{α,1}(z).