The theta method for is y_ n+1 = y_n + h [(1 - ) ,f(t_n

PHYSICS · Multi-part · Fermi University Physics · Mathematical Methods for Physics · Numerical and computational mathematics · Numerical and computational mathematics

Error, Chance and the Machine, Ch Ordinary differential equations: order, stability and stiffness

Problem

The theta method for y′=f(t,y)y' = f(t, y) isyn+1=yn+h[(1−θ) f(tn,yn)+θ f(tn+1,yn+1)],y_{n+1} = y_n + h\bigl[(1 - \theta)\,f(t_n, y_n) + \theta\,f(t_{n+1}, y_{n+1})\bigr],where θ\theta is a constant with 0≤θ≤10 \le \theta \le 1. It is Euler's method for θ=0\theta = 0, backward Euler for θ=1\theta = 1 and the trapezoidal rule for θ=12\theta = \tfrac12. For an implicit method the local truncation error is defined as in the chapter, with the exact y(tn+1)y(t_{n+1}) in place of yn+1y_{n+1} on the right-hand side. ((a)) Show that τ=(12−θ) h y′′+O(h2)\tau = (\tfrac12 - \theta)\,h\,y'' + O(h^2). For which θ\theta is the method of order 2, and what is the leading term of τ\tau then? ((b)) Apply the method to y′=−yy' = -y with y(0)=1y(0) = 1, all dimensionless. Find the global error (computed minus exact) at t=1t = 1 for θ=0\theta = 0, 12\tfrac12 and 11, each with h=0.1h = 0.1 and with h=0.05h = 0.05. ((c)) Estimate the same errors from τ\tau by the accumulation argument of the chapter. Each step commits an error hτh\tau, which lowers the computed value below the exact one by that amount, and an error made at time ss is multiplied by e−(t−s)e^{-(t - s)} by time tt. Compare with (b), and say by what factor each error falls when hh is halved.

Browse the problem library