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:
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 equation above represents an approximation, not an
identity. This is due to the fact that in its derivation the
limiting procedure has been suppressed in favour of choosing the
iteration step, Δt, small. Obviously, the smaller
this step, the better the approximation. This will be quantified
below; however, here it suffices to say that although this simple
rule of thumb is in principle correct, the control of approximation
errors is the essence of numerical methods.
The equation above also lends itself to the numerical solution of
a first order differential equation, such as the one for radioactive
decay discussed in this lecture. The class of solutions discussed
here is also known under the name
Euler method.
The Euler method is the simplest method and relies on the simple
discretisation above with uniform step size Δt.
Globally, it is a zeroth order approximation to the solution of a
differential equation.
More details can be found in the following short
description.
Replacing the general function x(t), which depends on some
variable t with the time-dependent number of surviving atoms
N(t) and plugging in the expression for the derivative of
N w.r.t. time:
Here, all functional dependencies on time have been made explicit.
To solve the differential equation, we start with N(t) at some
starting time taken as t=0, such that
i.e. $N_0 = N(t_0=0)$. Then,
the number of atoms at a time Δt can be estimated
from the approximate solution above. Repeating this step then
ultimately yields approximate numbers of surviving atoms at integer
multiples of Δt: N(Δt), N(2Δt),
N(3Δt), ... . This of course constitutes only an
approximate "solution" to the problem. It is one of the
obvious goals to make this difference to the exact solution
as small as possible.
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
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.