The Contraction Cobweb

The cobweb between y=xy = x and y=f(x)y = f(x) gets sucked into one point. The error shrinks like qnq^n.

d(f(x),f(y))≤q d(x,y),  q<1  ⇒  xn+1=f(xn)→x∗d(f(x),f(y)) \le q\,d(x,y),\; q<1 \;\Rightarrow\; x_{n+1} = f(x_n) \to x^*

Part of these learning paths

Examples & Exercises

Show f(x)=x2+1f(x) = \frac{x}{2} + 1 is a contraction with q=12q = \frac12; find the fixed point and the error bound.

x∗=2,∣xn−2∣≤(12)n∣x0−2∣x^* = 2, \quad |x_n - 2| \le \left(\tfrac12\right)^n |x_0 - 2|
x0=0x_0 = 0, n=8n = 8: the error =0.0078= 0.0078 matches the bound exactly.
Show proof
  1. ∣f(x)−f(y)∣=∣x−y2∣=12∣x−y∣|f(x) - f(y)| = \left|\frac{x-y}{2}\right| = \frac12|x - y|, so ff is a contraction with q=12q = \frac12.
  2. Solving x=x2+1x = \frac{x}{2} + 1 gives x∗=2x^* = 2.
  3. Since ∣xn+1−2∣=12∣xn−2∣|x_{n+1} - 2| = \frac12|x_n - 2|, induction gives ∣xn−2∣=(12)n∣x0−2∣|x_n - 2| = \left(\frac12\right)^n|x_0 - 2|. For x0=0x_0 = 0, n=8n = 8, the error is 2256=0.0078125\frac{2}{256} = 0.0078125.

Show cos⁡x\cos x is a contraction on [0,1][0,1]; explain the existence and uniqueness of the Dottie number x∗≈0.739x^* \approx 0.739.

∣cos⁡x−cos⁡y∣≤sin⁡(1) ∣x−y∣,sin⁡(1)≈0.8415<1|\cos x - \cos y| \le \sin(1)\,|x - y|, \quad \sin(1) \approx 0.8415 < 1
n=20n = 20: the iterates cling to the Dottie number 0.7390850.739085.
Show proof
  1. By the Mean Value Theorem, ∣cos⁡x−cos⁡y∣=∣−sin⁡ξ∣⋅∣x−y∣≤sin⁡(1) ∣x−y∣|\cos x - \cos y| = |-\sin\xi|\cdot|x - y| \le \sin(1)\,|x - y|, and sin⁡(1)≈0.8415<1\sin(1) \approx 0.8415 < 1, so cos⁡\cos is a contraction.
  2. Banach's theorem gives a unique fixed point in [0,1][0,1] — the Dottie number x∗≈0.739085x^* \approx 0.739085 (the value is from iteration).

Prove in three lines that there is at most one fixed point.

∣x∗−y∗∣=∣f(x∗)−f(y∗)∣≤q∣x∗−y∗∣|x^* - y^*| = |f(x^*) - f(y^*)| \le q|x^* - y^*|
Every start gets sucked into the same point x∗=2x^* = 2.
Show proof
  1. Suppose x∗x^* and y∗y^* are both fixed points.
  2. Then ∣x∗−y∗∣=∣f(x∗)−f(y∗)∣≤q∣x∗−y∗∣|x^* - y^*| = |f(x^*) - f(y^*)| \le q|x^* - y^*|.
  3. Since q<1q < 1, this forces ∣x∗−y∗∣=0|x^* - y^*| = 0, i.e. x∗=y∗x^* = y^*.

9. Differentiation