Mathwords logoMathwords

Iteration — Definition, Formula & Examples

Iteration is the process of repeating a calculation or rule, using each output as the next input, to produce a sequence of values. Each repetition is called an iterate.

Given a function ff and an initial value x0x_0, iteration constructs the sequence x0,x1,x2,x_0, x_1, x_2, \ldots where xn+1=f(xn)x_{n+1} = f(x_n) for each n0n \geq 0. The value xnx_n is called the nnth iterate of x0x_0 under ff.

Key Formula

xn+1=f(xn)x_{n+1} = f(x_n)
Where:
  • xnx_n = The current value at step n
  • xn+1x_{n+1} = The next value produced by applying the rule
  • ff = The function or rule applied at each step

How It Works

Start with an initial value x0x_0 and a rule ff. Apply the rule to x0x_0 to get x1=f(x0)x_1 = f(x_0). Then apply the same rule to x1x_1 to get x2=f(x1)x_2 = f(x_1), and so on. The resulting sequence may converge to a fixed point, diverge to infinity, or cycle between values. You stop iterating when you reach a desired number of steps or when the values stabilize to a target accuracy.

Worked Example

Problem: Starting with x0=2x_0 = 2, iterate the rule f(x)=12(x+6x)f(x) = \frac{1}{2}(x + \frac{6}{x}) three times.
Step 1: Apply the rule to x0=2x_0 = 2.
x1=12(2+62)=12(2+3)=2.5x_1 = \frac{1}{2}\left(2 + \frac{6}{2}\right) = \frac{1}{2}(2 + 3) = 2.5
Step 2: Apply the rule to x1=2.5x_1 = 2.5.
x2=12(2.5+62.5)=12(2.5+2.4)=2.45x_2 = \frac{1}{2}\left(2.5 + \frac{6}{2.5}\right) = \frac{1}{2}(2.5 + 2.4) = 2.45
Step 3: Apply the rule to x2=2.45x_2 = 2.45.
x3=12(2.45+62.45)=12(2.45+2.44898)2.44949x_3 = \frac{1}{2}\left(2.45 + \frac{6}{2.45}\right) = \frac{1}{2}(2.45 + 2.44898\ldots) \approx 2.44949
Answer: After three iterations the value is approximately 2.449492.44949, which is converging toward 62.44949\sqrt{6} \approx 2.44949. This is an example of the Babylonian method for square roots.

Why It Matters

Iteration is the engine behind Newton's method for finding roots, recursive algorithms in computer science, and numerical methods you encounter in precalculus and calculus. Many sequences studied in courses on series and convergence are defined iteratively, so understanding this process is essential for analyzing their behavior.

Common Mistakes

Mistake: Using the original input x0x_0 at every step instead of feeding each new output back into the function.
Correction: Each step must use the previous output: x2=f(x1)x_2 = f(x_1), not f(x0)f(x_0). The whole point of iteration is that the input updates after every application.