An equation with
a given function of a variable x taking rational values can be solved by time stepping:
where the sign of is chosen so that
and the time step dt is small enough. We start with
as a start approximation and compute successively:
for
If the sequence x_n converges to a value X so that gets small as n increases, also
becomes small and so we will have
(assuming
is continuous) and so we have computed a root X to the equation
.
As an example consider with
and
.
See that .
To understand the condition and dt small enough, subtract two successive steps to get
where convergence with
is guaranteed if
with quicker convergence the smaller q is. Explain.
Play with the above code and compute roots.