Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Euler method

From Wikipedia, the free encyclopedia
Approach to finding numerical solutions of ordinary differential equations
For integrating with respect to the Euler characteristic, seeEuler calculus. For Euler's method for factorizing an integer, seeEuler's factorization method.
(Figure 1) Illustration of the Euler method. The unknown curve is in blue, and its polygonal approximation is in red.
Differential equations
Scope
Classification
Solution
People
Specific equations

Inmathematics andcomputational science, theEuler method (also called theforward Euler method) is a first-ordernumerical procedure for solvingordinary differential equations (ODEs) with a giveninitial value. It is the most basicexplicit method fornumerical integration of ordinary differential equations and is the simplestRunge–Kutta method. The Euler method is named afterLeonhard Euler, who first proposed it in his bookInstitutionum calculi integralis (published 1768–1770).[1]

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.The Euler method often serves as the basis to construct more complex methods, e.g.,predictor–corrector method.

Geometrical description

[edit]

Purpose and why it works

[edit]

Consider the problem of calculating the shape of an unknown curve which starts at a given point and satisfies a given differential equation. Here, a differential equation can be thought of as a formula by which theslope of thetangent line to the curve can be computed at any point on the curve, once the position of that point has been calculated.

The idea is that while the curve is initially unknown, its starting point, which we denote byA0,{\displaystyle A_{0},} is known (see Figure 1). Then, from the differential equation, the slope to the curve atA0{\displaystyle A_{0}} can be computed, and so, the tangent line.

Take a small step along that tangent line up to a pointA1.{\displaystyle A_{1}.} Along this small step, the slope does not change too much, soA1{\displaystyle A_{1}} will be close to the curve. If we pretend thatA1{\displaystyle A_{1}} is still on the curve, the same reasoning as for the pointA0{\displaystyle A_{0}} above can be used. After several steps, apolygonal curve (A0,A1,A2,A3,{\displaystyle A_{0},A_{1},A_{2},A_{3},\dots }) is computed. In general, this curve does not diverge too far from the original unknown curve, and the error between the two curves can be made small if the step size is small enough and the interval of computation is finite.[2]

First-order process

[edit]

When given the values fort0{\displaystyle t_{0}} andy(t0){\displaystyle y(t_{0})}, and the derivative ofy{\displaystyle y} is a given function oft{\displaystyle t} andy{\displaystyle y} denoted asy(t)=f(t,y(t)){\displaystyle y'(t)=f\left(t,y(t)\right)}. Begin the process by settingy0=y(t0){\displaystyle y_{0}=y(t_{0})}. Next, choose a valueh{\displaystyle h} for the size of every step along t-axis, and settn=t0+nh{\displaystyle t_{n}=t_{0}+nh} (or equivalentlytn+1=tn+h{\displaystyle t_{n+1}=t_{n}+h}). Now, the Euler method is used to findyn+1{\displaystyle y_{n+1}} fromyn{\displaystyle y_{n}} andtn{\displaystyle t_{n}}:[3]

yn+1=yn+hf(tn,yn).{\displaystyle y_{n+1}=y_{n}+hf(t_{n},y_{n}).}

The value ofyn{\displaystyle y_{n}} is an approximation of the solution at timetn{\displaystyle t_{n}}, i.e.,yny(tn){\displaystyle y_{n}\approx y(t_{n})}. The Euler method isexplicit, i.e. the solutionyn+1{\displaystyle y_{n+1}} is an explicit function ofyi{\displaystyle y_{i}} forin{\displaystyle i\leq n}.

Higher-order process

[edit]

While the Euler method integrates a first-order ODE, any ODE of orderN{\displaystyle N} can be represented as a system of first-order ODEs. When given the ODE of orderN{\displaystyle N} defined as

y(N+1)(t)=f(t,y(t),y(t),,y(N)(t)),{\displaystyle y^{(N+1)}(t)=f\left(t,y(t),y'(t),\ldots ,y^{(N)}(t)\right),}

as well ash{\displaystyle h},t0{\displaystyle t_{0}}, andy0,y0,,y0(N){\displaystyle y_{0},y'_{0},\dots ,y_{0}^{(N)}}, we implement the following formula until we reach the approximation of the solution to the ODE at the desired time:

yi+1=(yi+1yi+1yi+1(N1)yi+1(N))=(yi+hyiyi+hyiyi(N1)+hyi(N)yi(N)+hf(ti,yi,yi,,yi(N))){\displaystyle {\vec {y}}_{i+1}={\begin{pmatrix}y_{i+1}\\y'_{i+1}\\\vdots \\y_{i+1}^{(N-1)}\\y_{i+1}^{(N)}\end{pmatrix}}={\begin{pmatrix}y_{i}+h\cdot y'_{i}\\y'_{i}+h\cdot y''_{i}\\\vdots \\y_{i}^{(N-1)}+h\cdot y_{i}^{(N)}\\y_{i}^{(N)}+h\cdot f\left(t_{i},y_{i},y'_{i},\ldots ,y_{i}^{(N)}\right)\end{pmatrix}}}

These first-order systems can be handled by Euler's method or, in fact, by any other scheme for first-order systems.[4]

First-order example

[edit]

Given the initial value problem

y=y,y(0)=1,{\displaystyle y'=y,\quad y(0)=1,}

we would like to use the Euler method to approximatey(4){\displaystyle y(4)}.[5]

Using step size equal to 1 (h = 1)

[edit]
(Figure 2) Illustration of numerical integration for the equationy=y,y(0)=1.{\displaystyle y'=y,y(0)=1.} Blue is the Euler method; green, themidpoint method; red, the exact solution,y=et.{\displaystyle y=e^{t}.} The step size ish=1.0.{\displaystyle h=1.0.}

The Euler method is

yn+1=yn+hf(tn,yn).{\displaystyle y_{n+1}=y_{n}+hf(t_{n},y_{n}).}

so first we must computef(t0,y0){\displaystyle f(t_{0},y_{0})}. In this simple differential equation, the functionf{\displaystyle f} is defined byf(t,y)=y{\displaystyle f(t,y)=y}. We have

f(t0,y0)=f(0,1)=1.{\displaystyle f(t_{0},y_{0})=f(0,1)=1.}

By doing the above step, we have found the slope of the line that is tangent to the solution curve at the point(0,1){\displaystyle (0,1)}. Recall that the slope is defined as the change iny{\displaystyle y} divided by the change int{\displaystyle t}, orΔyΔt{\textstyle {\frac {\Delta y}{\Delta t}}}.

The next step is to multiply the above value by the step sizeh{\displaystyle h}, which we take equal to one here:

hf(y0)=11=1.{\displaystyle h\cdot f(y_{0})=1\cdot 1=1.}

Since the step size is the change int{\displaystyle t}, when we multiply the step size and the slope of the tangent, we get a change iny{\displaystyle y} value. This value is then added to the initialy{\displaystyle y} value to obtain the next value to be used for computations.

y0+hf(y0)=y1=1+11=2.{\displaystyle y_{0}+hf(y_{0})=y_{1}=1+1\cdot 1=2.}

The above steps should be repeated to findy2{\displaystyle y_{2}},y3{\displaystyle y_{3}} andy4{\displaystyle y_{4}}.

y2=y1+hf(y1)=2+12=4,y3=y2+hf(y2)=4+14=8,y4=y3+hf(y3)=8+18=16.{\displaystyle {\begin{aligned}y_{2}&=y_{1}+hf(y_{1})=2+1\cdot 2=4,\\y_{3}&=y_{2}+hf(y_{2})=4+1\cdot 4=8,\\y_{4}&=y_{3}+hf(y_{3})=8+1\cdot 8=16.\end{aligned}}}

Due to the repetitive nature of this algorithm, it can be helpful to organize computations in a chart form, as seen below, to avoid making errors.

n{\displaystyle n}yn{\displaystyle y_{n}}tn{\displaystyle t_{n}}f(tn,yn){\displaystyle f(t_{n},y_{n})}h{\displaystyle h}Δy{\displaystyle \Delta y}yn+1{\displaystyle y_{n+1}}
0101112
1212124
2424148
38381816

The conclusion of this computation is thaty4=16{\displaystyle y_{4}=16}. The exact solution of the differential equation isy(t)=et{\displaystyle y(t)=e^{t}}, soy(4)=e454.598{\displaystyle y(4)=e^{4}\approx 54.598}. Although the approximation of the Euler method was not very precise in this specific case, particularly due to a large value step sizeh{\displaystyle h}, its behaviour is qualitatively correct as the figure shows.

Using other step sizes

[edit]
(Figure 3) The same illustration forh=0.25.{\displaystyle h=0.25.}

As suggested in the introduction, the Euler method is more accurate if the step sizeh{\displaystyle h} is smaller. The table below shows the result with different step sizes. The top row corresponds to the example in the previous section, and the second row is illustrated in the figure.

step sizeresult of Euler's methoderror
116.0038.60
0.2535.5319.07
0.145.269.34
0.0549.565.04
0.02551.982.62
0.012553.261.34

The error recorded in the last column of the table is the difference between the exact solution att=4{\displaystyle t=4} and the Euler approximation. In the bottom of the table, the step size is half the step size in the previous row, and the error is also approximately half the error in the previous row. This suggests that the error is roughly proportional to the step size, at least for fairly small values of the step size. This is true in general, also for other equations; see the sectionGlobal truncation error for more details.

Other methods, such as themidpoint method also illustrated in the figures, behave more favourably: the global error of the midpoint method is roughly proportional to thesquare of the step size. For this reason, the Euler method is said to be a first-order method, while the midpoint method is second order.

We can extrapolate from the above table that the step size needed to get an answer that is correct to three decimal places is approximately 0.00001, meaning that we need 400,000 steps. This large number of steps entails a high computational cost. For this reason, higher-order methods are employed such asRunge–Kutta methods orlinear multistep methods, especially if a high accuracy is desired.[6]

Higher-order example

[edit]

For this third-order example, assume that the following information is given:

y+4tyt2y(cost)y=sintt0=0y0=y(t0)=2y0=y(t0)=1y0=y(t0)=3h=0.5{\displaystyle {\begin{aligned}&y'''+4ty''-t^{2}y'-(\cos {t})y=\sin {t}\\&t_{0}=0\\&y_{0}=y(t_{0})=2\\&y'_{0}=y'(t_{0})=-1\\&y''_{0}=y''(t_{0})=3\\&h=0.5\end{aligned}}}

From this we can isolatey''' to get the equation:

y=f(t,y,y,y)=sint+(cost)y+t2y4ty{\displaystyle y'''=f{\left(t,y,y',y''\right)}=\sin {t}+\left(\cos {t}\right)y+t^{2}y'-4ty''}

Using that we can get the solution fory1{\displaystyle {\vec {y}}_{1}}:y1=(y1y1y1)=(y0y0y0)+h(y0y0f(t0,y0,y0,y0))=(213)+0.5(13sin0+(cos0)2+02(1)403)=(1.50.54){\displaystyle {\begin{aligned}{\vec {y}}_{1}&={\begin{pmatrix}y_{1}\\y_{1}'\\y_{1}''\end{pmatrix}}={\begin{pmatrix}y_{0}\\y'_{0}\\y''_{0}\end{pmatrix}}+h{\begin{pmatrix}y'_{0}\\y''_{0}\\f{\left(t_{0},y_{0},y'_{0},y''_{0}\right)}\end{pmatrix}}\\[1ex]&={\begin{pmatrix}2\\-1\\3\end{pmatrix}}+0.5\cdot {\begin{pmatrix}-1\\3\\\sin {0}+(\cos {0})\cdot 2+0^{2}\cdot (-1)-4\cdot 0\cdot 3\end{pmatrix}}\\[1ex]&={\begin{pmatrix}1.5\\0.5\\4\end{pmatrix}}\end{aligned}}}And using the solution fory1{\displaystyle {\vec {y}}_{1}}, we can get the solution fory2{\displaystyle {\vec {y}}_{2}}:y2=(y2y2y2)=(y1y1y1)+h(y1y1f(t1,y1,y1,y1))=(1.50.54)+0.5(0.54sin0.5+(cos0.5)1.5+0.520.540.54)=(1.752.50.9604...){\displaystyle {\begin{aligned}{\vec {y}}_{2}&={\begin{pmatrix}y_{2}\\y_{2}'\\y_{2}''\end{pmatrix}}={\begin{pmatrix}y_{1}\\y'_{1}\\y''_{1}\end{pmatrix}}+h{\begin{pmatrix}y'_{1}\\y''_{1}\\f{\left(t_{1},y_{1},y'_{1},y''_{1}\right)}\end{pmatrix}}\\[1ex]&={\begin{pmatrix}1.5\\0.5\\4\end{pmatrix}}+0.5\cdot {\begin{pmatrix}0.5\\4\\\sin {0.5}+(\cos {0.5})\cdot 1.5+0.5^{2}\cdot 0.5-4\cdot 0.5\cdot 4\end{pmatrix}}\\[1ex]&={\begin{pmatrix}1.75\\2.5\\0.9604...\end{pmatrix}}\end{aligned}}}We can continue this process using the same formula as long as necessary to find whicheveryi{\displaystyle {\vec {y}}_{i}} desired.

Derivation

[edit]

The Euler method can be derived in a number of ways.

  1. Firstly, there is the geometrical description above.
  2. Another possibility is to consider theTaylor expansion of the functiony{\displaystyle y} aroundt0{\displaystyle t_{0}}:

    y(t0+h)=y(t0)+hy(t0)+12h2y(t0)+O(h3).{\displaystyle y(t_{0}+h)=y(t_{0})+hy'(t_{0})+{\tfrac {1}{2}}h^{2}y''(t_{0})+O\left(h^{3}\right).}

    The differential equation states thaty=f(t,y){\displaystyle y'=f(t,y)}. If this is substituted in the Taylor expansion and the quadratic and higher-order terms are ignored, the Euler method arises.[7]

    The Taylor expansion is used below to analyze the error committed by the Euler method, and it can be extended to produceRunge–Kutta methods.
  3. A closely related derivation is to substitute the forwardfinite difference formula for the derivative,y(t0)y(t0+h)y(t0)h{\displaystyle y'(t_{0})\approx {\frac {y(t_{0}+h)-y(t_{0})}{h}}}in the differential equationy=f(t,y){\displaystyle y'=f(t,y)}. Again, this yields the Euler method.[8]A similar computation leads to themidpoint method and thebackward Euler method.
  4. Finally, one can integrate the differential equation fromt0{\displaystyle t_{0}} tot0+h{\displaystyle t_{0}+h} and apply thefundamental theorem of calculus to get:y(t0+h)y(t0)=t0t0+hf(t,y(t))dt.{\displaystyle y(t_{0}+h)-y(t_{0})=\int _{t_{0}}^{t_{0}+h}f\left(t,y(t)\right)\,\mathrm {d} t.}Now approximate the integral by the left-handrectangle method (with only one rectangle):t0t0+hf(t,y(t))dthf(t0,y(t0)).{\displaystyle \int _{t_{0}}^{t_{0}+h}f\left(t,y(t)\right)\,\mathrm {d} t\approx hf\left(t_{0},y(t_{0})\right).}Combining both equations, one finds again the Euler method.[9]

This line of thought can be continued to arrive at variouslinear multistep methods.

Local truncation error

[edit]

Thelocal truncation error of the Euler method is the error made in a single step. It is the difference between the numerical solution after one step,y1{\displaystyle y_{1}}, and the exact solution at timet1=t0+h{\displaystyle t_{1}=t_{0}+h}. The numerical solution is given by

y1=y0+hf(t0,y0).{\displaystyle y_{1}=y_{0}+hf(t_{0},y_{0}).}

For the exact solution, we use the Taylor expansion mentioned in the sectionDerivation above:

y(t0+h)=y(t0)+hy(t0)+12h2y(t0)+O(h3).{\displaystyle y(t_{0}+h)=y(t_{0})+hy'(t_{0})+{\tfrac {1}{2}}h^{2}y''(t_{0})+{\mathcal {O}}{\left(h^{3}\right)}.}

The local truncation error (LTE) introduced by the Euler method is given by the difference between these equations:

LTE=y(t0+h)y1=12h2y(t0)+O(h3).{\displaystyle \mathrm {LTE} =y(t_{0}+h)-y_{1}={\tfrac {1}{2}}h^{2}y''(t_{0})+{\mathcal {O}}{\left(h^{3}\right)}.}

This result is valid ify{\displaystyle y} has a bounded third derivative.[10]

This shows that for smallh{\displaystyle h}, the local truncation error is approximately proportional toh2{\displaystyle h^{2}}. This makes the Euler method less accurate than higher-order techniques such asRunge–Kutta methods andlinear multistep methods, for which the local truncation error is proportional to a higher power of the step size.

A slightly different formulation for the local truncation error can be obtained by using the Lagrange form for the remainder term inTaylor's theorem. Ify{\displaystyle y} has a continuous second derivative, then there exists aξ[t0,t0+h]{\displaystyle \xi \in [t_{0},t_{0}+h]} such that[11]

LTE=y(t0+h)y1=12h2y(ξ).{\displaystyle \mathrm {LTE} =y(t_{0}+h)-y_{1}={\tfrac {1}{2}}h^{2}y''(\xi ).}

In the above expressions for the error, the second derivative of the unknown exact solutiony{\displaystyle y} can be replaced by an expression involving the right-hand side of the differential equation. Indeed, it follows from the equationy=f(t,y){\displaystyle y'=f(t,y)} that[12]

y(t0)=ft(t0,y(t0))+fy(t0,y(t0))f(t0,y(t0)).{\displaystyle y''(t_{0})={\frac {\partial f}{\partial t}}\left(t_{0},y(t_{0})\right)+{\frac {\partial f}{\partial y}}\left(t_{0},y(t_{0})\right)\,f\left(t_{0},y(t_{0})\right).}

Global truncation error

[edit]

Theglobal truncation error is the error at a fixed timeti{\displaystyle t_{i}}, after however many steps the method needs to take to reach that time from the initial time. The global truncation error is the cumulative effect of the local truncation errors committed in each step.[13] The number of steps is easily determined to betit0h{\textstyle {\frac {t_{i}-t_{0}}{h}}}, which is proportional to1h{\textstyle {\frac {1}{h}}}, and the error committed in each step is proportional toh2{\displaystyle h^{2}} (see the previous section). Thus, it is to be expected that the global truncation error will be proportional toh{\displaystyle h}.[14]

This intuitive reasoning can be made precise. If the solutiony{\displaystyle y} has a bounded second derivative andf{\displaystyle f} isLipschitz continuous in its second argument, then the global truncation error (denoted as|y(ti)yi|{\displaystyle |y(t_{i})-y_{i}|}) is bounded by

|y(ti)yi|hM2L(eL(tit0)1){\displaystyle \left|y(t_{i})-y_{i}\right|\leq {\frac {hM}{2L}}\left(e^{L(t_{i}-t_{0})}-1\right)}

whereM{\displaystyle M} is an upper bound on the second derivative ofy{\displaystyle y} on the given interval andL{\displaystyle L} is the Lipschitz constant off{\displaystyle f}.[15] Or more simply, wheny(t)=f(t,y){\displaystyle y'(t)=f(t,y)}, the valueL=max(|ddy[f(t,y)]|){\textstyle L={\text{max}}\left(|{\frac {d}{dy}}\left[f(t,y)\right]|\right)} (such thatt{\displaystyle t} is treated as a constant). In contrast,M=max(|d2dt2[y(t)]|){\textstyle M=\max \left(\left|{\frac {d^{2}}{dt^{2}}}\left[y(t)\right]\right|\right)} where functiony(t){\displaystyle y(t)} is the exact solution which only contains thet{\displaystyle t} variable.

The precise form of this bound is of little practical importance, as in most cases the bound vastly overestimates the actual error committed by the Euler method.[16] What is important is that it shows that the global truncation error is (approximately) proportional toh{\displaystyle h}. For this reason, the Euler method is said to be first order.[17]

Example

[edit]

If we have the differential equationy=1+(ty)2{\displaystyle y'=1+(t-y)^{2}}, and the exact solutiony=t+1t1{\displaystyle y=t+{\frac {1}{t-1}}}, and we want to findM{\displaystyle M} andL{\displaystyle L} for when2t3{\displaystyle 2\leq t\leq 3}.L=max|ddyf(t,y)|=max2t3|ddy[1+(ty)2]|=max2t3|2(ty)|=max2t3|2(t[t+1t1])|=max2t3|2t1|=2{\displaystyle {\begin{aligned}L&=\max \left|{\frac {d}{dy}}f(t,y)\right|=\max _{2\leq t\leq 3}\left|{\frac {d}{dy}}\left[1+\left(t-y\right)^{2}\right]\right|\\[1ex]&=\max _{2\leq t\leq 3}\left|2\left(t-y\right)\right|=\max _{2\leq t\leq 3}\left|2\left(t-\left[t+{\frac {1}{t-1}}\right]\right)\right|\\[1ex]&=\max _{2\leq t\leq 3}\left|-{\frac {2}{t-1}}\right|=2\end{aligned}}}M=max|d2dt2[y(t)]|=max2t3|d2dt2(t+11t)|=max2t3|2(t+1)3|=2{\displaystyle {\begin{aligned}M&=\max \left|{\frac {d^{2}}{dt^{2}}}\left[y(t)\right]\right|\\&=\max _{2\leq t\leq 3}\left|{\frac {d^{2}}{dt^{2}}}\left(t+{\frac {1}{1-t}}\right)\right|\\&=\max _{2\leq t\leq 3}\left|{\frac {2}{\left(-t+1\right)^{3}}}\right|=2\end{aligned}}}Thus we can find the error bound att=2.5 andh=0.5:

error bound=hM2L(eL(tit0)1)=0.5222(e2(2.52)1)=0.42957{\displaystyle {\begin{aligned}{\text{error bound}}&={\frac {hM}{2L}}\left(e^{L(t_{i}-t_{0})}-1\right)\\[1ex]&={\frac {0.5\cdot 2}{2\cdot 2}}\left(e^{2(2.5-2)}-1\right)=0.42957\end{aligned}}}Notice thatt0 is equal to 2 because it is the lower bound for t in2t3{\displaystyle 2\leq t\leq 3}.

Numerical stability

[edit]
(Figure 4) Solution ofy=2.3y{\displaystyle y'=-2.3y} computed with the Euler method with step sizeh=1{\displaystyle h=1} (blue squares) andh=0.7{\displaystyle h=0.7} (red circles). The black curve shows the exact solution.

The Euler method can also be numericallyunstable, especially forstiff equations, meaning that the numerical solution grows very large for equations where the exact solution does not. This can be illustrated using the linear equationy=2.3y,y(0)=1.{\displaystyle y'=-2.3y,\qquad y(0)=1.}The exact solution isy(t)=e2.3t{\displaystyle y(t)=e^{-2.3t}}, which decays to zero ast{\displaystyle t\to \infty }. However, if the Euler method is applied to this equation with step sizeh=1{\displaystyle h=1}, then the numerical solution is qualitatively wrong: It oscillates and grows (see the figure). This is what it means to be unstable. If a smaller step size is used, for instanceh=0.7{\displaystyle h=0.7}, then the numerical solution does decay to zero.

(Figure 5) The pink disk shows the stability region for the Euler method.

If the Euler method is applied to the linear equationy=ky{\displaystyle y'=ky}, then the numerical solution is unstable if the producthk{\displaystyle hk} is outside the region{zC||z+1|1},{\displaystyle \left\{z\in \mathbf {C} \,{\big |}\,|z+1|\leq 1\right\},}illustrated on the right. This region is called the (linear)stability region.[18] In the example,k=2.3{\displaystyle k=-2.3}, so ifh=1{\displaystyle h=1} thenhk=2.3{\displaystyle hk=-2.3} which is outside the stability region, and thus the numerical solution is unstable.

This limitation — along with its slow convergence of error withh{\displaystyle h} — means that the Euler method is not often used, except as a simple example of numerical integration[citation needed]. Frequently models of physical systems contain terms representing fast-decaying elements (i.e. with large negative exponential arguments). Even when these are not of interest in the overall solution, the instability they can induce means that an exceptionally small timestep would be required if the Euler method is used.

Rounding errors

[edit]

In stepn{\displaystyle n} of the Euler method, therounding error is roughly of the magnitudeεyn{\displaystyle \varepsilon y_{n}} whereε{\displaystyle \varepsilon } is themachine epsilon. Assuming that the rounding errors are independent random variables, the expected total rounding error is proportional toεh{\textstyle {\frac {\varepsilon }{\sqrt {h}}}}.[19] Thus, for extremely small values of the step size the truncation error will be small but the effect of rounding error may be big. Most of the effect of rounding error can be easily avoided ifcompensated summation is used in the formula for the Euler method.[20]

Modifications and extensions

[edit]

A simple modification of the Euler method which eliminates the stability problems notedabove is thebackward Euler method:yn+1=yn+hf(tn+1,yn+1).{\displaystyle y_{n+1}=y_{n}+hf(t_{n+1},y_{n+1}).}This differs from the (standard, or forward) Euler method in that the functionf{\displaystyle f} is evaluated at the end point of the step, instead of the starting point. The backward Euler method is animplicit method, meaning that the formula for the backward Euler method hasyn+1{\displaystyle y_{n+1}} on both sides, so when applying the backward Euler method we have to solve an equation. This makes the implementation more costly.

Other modifications of the Euler method that help with stability yield theexponential Euler method or thesemi-implicit Euler method.

More complicated methods can achieve a higher order (and more accuracy). One possibility is to use more function evaluations. This is illustrated by themidpoint method which is already mentioned in this article:yn+1=yn+hf(tn+12h,yn+12hf(tn,yn)){\displaystyle y_{n+1}=y_{n}+hf\left(t_{n}+{\tfrac {1}{2}}h,y_{n}+{\tfrac {1}{2}}hf(t_{n},y_{n})\right)}.This leads to the family ofRunge–Kutta methods.

The other possibility is to use more past values, as illustrated by the two-step Adams–Bashforth method:yn+1=yn+32hf(tn,yn)12hf(tn1,yn1).{\displaystyle y_{n+1}=y_{n}+{\tfrac {3}{2}}hf(t_{n},y_{n})-{\tfrac {1}{2}}hf(t_{n-1},y_{n-1}).}This leads to the family oflinear multistep methods. There are other modifications which uses techniques from compressive sensing to minimize memory usage[21]

In popular culture

[edit]

In the filmHidden Figures,Katherine Johnson resorts to the Euler method in calculating the re-entry of astronautJohn Glenn from Earth orbit.[22]

See also

[edit]

Notes

[edit]
  1. ^Butcher 2003, p. 45;Hairer, Nørsett & Wanner 1993, p. 35
  2. ^Atkinson 1989, p. 342;Butcher 2003, p. 60
  3. ^Butcher 2003, p. 45;Hairer, Nørsett & Wanner 1993, p. 36
  4. ^Butcher 2003, p. 3;Hairer, Nørsett & Wanner 1993, p. 2
  5. ^See alsoAtkinson 1989, p. 344
  6. ^Hairer, Nørsett & Wanner 1993, p. 40
  7. ^Atkinson 1989, p. 342;Hairer, Nørsett & Wanner 1993, p. 36
  8. ^Atkinson 1989, p. 342
  9. ^Atkinson 1989, p. 343
  10. ^Butcher 2003, p. 60
  11. ^Atkinson 1989, p. 342
  12. ^Stoer & Bulirsch 2002, p. 474
  13. ^Atkinson 1989, p. 344
  14. ^Butcher 2003, p. 49
  15. ^Atkinson 1989, p. 346;Lakoba 2012, equation (1.16)
  16. ^Iserles 1996, p. 7
  17. ^Butcher 2003, p. 63
  18. ^Butcher 2003, p. 70;Iserles 1996, p. 57
  19. ^Butcher 2003, pp. 74–75
  20. ^Butcher 2003, pp. 75–78
  21. ^Unni, M. P.; Chandra, M. G.; Kumar, A. A. (March 2017). "Memory reduction for numerical solution of differential equations using compressive sensing".2017 IEEE 13th International Colloquium on Signal Processing & its Applications (CSPA). pp. 79–84.doi:10.1109/CSPA.2017.8064928.ISBN 978-1-5090-1184-1.S2CID 13082456.
  22. ^Khan, Amina (9 January 2017)."Meet the 'Hidden Figures' mathematician who helped send Americans into space".Los Angeles Times. Retrieved12 February 2017.

References

[edit]

External links

[edit]
The WikibookCalculus has a page on the topic of:Euler's Method
First-order methods
Second-order methods
Higher-order methods
Theory
Related
Retrieved from "https://en.wikipedia.org/w/index.php?title=Euler_method&oldid=1322588975"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp