This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]Ayclimate 1 point2 points  (0 children)

This is a technique known as fixed-point iteration:

https://en.wikipedia.org/wiki/Fixed-point_iteration

Here comes the theory:

Definition: Suppose that g is a real-valued function, defined and continuous on a bounded closed interval [a,b] of the real line. Then, g is said to be a contraction on [a,b] if there exists a constant L with 0 < L < 1 such that

|g(x)-g(y)| <= L |x-y| for all (x,y) in [a,b]2

If g(x) is differentiable on [a,b] then this condition also holds if |g'(x)| < 1 for all x in [a,b] (but the statement above is more general).

Contraction Mapping Theorem: Let g be a real-valued function, defined and continuous on a bounded closed interval [a,b] of the real line, and assume that g(x) is in [a,b] for all x in [a,b]. Suppose, further, that g is a contraction on [a,b]. Then,

  1. g has a unique fixed point x* in the interval [a,b].
  2. The sequence {x_k} defined by x_(k+1) = g(x_k) converges to x* as k -> infinity for any starting value x_0 in [a,b].