Euler Method

For linear first ODE,

\[\frac{dy}{dx} = f(x, y),\]

we can discretize the equation using a step size \(\delta x \cdot\) so that the differential equation becomes

\[\frac{y_{n+1} - y_n }{ \delta x } = f(x_n, y_n),\]

which is also written as

(1)\[y_{n+1} = y_n + \delta x \cdot f(x_n, y_n).\]

This is also called forward Euler differencing. It is first order accurate in \(\Delta t\).

Generally speaking, a simple iteraction will do the work.


Back to top

© 2016-2018, Lei Ma | Created with Sphinx and . | On GitHub | Physics Notebook Statistical Mechanics Notebook Neutrino Physics Notes Intelligence | Index | Page Source