Mehmet Emre Tiryaki
Back to Notes

Initial Value Problems

Initial Value Problems

u′(t)=f(t,u(t)),a≤t≤b,u(a)=u0u'(t) = f(t, u(t)), \qquad a \le t \le b, \qquad u(a) = u_0

If the equation is linear, u′(t)=g(t)+u h(t)u'(t) = g(t) + u\,h(t), then with ρ(t)=exp⁡(−∫ath(s) ds)\rho(t) = \exp\big(-\int_a^t h(s)\, ds\big),

ρ(t)u(t)=u0+∫atρ(s)g(s) ds\rho(t)u(t) = u_0 + \int_a^t \rho(s)g(s)\, ds

(see integrating factor).

If ∣∂f∂u∣≤L\big|\frac{\partial f}{\partial u}\big| \le L for all a≤t≤ba \le t \le b and all uu, the solution exists and is unique, and the solution u(t;u0+δ)u(t; u_0 + \delta) with perturbed initial value u(a)=u0+δu(a) = u_0 + \delta satisfies

∥u(t;u0+δ)−u(t;u0)∥∞≤∣δ∣eL(b−a)\| u(t; u_0 + \delta) - u(t; u_0) \|_\infty \le |\delta| e^{L(b - a)}

Higher order An equation of order mm becomes a first-order system with u1=yu_1 = y, u2=y′u_2 = y', u3=y′′,…u_3 = y'', \ldots, e.g. for y′′=g(y,y′)y'' = g(y, y'),

u1′=u2,u2′=g(u1,u2)u_1' = u_2, \qquad u_2' = g(u_1, u_2)

One-Step Methods

ti=a+iht_i = a + ih, h=b−anh = \frac{b - a}{n}, ui≈u^(ti)u_i \approx \hat{u}(t_i) with u^\hat{u} the exact solution, and

ui+1=ui+h ϕ(ti,ui,h),i=0,…,n−1u_{i+1} = u_i + h\,\phi(t_i, u_i, h), \qquad i = 0, \ldots, n - 1

The local truncation error substitutes the exact solution into the method and divides by hh,

τi+1(h)=u^(ti+1)−u^(ti)h−ϕ(ti,u^(ti),h)\tau_{i+1}(h) = \frac{\hat{u}(t_{i+1}) - \hat{u}(t_i)}{h} - \phi(t_i, \hat{u}(t_i), h)

and the method is consistent if τ→0\tau \to 0 as h→0h \to 0. If ∣τi+1(h)∣≤Chp|\tau_{i+1}(h)| \le Ch^p and ∣∂ϕ∂u∣≤L\big|\frac{\partial \phi}{\partial u}\big| \le L for all a≤t≤ba \le t \le b, uu and h>0h > 0, then the global error satisfies

∣u^(ti)−ui∣≤ChpL[eL(ti−a)−1]=O(hp)|\hat{u}(t_i) - u_i| \le \frac{Ch^p}{L}\big[e^{L(t_i - a)} - 1\big] = O(h^p)

as h→0h \to 0, but not as t→∞t \to \infty. So the global error has the same order of accuracy as the LTE.

Euler's Method

ϕ=f\phi = f,

ui+1=ui+hf(ti,ui),i=0,…,n−1u_{i+1} = u_i + hf(t_i, u_i), \qquad i = 0, \ldots, n - 1

By Taylor expansion,

u^(ti+1)−[u^(ti)+hf(ti,u^(ti))]=[u^(ti)+hu^′(ti)+12h2u^′′(ti)+⋯ ]−[u^(ti)+hu^′(ti)]=12h2u^′′(ti)+O(h3)\hat{u}(t_{i+1}) - [\hat{u}(t_i) + hf(t_i, \hat{u}(t_i))] = [\hat{u}(t_i) + h\hat{u}'(t_i) + \tfrac{1}{2}h^2\hat{u}''(t_i) + \cdots] - [\hat{u}(t_i) + h\hat{u}'(t_i)] = \tfrac{1}{2}h^2\hat{u}''(t_i) + O(h^3)

so the LTE is O(h)O(h) and Euler is consistent and first order: an O(h2)O(h^2) error per step over O(h−1)=O(n)O(h^{-1}) = O(n) steps gives a global error of O(h)O(h).