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

(11)u=f(t,u(t)),t(t0,t0+T],u(t0)=u0 u^{\prime}=f\left(t,u\left(t\right)\right),\quad t\in\left(t_{0},t_{0}+T\right],\quad u\left(t_{0}\right)=u_{0}\tag{11}

to determine the unknown function u ⁣:[t0,t0+T]Rdu\colon\left[t_{0},t_{0}+T\right]\rightarrow\mathbb{R}^{d} .

  • In components this reads:

(u1(t)ud(t))=(f1(t,u1(t),,ud(t))fd(t,u1(t),,ud(t))). \begin{pmatrix} u^{\prime}{1}\left(t\right)\ \vdots\ u^{\prime}\left(t\right) \end{pmatrix}= \begin{pmatrix} f_{1}\left(t,u_{1}\left(t\right),\ldots,u_{d}\left(t\right)\right)\ \vdots\ f_{d}\left(t,u_{1}\left(t\right),\ldots,u_{d}\left(t\right)\right) \end{pmatrix}.

  • The right hand side f ⁣:[t0,t0+T]×RdRdf\colon\left[t_{0},t_{0}+T\right]\times\mathbb{R}^{d}\rightarrow\mathbb{R}^d is Lipschitz-continuous

f(t,u)f(t,w)L(t)uw. \left|f\left(t,u\right)-f\left(t,w\right)\right|\leq L\left(t\right)\left|u-w\right|.

  • 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 ⁣:IRu\colon I\rightarrow\mathbb{R} be (n+1)\left(n+1\right) -times continuosly differentiable. Then, for tt , t+ΔtIt+\Delta t\in I , it holds

u(t+Δt)=k=0nu(k)(t)k!Δtk+u(n+1)(t+θΔt)(n+1)!Δtn+1,θ[0,1]. u\left(t+\Delta t\right)= \sum_{k=0}^{n}\frac{u^{\left(k\right)}\left(t\right)}{k!}\Delta t^{k}+\frac{u^{\left(n+1\right)}\left(t+\theta\Delta t\right)}{\left(n+1\right)!}\Delta t^{n+1},\quad\theta\in\left[0,1\right].

As a consequence of Taylor's theorem we have for n=1n=1 .

u(t+Δt)=u(t)+u(t)Δt+u(t+ξ)2Δt2,0ξΔt. u\left(t+\Delta t\right) =u\left(t\right)+u^{\prime}\left(t\right)\Delta t+\frac{u^{\prime\prime}\left(t+\xi\right)}{2}\Delta t^{2},\quad 0\leq\xi\leq\Delta t.

Taken component-wise this hold for vector-valued uu .

Explicit Euler Method

  • Choose NN time steps

t0<t1<t2<<tN1<tN=t0+T,Δti=ti+1ti. t_{0}<t_{1}<t_{2}<\cdots<t_{N-1}<t_{N} =t_{0}+T,\quad\Delta t_{i}=t_{i+1}-t_{i}.

  • yiNy^{N}{i} denotes the approximation of u(ti)u\left(t\right) computed with NN steps.

  • Take Taylor, use ODE and omit error term to obtain the explicit Euler approximation

u(ti+1)=u(ti)+Δtiu(ti)+ti+ξi2Δti2=u(ti)+Δtif(ti,u(ti))+ti+ξi2Δti2    yi+1N=yiN+Δtif(ti,yiN). \begin{aligned} u\left(t_{i+1}\right) &=u\left(t_{i}\right)+\Delta t_{i}u^{\prime}\left(t_{i}\right)+\frac{t_{i}+\xi_{i}}{2}\Delta t^{2}{i}\ &=u\left(t\right)+\Delta t_{i}f\left(t_{i},u\left(t_{i}\right)\right)+\frac{t_{i}+\xi_{i}}{2}\Delta t^{2}{i}\ \implies y^{N} &=y^{N}{i}+\Delta tf\left(t_{i},y^{N}_{i}\right). \end{aligned}

  • Assuming yiN=u(ti)y^{N}{i}=u\left(t\right) and substracting we obtain

u(ti+1)yi+1N=u(ti+ξi)2Δti2 u\left(t_{i+1}\right)-y^{N}{i+1}=\frac{u^{\prime\prime}\left(t+\xi_{i}\right)}{2}\Delta t^{2}_{i}

  • The error after one step is O(Δt2)O\left(\Delta t^2\right) , how does it propagate?

Implicit Euler Method

  • Using Taylor's theorem slightly differently gives

u(ti)=u(ti+1Δti)=u(ti+1)Δtiu(ti+1)+Δti2u(ti+1ξi)2=u(ti+1)Δtif(ti+1,u(ti+1))+Δti2u(ti+1ξi)2    u(ti+1)Δtif(ti+1,u(ti+1))=u(ti)Δti2u(ti+1ξi)2 \begin{aligned} u\left(t_{i}\right) &=u\left(t_{i+1}-\Delta t_{i}\right)=u\left(t_{i+1}\right)-\Delta t_{i}u^{\prime}\left(t_{i+1}\right)+\Delta t^{2}{i}\frac{u^{\prime\prime}\left(t-\xi_{i}\right)}{2}\ &=u\left(t_{i+1}\right)-\Delta t_{i}f\left(t_{i+1},u\left(t_{i+1}\right)\right)+\Delta t^{2}{i}\frac{u^{\prime\prime}\left(t-\xi_{i}\right)}{2}\ \iff u\left(t_{i+1}\right)&-\Delta t_{i}f\left(t_{i+1},u\left(t_{i+1}\right)\right)=u\left(t_{i}\right)-\Delta t^{2}{i}\frac{u^{\prime\prime}\left(t-\xi_{i}\right)}{2} \end{aligned}

  • Which yields the implicit Euler approximation

(12)yi+1NΔtif(ti+1,yi+1N)=yiN y^{N}{i+1}-\Delta tf\left(t_{i+1},y^{N}{i+1}\right)=y^{N}\tag{12}

  • Need to solve a nonlinear algebraic equation to obtain yi+1Ny^{N}_{i+1} which is computationally much more demanding!

Local Error in Implicit Euler Method

  • We can modify the analysis of the explicit scheme.

  • From the construction of the scheme we obtain.

u(ti+1)=u(ti)+Δtif(ti+1,u(ti+1))Δti2u(ti+1ξi)2yi+1N=yiN+Δtif(ti,yi+1N) \begin{aligned} u\left(t_{i+1}\right) &=u\left(t_{i}\right)+\Delta t_{i}f\left(t_{i+1}, u\left(t_{i+1}\right)\right)-\Delta t^{2}{i}\frac{u^{\prime\prime}\left(t-\xi_{i}\right)}{2}\ y^{N}{i+1} &=y^{N}+\Delta t_{i}f\left(t_{i},y^{N}_{i+1}\right) \end{aligned}

  • Substracting, taking norms and using LL -continuity gives

u(ti+1)yi+1N=u(ti)yiN+Δti[f(ti+1,u(ti+1))f(ti,yi+1N)]Δti2u(ti+1ξi)2u(ti+1)yi+1Nu(ti)yiN+ΔtiL(ti+1)u(ti+1)yi+1N+Δti22u(ti+1ξi) \begin{aligned} u\left(t_{i+1}\right)-y^{N}{i+1} &=u\left(t\right)-y^{N}{i}+\Delta t\left[f\left(t_{i+1},u\left(t_{i+1}\right)\right)-f\left(t_{i},y^{N}{i+1}\right)\right]-\Delta t^{2}\frac{u^{\prime\prime}\left(t_{i+1}-\xi_{i}\right)}{2}\ \left|u\left(t_{i+1}\right)-y^{N}{i+1}\right| &\leq\left|u\left(t\right)-y^{N}{i}\right|+\Delta tL\left(t_{i+1}\right)\left|u\left(t_{i+1}\right)-y^{N}{i+1}\right|+\frac{\Delta t^{2}}{2}\left|u^{\prime\prime}\left(t_{i+1}-\xi_{i}\right)\right| \end{aligned}

  • For Δt<1L\Delta t<\frac{1}{L} the error after one step is also O(Δt2)O\left(\Delta t^2\right) .

  • This time step restriction is actually superficial.

Implicit Trapezoidal Rule

  • Another approach follows from integrating the ODE with the trapezoidal rule

u(ti+1)u(ti)=titi+1f(ξ,u(ξ))dξ=Δti2[f(ti,u(ti))+f(ti+1,u(ti+1))]+O(Δti3). u\left(t_{i+1}\right)-u\left(t_{i}\right)=\int\limits_{t_{i}}^{t_{i+1}}f\left(\xi,u\left(\xi\right)\right)d\xi=\frac{\Delta t_{i}}{2}\left[f\left(t_{i},u\left(t_{i}\right)\right)+f\left(t_{i+1},u\left(t_{i+1}\right)\right)\right]+O\left(\Delta t^{3}_{i}\right).

  • Resulting in the implicit trapezoidal rule

yi+1NyiN=Δti2[f(ti,yiN)+f(ti+1,yi+1N)]    yi+1NΔti2. \begin{aligned} y^{N}{i+1}-y^{N} &=\frac{\Delta t_{i}}{2}\left[f\left(t_{i},y^{N}{i}\right)+f\left(t,y^{N}{i+1}\right)\right]\ \iff y^{N}-\frac{\Delta t_{i}}{2}. \end{aligned}


Published

Last Updated

Category

articles

Tags

Contact