Euler-maruyama discretization (numerical solution of "Euler-Maru Mountain")

Source: Internet
Author: User

Sources of Euler method

In mathematics and computer science, the Euler method , named after its inventor, Leonhard Euler, is a first-order numerical method for solving an ordinary differential equation (that is, the initial value problem) of a given initial value. It is one of the most basic explicit methods for solving the numerical integration of ordinary differential equations (Explicit method).

[Edit] What is Euler method

Euler method is a method of flow field as a descriptive object to study flow with the movement of each space point flowing through the flow field by a fluid particle. --Flow field method

It does not directly investigate the motion process of the particle, but is the object of the space-flow field filled with the motion liquid particle. The variation of particle in the flow field is studied in each moment. The individual fluid particle movement process is ignored, and the flow field is stuck in each space point. The movement of the whole fluid is obtained by observing the changes of moving elements over time in each spatial point of the flow space and combining enough space points.

A kind of numerical solution to the ordinary differential equation. The basic idea is iteration. It is divided into the forward Euler method, the backward Euler method and the improved Euler method. The so-called iterative, is a successive substitution, and finally find the required solution, and achieve a certain degree of precision. The error can be easily calculated.

[Edit] Euler algorithm

The essential characteristic of the differential equation is that the derivative term is contained in the equation, and the first step of the numerical solution is to try to eliminate its guiding value, which is called discretization. The basic way to realize discretization is to use the forward difference quotient to approximate the derivative, which is the basis of Euler algorithm implementation. Euler (Euler) algorithm is the most basic and simplest method in numerical solution, but its solution precision is low, generally not in the project alone. The so-called numerical solution, is the solution of the problem Y (x) at a series of points on the value Y (xi) of the approximate value of Yi. For ordinary differential equations:

, X∈[a,b]

  y (a) = y0

The interval [a, b] can be divided into n segments, then the equation has y' (xi) = f(x) at point x i i,y(xi)), and then the forward difference quotient approximation instead of the derivative is:, here, H is the step, that is, the distance between two adjacent nodes. Therefore, yi+ can be calculated based on the values of the XI point and the Yi Point:

, i=0,1,2,l

This is the Euler scheme type, if the initial value of yi + 1 is known, you can gradually calculate the numerical solution y1,y2,l According to the above formula.

To simplify the analysis, it is common to estimate the error on the premise that y i is the exact y i = y (x i) y (xi + 1)? y I + 1, this error is called local truncation error.

If the local truncation error of a numerical method is O (hp + 1), it is said that its precision is P-order, or called the P-order method. The local truncation error of the Euler scheme type is O (H2), so the Euler scheme type is only the first order method.

[Edit] Euler's formula

  

and (i=0,1,2,..., n-1)

Local truncation error is O (H2)

[Edit] non-formal geometric interpretations

Consider calculating the shape of the following unknown curve: it has a given starting point and satisfies a given differential equation. Here, the so-called "differential equation" can be considered as a formula for calculating the tangent slope of the curve by the position of any point on the line.

The idea is that only the beginning of the curve is known at first, the rest of the curve is unknown, but the slope of the differential equation can be computed and the tangent is obtained.

Take a small step forward along the tangent line. If we assume that it is a point on a curve (which is usually not), then the same principle can be used to determine the next tangent, and so on. After a few steps, a polyline is calculated. In most cases, this line deviates from the original unknown curve, and any small error can be obtained by reducing the step size (although it is more complex for rigid equations).

[Edit] The derivation of Euler's method

Take the following differential equation as an example

It is hoped that the approximate solution can be obtained by using the linear approximation of y near the point (T0,y (t0)). The time t n+1 =&nbsp can be obtained by using the numerical value of time tN, if the single-step Euler method is used. The approximate values for tn + h are as follows:

The Euler method is an explicit method, which means that the solution of yn + 1 is the explicit function of yi.

The Euler method can solve the first order differential equation, and an n -order differential equation can be used to import n 1 variables to represent y', y', ..., y(n), decomposed into N First order differential equations. Therefore, the solution of higher order differential equations can be obtained by using Euler method to solve the following vectors.

[edit] an improved Euler algorithm

First, we use Euler method to obtain a preliminary approximation, called the prediction value, and then use it instead of the ladder method of the right end of the yi+1 and then directly calculate the Fi+1, get the positive value y i+1, the established prediction-correction system is called an improved Euler scheme:

Forecast value

School values

It has the following averaging forms:

  

And

And

Its local truncation error is O (H3), it can be seen that the improved Euler scheme-Euler scheme type improves the accuracy, and the truncation error is improved by the first order than the Euler scheme type.

Note: The Euler method is substituted for the derivative of y(xi), the local truncation error is large, the improved Euler method first uses Euler method to calculate the forecast value, and then uses the trapezoid formula to find the correction The local truncation error is one order lower than Euler method, which greatly improves the calculation precision.

Euler-maruyama discretization (numerical solution of "Euler-Maru Mountain")

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.