Articulo de referencia

Euler method

(Figure 1) Illustration of the Euler method. The unknown curve is in blue, and its polygonal approximation is in red. In mathematics and computational science , the Euler method...

(Figure 1) Illustration of the Euler method. The unknown curve is in blue, and its polygonal approximation is in red.

In mathematics and computational science, the Euler method (also called the forward 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 named after Leonhard Euler, who first proposed it in his book Institutionum 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

Purpose and why it works

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 the slope of the tangent 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 by A0,{\displaystyle A_{0},} is known (see Figure 1). Then, from the differential equation, the slope to the curve at A0{\displaystyle A_{0}} can be computed, and so, the tangent line.

Take a small step along that tangent line up to a point A1.{\displaystyle A_{1}.} Along this small step, the slope does not change too much, so A1{\displaystyle A_{1}} will be close to the curve. If we pretend that A1{\displaystyle A_{1}} is still on the curve, the same reasoning as for the point A0{\displaystyle A_{0}} above can be used. After several steps, a polygonal 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

When given the values for t0{\displaystyle t_{0}} and y(t0){\displaystyle y(t_{0})}, and the derivative of y{\displaystyle y} is a given function of t{\displaystyle t} and y{\displaystyle y} denoted as y(t)=f(t,y(t)){\displaystyle y'(t)=f\left(t,y(t)\right)}. Begin the process by setting y0=y(t0){\ Displaystyle y_ {0} = y (t_ {0})}. Next, choose a value h{\displaystyle h} for the size of every step along t-axis, and set tn=t0+nh{\displaystyle t_{n}=t_{0}+nh} (or equivalently tn+1=tn+h{\displaystyle t_{n+1}=t_{n}+h}). Now, the Euler method is used to find yn+1{\displaystyle y_{n+1}} from yn{\displaystyle y_{n}} and tn{\displaystyle t_{n}}:[3]

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

The value of yn{\displaystyle y_{n}} is an approximation of the solution at time tn{\displaystyle t_{n}}, i.e., yny(tn){\displaystyle y_{n}\approx y(t_{n})}. The Euler method is explicit, i.e. the solution yn+1{\displaystyle y_{n+1}} is an explicit function of yi{\displaystyle y_{i}} for in{\displaystyle i\leq n}.

Higher-order process

While the Euler method integrates a first-order ODE, any ODE of order N{\displaystyle N} can be represented as a system of first-order ODEs. When given the ODE of order N{\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 as h{\displaystyle h}, t0{\displaystyle t_{0}}, and y0,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

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 approximate y(4){\displaystyle y(4)}.[5]

Using step size equal to 1 (h = 1)

(Figure 2) Illustration of numerical integration for the equation y=y,y(0)=1.{\displaystyle y'=y,y(0)=1.} Blue is the Euler method; green, the midpoint method; red, the exact solution, y=et.{\displaystyle y=e^{t}.} The step size is h=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 compute f(t0,y0){\displaystyle f(t_{0},y_{0})}. In this simple differential equation, the function f{\displaystyle f} is defined by f(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 in y{\displaystyle y} divided by the change in t{\displaystyle t}, or ΔyΔt{\textstyle {\frac {\Delta y}{\Delta t}}}.

The next step is to multiply the above value by the step size h{\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 in t{\displaystyle t}, when we multiply the step size and the slope of the tangent, we get a change in y{\displaystyle y} value. This value is then added to the initial y{\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 find y2{\displaystyle y_{2}}, y3{\displaystyle y_{3}} and y4{\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{alineado}}}

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.

The conclusion of this computation is that y4=16{\displaystyle y_{4}=16}. The exact solution of the differential equation is y(t)=et{\displaystyle y(t)=e^{t}}, so y(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 size h{\displaystyle h}, its behaviour is qualitatively correct as the figure shows.

Using other step sizes

(Figure 3) The same illustration for h=0.25.{\displaystyle h=0.25.}

As suggested in the introduction, the Euler method is more accurate if the step size h{\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.

The error recorded in the last column of the table is the difference between the exact solution at t=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 section Global truncation error for more details.

Other methods, such as the midpoint method also illustrated in the figures, behave more favourably: the global error of the midpoint method is roughly proportional to the square 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 as Runge–Kutta methods or linear multistep methods, especially if a high accuracy is desired.[6]

Higher-order example

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}}}

A partir de esto podemos aislar y ''' para obtener la ecuación:

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

Usando eso podemos obtener la solución paray1{\displaystyle {\vec {y}}_{1}}: y1=(y1y1y1)=(y0y0y0)+h(y0y0F(t0,y0,y0,y0))=(213)+0,5(13pecado0+(porque0)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}}}Y utilizando la solución paray1{\displaystyle {\vec {y}}_{1}}, podemos obtener la solución paray2{\displaystyle {\vec {y}}_{2}}:y2=(y2y2y2)=(y1y1y1)+h(y1y1F(t1,y1,y1,y1))=(1.50,54)+0,5(0,54pecado0,5+(porque0,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}}}Podemos continuar este proceso utilizando la misma fórmula durante el tiempo que sea necesario para encontrar cualquiera.yi{\displaystyle {\vec {y}}_{i}}deseado.

Derivación

El método de Euler se puede derivar de varias maneras.

  1. En primer lugar, está la descripción geométrica anterior.
  2. Otra posibilidad es considerar el desarrollo de Taylor de la funcióny{\displaystyle y}alrededort0{\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).} La ecuación diferencial establece quey=F(t,y){\displaystyle y'=f(t,y)}Si esto se sustituye en el desarrollo de Taylor y se ignoran los términos cuadráticos y de orden superior, surge el método de Euler. [ 7 ] El desarrollo de Taylor se utiliza a continuación para analizar el error cometido por el método de Euler, y puede extenderse para producir métodos de Runge-Kutta .
  3. Una derivación estrechamente relacionada consiste en sustituir la fórmula de diferencias finitas hacia adelante por la derivada, y(t0)y(t0+h)y(t0)h{\displaystyle y'(t_{0})\approx {\frac {y(t_{0}+h)-y(t_{0})}{h}}} en la ecuación diferencialy=F(t,y){\displaystyle y'=f(t,y)}. Nuevamente, esto produce el método de Euler. [ 8 ] Un cálculo similar conduce al método del punto medio y al método de Euler hacia atrás .
  4. Finalmente, se puede integrar la ecuación diferencial desdet0{\displaystyle t_{0}}at0+h{\displaystyle t_{0}+h}y aplicamos el teorema fundamental del cálculo para obtener: 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.}Ahora aproximemos la integral mediante el método del rectángulo de la izquierda (con un solo rectángulo): 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).} Combinando ambas ecuaciones, se obtiene nuevamente el método de Euler. [ 9 ]

Esta línea de pensamiento puede continuarse para llegar a varios métodos lineales de múltiples pasos .

Error de truncamiento local

El error de truncamiento local del método de Euler es el error cometido en un solo paso. Es la diferencia entre la solución numérica después de un paso,y1{\displaystyle y_{1}}y la solución exacta en ese momentot1=t0+h{\displaystyle t_{1}=t_{0}+h}La solución numérica viene dada por

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

Para obtener la solución exacta, utilizamos el desarrollo de Taylor mencionado en la sección Derivación anterior:

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)}.}

El error de truncamiento local (LTE) introducido por el método de Euler viene dado por la diferencia entre estas ecuaciones:

LTmi=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)}.}

Este resultado es válido siy{\displaystyle y}tiene una tercera derivada acotada. [ 10 ]

Esto demuestra que para pequeñosh{\displaystyle h}, el error de truncamiento local es aproximadamente proporcional ah2{\displaystyle h^{2}}Esto hace que el método de Euler sea menos preciso que las técnicas de orden superior, como los métodos de Runge-Kutta y los métodos lineales de pasos múltiples , para los cuales el error de truncamiento local es proporcional a una potencia mayor del tamaño del paso.

Se puede obtener una formulación ligeramente diferente para el error de truncamiento local utilizando la forma de Lagrange para el término restante en el teorema de Taylor . Siy{\displaystyle y}tiene una segunda derivada continua, entonces existe unaξ[t0,t0+h]{\displaystyle \xi \in [t_{0},t_{0}+h]}de tal manera que [ 11 ]

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

En las expresiones anteriores para el error, la segunda derivada de la solución exacta desconociday{\displaystyle y}puede ser reemplazado por una expresión que involucre el lado derecho de la ecuación diferencial. De hecho, se deduce de la ecuacióny=F(t,y){\displaystyle y'=f(t,y)}que [ 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).}

Error de truncamiento global

El error de truncamiento global es el error en un tiempo fijo.ti{\displaystyle t_{i}}, después de la cantidad de pasos que el método necesite tomar para llegar a ese tiempo desde el tiempo inicial. El error de truncamiento global es el efecto acumulativo de los errores de truncamiento locales cometidos en cada paso. [ 13 ] El número de pasos se determina fácilmente comotit0h{\textstyle {\frac {t_{i}-t_{0}}{h}}}, que es proporcional a1h{\textstyle {\frac {1}{h}}}y el error cometido en cada paso es proporcional ah2{\displaystyle h^{2}}(véase la sección anterior). Por lo tanto, cabe esperar que el error de truncamiento global sea proporcional ah{\displaystyle h}. [ 14 ]

Este razonamiento intuitivo se puede precisar. Si la solucióny{\displaystyle y}tiene una segunda derivada acotada yF{\displaystyle f}es Lipschitz continua en su segundo argumento, entonces el error de truncamiento global (denotado como|y(ti)yi|{\displaystyle |y(t_{i})-y_{i}|}) está delimitado por

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

dóndeMETRO{\displaystyle M}es una cota superior para la segunda derivada dey{\displaystyle y}en el intervalo dado yL{\displaystyle L}es la constante de Lipschitz deF{\displaystyle f}. [ 15 ] O más simplemente, cuandoy(t)=F(t,y){\displaystyle y'(t)=f(t,y)}, el valorL=máximo(|ddy[F(t,y)]|){\textstyle L={\text{max}}\left(|{\frac {d}{dy}}\left[f(t,y)\right]|\right)}(de tal manera quet{\displaystyle t}se trata como una constante). En cambio,METRO=máximo(|d2dt2[y(t)]|){\textstyle M=\max \left(\left|{\frac {d^{2}}{dt^{2}}}\left[y(t)\right]\right|\right)}donde funcióny(t){\displaystyle y(t)}es la solución exacta que solo contiene lat{\displaystyle t}variable.

La forma precisa de esta cota tiene poca importancia práctica, ya que en la mayoría de los casos la cota sobreestima enormemente el error real cometido por el método de Euler. [ 16 ] Lo importante es que muestra que el error de truncamiento global es (aproximadamente) proporcional ah{\displaystyle h}Por esta razón, se dice que el método de Euler es de primer orden. [ 17 ]

Ejemplo

Si tenemos la ecuación diferencialy=1+(ty)2{\displaystyle y'=1+(t-y)^{2}}y la solución exactay=t+1t1{\displaystyle y=t+{\frac {1}{t-1}}}y queremos encontrarMETRO{\displaystyle M}yL{\displaystyle L}para cuando2t3{\displaystyle 2\leq t\leq 3}. L=máximo|ddyF(t,y)|=máximo2t3|ddy[1+(ty)2]|=máximo2t3|2(ty)|=máximo2t3|2(t[t+1t1])|=máximo2t3|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}}}METRO=máximo|d2dt2[y(t)]|=máximo2t3|d2dt2(t+11t)|=máximo2t3|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}}} De esta forma podemos hallar el límite de error en t = 2,5 y h = 0,5:

límite de error=hMETRO2L(miL(tit0)1)=0,5222(mi2(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}}} Nótese que t 0 es igual a 2 porque es el límite inferior para t en2t3{\displaystyle 2\leq t\leq 3}.

Estabilidad numérica

(Figura 4) Solución dey=2.3y{\displaystyle y'=-2.3y}calculado con el método de Euler con tamaño de pasoh=1{\displaystyle h=1}(cuadrados azules) yh=0,7{\displaystyle h=0.7}(círculos rojos). La curva negra muestra la solución exacta.

The Euler method can also be numerically unstable, especially for stiff equations, meaning that the numerical solution grows very large for equations where the exact solution does not. This can be illustrated using the linear equation y=2.3y,y(0)=1.{\displaystyle y'=-2.3y,\qquad y(0)=1.} The exact solution is y(t)=e2.3t{\displaystyle y(t)=e^{-2.3t}}, which decays to zero as t{\displaystyle t\to \infty }. However, if the Euler method is applied to this equation with step size h=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 instance h=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 equation y=ky{\displaystyle y'=ky}, then the numerical solution is unstable if the product hk{\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 if h=1{\displaystyle h=1} then hk=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 with h{\displaystyle h} — means that the Euler method is not often used, except as a simple example of numerical integration. 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

In step n{\displaystyle n} of the Euler method, the rounding error is roughly of the magnitude εyn{\displaystyle \varepsilon y_{n}} where ε{\displaystyle \varepsilon } is the machine 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 if compensated summation is used in the formula for the Euler method.[20]

Modifications and extensions

A simple modification of the Euler method which eliminates the stability problems noted above is the backward 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 function f{\displaystyle f} is evaluated at the end point of the step, instead of the starting point. The backward Euler method is an implicit method, meaning that the formula for the backward Euler method has yn+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.

Otras modificaciones del método de Euler que contribuyen a la estabilidad dan lugar al método de Euler exponencial o al método de Euler semiimplícito .

Los métodos más complejos pueden alcanzar un orden superior (y mayor precisión). Una posibilidad es utilizar más evaluaciones de la función. Esto se ilustra con el método del punto medio , que ya se menciona en este artículo: ynorte+1=ynorte+hF(tnorte+12h,ynorte+12hF(tnorte,ynorte)).{\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).} Esto da lugar a la familia de métodos de Runge-Kutta .

La otra posibilidad es utilizar más valores pasados, como lo ilustra el método de dos pasos de Adams-Bashforth: ynorte+1=ynorte+32hF(tnorte,ynorte)12hF(tnorte1,ynorte1).{\displaystyle y_{n+1}=y_{n}+{\tfrac {3}{2}}hf(t_{n},y_{n})-{\tfrac {1}{2}}hf(t_{n-1},y_{n-1}).} Esto da lugar a la familia de métodos lineales multipaso . Existen otras modificaciones que utilizan técnicas de detección compresiva para minimizar el uso de memoria [ 21 ].

En la película Figuras ocultas , Katherine Johnson recurre al método de Euler para calcular la reentrada del astronauta John Glenn desde la órbita terrestre. [ 22 ]

Véase también

Notas

  1. Butcher 2003 , pág. 45 ; Hairer, Nørsett y Wanner 1993 , pág. 35  
  2. Atkinson 1989 , pág. 342 ; Butcher 2003 , pág. 60  
  3. Butcher 2003 , pág. 45 ; Hairer, Nørsett y Wanner 1993 , pág. 36  
  4. Butcher 2003 , pág. 3 ; Hairer, Nørsett y Wanner 1993 , pág. 2  
  5. Véase también Atkinson 1989 , pág. 344 
  6. ^ Hairer, Nørsett y Wanner 1993 , pág. 40 
  7. Atkinson 1989 , pág. 342; Hairer, Nørsett y Wanner 1993 , pág. 36
  8. Atkinson 1989 , pág. 342
  9. Atkinson 1989 , pág. 343
  10. Butcher 2003 , pág. 60 
  11. Atkinson 1989 , pág. 342 
  12. Stoer y Bulirsch 2002 , pág. 474 
  13. Atkinson 1989 , pág. 344 
  14. Butcher 2003 , pág. 49 
  15. ^ Atkinson 1989 , pág. 346 ; Lakoba 2012 , ecuación (1.16) 
  16. Iserles 1996 , pág. 7 
  17. Butcher 2003 , pág. 63 
  18. Butcher 2003 , pág. 70 ; Iserles 1996 , pág. 57  
  19. Butcher 2003 , págs. 74–75 
  20. Butcher 2003 , págs. 75–78 
  21. Unni, MP; Chandra, MG; Kumar, AA (marzo de 2017). "Reducción de memoria para la solución numérica de ecuaciones diferenciales mediante detección compresiva". 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 de enero de 2017). "Conozca a la matemática de 'Figuras ocultas' que ayudó a enviar estadounidenses al espacio" . Los Angeles Times . Consultado el 12 de febrero de 2017 .

Referencias

  • Atkinson, Kendall A. (1989). Introducción al análisis numérico (2.ª  ed.). Nueva York: John Wiley & Sons . ISBN 978-0-471-50023-0.
  • Ascher, Uri M.; Petzold, Linda R. (1998). Métodos informáticos para ecuaciones diferenciales ordinarias y ecuaciones diferenciales-algebraicas . Filadelfia: Society for Industrial and Applied Mathematics . ISBN 978-0-89871-412-8.
  • Butcher, John C. (2003). Métodos numéricos para ecuaciones diferenciales ordinarias . Nueva York: John Wiley & Sons . ISBN 978-0-471-96758-3.
  • Hairer, Ernst; Norsett, Syvert Paul; Wanner, Gerhard (1993). Resolución de ecuaciones diferenciales ordinarias I: Problemas no rígidos . Berlín, Nueva York: Springer-Verlag . ISBN 978-3-540-56670-0.
  • Iserles, Arieh (1996). Un primer curso de análisis numérico de ecuaciones diferenciales . Cambridge University Press . ISBN 978-0-521-55655-2.
  • Stoer, Josef; Bulirsch, Roland (2002). Introducción al análisis numérico (3ª  ed.). Berlín, Nueva York: Springer-Verlag . ISBN 978-0-387-95452-3.
  • Lakoba, Taras I. (2012), Método simple de Euler y sus modificaciones (PDF) (Apuntes de clase para MATH334), Universidad de Vermont , consultado el 29 de febrero de 2012.
  • Unni, M. P. (2017). «Reducción de memoria para la solución numérica de ecuaciones diferenciales mediante detección compresiva». 2017 IEEE 13th International Colloquium on Signal Processing & its Applications (CSPA) . IEEE CSPA . pp. 79–84 . doi : 10.1109/CSPA.2017.8064928 . ISBN  978-1-5090-1184-1. S2CID 13082456 . 
Obtenido de " https://en.wikipedia.org/w/index.php?title=Euler_method&oldid=1342017329 "