A first numerical problem: Radioactive Decays

← Previous

A first numerical problem: Radioactive decays

A first numerical solution: Simple Discretisation

To construct a numerical solution for differential equations a typical strategy is discretisation. In the case at hand, this means that the differential of a function f(x) is replaced by its definition through the limit:

\[ \frac{\mathrm{d}x(t)}{\mathrm{d}t} \equiv \lim_{\Delta t\rightarrow 0} \frac{x(t+\Delta t)-x(t)}{\Delta t} \Longrightarrow \frac{x(t+\Delta t)-x(t)}{\Delta t} \,\, , \]
and the limit is replaced by choosing a small enough value of Δt. This equation can be rearranged such that:
\[ x(t+\Delta t)\,\approx\, x(t)\,+\frac{\mathrm{d}x(t)}{\mathrm{d}t}\Delta t \,\, . \]
Two things are important to stress here:

The error term

In order to have some access to the (formal) size of the error, consider the Taylor expansion of the function x(t) around the point x

\[ x(t+ \Delta t) = x(t) \, + \frac{\mathrm{d} x(t)}{\mathrm{d} x}\Delta t\, + \frac{ \mathrm{d}^2 x(t) }{ \mathrm{d} x^2 } \frac {(\Delta t)^2} {2} + \dots+ \frac { \mathrm{d}^n x(t) } { \mathrm{d}x^n } \frac {(\Delta t)^n}{n!}+ \dots \]
Taking Δt to be small, i.e. taking into account only the first order in Δt, means ignoring all higher powers. Therefore, this approximation ignores terms of order (Δt)² and higher, leading to an error formally of the size of (Δt)². This error, however, is an error per step. Since typically the number of steps scales with 1/Δt for a fixed interval $[t_{\rm in},\,t_{\rm out}]$, the total error is proportional to Δt.

Next →





Frank Krauss and Daniel Maitre
Last modified: Tue Oct 3 14:43:58 BST 2017