Class ODESolver

java.lang.Object
org.episteme.core.mathematics.analysis.ode.ODESolver

public class ODESolver extends Object
Ordinary Differential Equation (ODE) solvers.

Solves initial value problems dy/dt = f(t, y) with y(t₀) = y₀.

References:

  • Hairer, E., Nørsett, S. P., invalid input: '&' Wanner, G. (1993). Solving Ordinary Differential Equations I: Nonstiff Problems. Springer.
  • Butcher, J. C. (2008). Numerical Methods for Ordinary Differential Equations. Wiley.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • ODESolver

      public ODESolver()
  • Method Details

    • euler

      public static Real[] euler(Function<Real[],Real> f, Real t0, Real y0, Real tEnd, Real h)
      Euler's method: y_{n+1} = y_n + h*f(t_n, y_n)

      First-order method. Simple but low accuracy O(h).

    • rungeKutta4

      public static Real[] rungeKutta4(Function<Real[],Real> f, Real t0, Real y0, Real tEnd, Real h)
      Runge-Kutta 4th order (RK4): Classical method.

      Fourth-order accuracy O(h⁴). Industry standard for ODE solving.

    • midpoint

      public static Real[] midpoint(Function<Real[],Real> f, Real t0, Real y0, Real tEnd, Real h)
      Midpoint method (2nd order Runge-Kutta).