Class EulerMethod

  • All Implemented Interfaces:
    ODESolver

    public class EulerMethod
    extends RungeKutta
    The Euler method is a first-order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic explicit method for numerical integration of ordinary differential equations and is the simplest Runge-Kutta method. The Euler method is a first-order method, which means that the local error (error per step) is proportional to the square of the step size, and the global error (error at a given time) is proportional to the step size. It also suffers from stability problems. For these reasons, the Euler method is not often used in practice. It serves as the basis to construct more complicated methods.
    See Also:
    • D. Greenspan, Numerical Solution of Ordinary Differential Equations: for Classical, Relativistic and Nano Systems, 1st ed, Wiley-VCH, 2006.
    • Wikipedia: Euler method
    • Constructor Detail

      • EulerMethod

        public EulerMethod​(double h)
        Constructs an Euler's method instance, with the given step size.
        Parameters:
        h - the constant step size
      • EulerMethod

        public EulerMethod​(int N)
        Constructs an Euler's method instance, with the given number of steps.
        Parameters:
        N - the number of steps