This post is also available in:
en
In this section, we summarize the second session about Derivation of Numerical Method. Let's go!
Some Elementary Schemes
- We consider first-order systems of ODEs in explicit form
u′=f(t,u(t)),t∈(t0,t0+T],u(t0)=u0(11)
to determine the unknown function u:[t0,t0+T]→Rd
.
- In components this reads:
⎝⎜⎛u1′(t)⋮ud′(t)⎠⎟⎞=⎝⎜⎛f1(t,u1(t),…,ud(t))⋮fd(t,u1(t),…,ud(t))⎠⎟⎞.
- The right hand side f:[t0,t0+T]×Rd→Rd
is Lipschitz-continuous
∥f(t,u)−f(t,w)∥≤L(t)∥u−w∥.
- Thus, the system has a unique solution.
Taylor's Theorem
An important tool in the derivation and analysis of numerical methods for ODEs is the following theorem.
Theorem (Taylor's Theorem with Lagrangian Remainder)
Let u:I→R
be (n+1)
-times continuosly differentiable. Then, for t
, t+Δt∈I
, it holds
u(t+Δt)=k=0∑nk!u(k)(t)Δtk+(n+1)!u(n+1)(t+θΔt)Δtn+1,θ∈[0,1].
As a consequence of Taylor's theorem we have for n=1
.
u(t+Δt)=u(t)+u′(t)Δt+2u′′(t+ξ)Δt2,0≤ξ≤Δt.
Taken component-wise this hold for vector-valued u
.
Explicit Euler Method
t0<t1<t2<⋯<tN−1<tN=t0+T,Δti=ti+1−ti.
-
yiN
denotes the approximation of u(ti)
computed with N
steps.
-
Take Taylor, use ODE and omit error term to obtain the explicit Euler approximation
u(ti+1)⟹yi+1N=u(ti)+Δtiu′(ti)+2ti+ξiΔti2=u(ti)+Δtif(ti,u(ti))+2ti+ξiΔti2=yiN+Δtif(ti,yiN).
- Assuming yiN=u(ti)
and substracting we obtain
u(ti+1)−yi+1N=2u′′(ti+ξi)Δti2
- The error after one step is O(Δt2)
, how does it propagate?
Implicit Euler Method
- Using Taylor's theorem slightly differently gives
u(ti)⟺u(ti+1)=u(ti+1−Δti)=u(ti+1)−Δtiu′(ti+1)+Δti22u′′(ti+1−ξi)=u(ti+1)−Δtif(ti+1,u(ti+1))+Δti22u′′(ti+1−ξi)−Δtif(ti+1,u(ti+1))=u(ti)−Δti22u′′(ti+1−ξi)
- Which yields the implicit Euler approximation
yi+1N−Δtif(ti+1,yi+1N)=yiN(12)
- Need to solve a nonlinear algebraic equation to obtain yi+1N
which is computationally much more demanding!
Local Error in Implicit Euler Method
u(ti+1)yi+1N=u(ti)+Δtif(ti+1,u(ti+1))−Δti22u′′(ti+1−ξi)=yiN+Δtif(ti,yi+1N)
- Substracting, taking norms and using L
-continuity gives
u(ti+1)−yi+1N∥∥u(ti+1)−yi+1N∥∥=u(ti)−yiN+Δti[f(ti+1,u(ti+1))−f(ti,yi+1N)]−Δti22u′′(ti+1−ξi)≤∥∥u(ti)−yiN∥∥+ΔtiL(ti+1)∥∥u(ti+1)−yi+1N∥∥+2Δti2∥u′′(ti+1−ξi)∥
Implicit Trapezoidal Rule
- Another approach follows from integrating the ODE with the trapezoidal rule
u(ti+1)−u(ti)=ti∫ti+1f(ξ,u(ξ))dξ=2Δti[f(ti,u(ti))+f(ti+1,u(ti+1))]+O(Δti3).
- Resulting in the implicit trapezoidal rule
yi+1N−yiN⟺yi+1N−2Δti.=2Δti[f(ti,yiN)+f(ti+1,yi+1N)]