Sie sind auf Seite 1von 1

Euler method.

In the 18th century Leonhard Euler invented a simple scheme for


numerically approximating the solution to an ODE. Given a first order ODE
of the form dy/dx = f(x, y) subject to the initial boundary condition y(x 0) =
y0, we estimate the function y(x) over a regular sample of values x n = x0 +
hn. The parameter h is referred to as the step length. If yn is the
approximation to y(x) at xn, then we can approximate the gradient at xn by
f(xn, yn). We estimate yn+1 by assuming the gradient remains constant in the
interval between xn and xn+1. This leads to the following method:

Lorenz system

x = ( yx)

y =xz + x y

z =xyz

Solution of Lorenz system using Euler method

x(m+1)=x(m)+(a*(y(m)-x(m)))*h;
y(m+1)=y(m)+(-1*(z(m)*x(m))+b*x(m)-y(m))*h;
z(m+1)=z(m)+(y(m)*x(m))-c*z(m)*h;

Das könnte Ihnen auch gefallen