# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.analysis.differentialequation.ode.ivp.solver

## 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.
• D. Greenspan, Numerical Solution of Ordinary Differential Equations: for Classical, Relativistic and Nano Systems, 1st ed, Wiley-VCH, 2006.
• Wikipedia: Euler method
• ### Constructor Summary

Constructors
Constructor and Description
EulerMethod(double h)
Constructs an Euler's method instance, with the given step size.
EulerMethod(int N)
Constructs an Euler's method instance, with the given number of steps.

• ### Methods inherited from class com.numericalmethod.suanshu.analysis.differentialequation.ode.ivp.solver.rungekutta.RungeKutta

solve
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### 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