UcenlyOpen in the app

Differential Equations & Numerical Methods · BE5B01DEN · Topic 8 of 13

Finding roots numerically: bisection, Newton, iteration

Week 8. Bisection always works but is slow; Newton is fast but needs a good start; fixed-point iteration needs a contraction.

Open the interactive lesson

Key ideas

Bisection

If f is continuous and f(a)f(b)<0, there is a root in [a,b]. Take the midpoint and keep the half where the signs still differ; the length halves each time and convergence is linear.

Newton and secant methods

Newton replaces f by its tangent: xₖ₊₁=x_k−f(x_k)/f′(x_k). It has order 2 at a simple root and order 1 at a multiple root; the secant method avoids f′ and has order (1+√5)/2≈1.6.

Fixed-point iteration and contractions

Rewrite f(x)=0 as x=φ(x) and iterate xₖ₊₁=φ(x_k). If |φ′|≤q<1 on an interval mapped into itself, φ is a contraction (Banach), the fixed point is unique, and the error is bounded by q/(1−q)·|xₖ₊₁−x_k|.

In one line: Different rewrites of the same equation give different iterations: check |φ′| near the root before iterating.

Formulas

Practice with worked solutions

Question 1

Run the bisection method on [0, 1] and give the third midpoint m₂ (with m₀ = 1/2).

f(x)=x2−3x+1,a0=0, b0=1f(x)=x^2-3x+1,\quad a_0=0,\ b_0=1
Worked solution

Answer: 3/8

  1. f(0)=1, f(1)=−1, m0=12: f(m0)=−14⇒[0,12]f(0)=1,\ f(1)=-1,\ m_0=\tfrac12:\ f(m_0)=-\tfrac14\Rightarrow[0,\tfrac12]
  2. m1=14: f=516>0⇒[14,12],m2=38m_1=\tfrac14:\ f=\tfrac5{16}>0\Rightarrow[\tfrac14,\tfrac12],\qquad m_2=\tfrac38

Keep the half where f changes sign.

Question 2

Bisection starts on an interval of length 1 and stops when the interval length is below 0.001. Find the smallest k with b_k − a_k < 0.001.

bk−ak=2−kb_k-a_k=2^{-k}
Worked solution

Answer: 10

  1. 2−9=0.00195>0.001,2−10=0.000977<0.0012^{-9}=0.00195>0.001,\qquad 2^{-10}=0.000977<0.001

Solve 2⁻ᵏ < 10⁻³.

Question 3

Apply Newton’s method and give x₂.

f(x)=x2−2,x0=2f(x)=x^2-2,\quad x_0=2
Worked solution

Answer: 17/12

  1. x1=2−24=32x_1=2-\frac24=\frac32
  2. x2=32−9/4−23=1712≈1.4167x_2=\frac32-\frac{9/4-2}{3}=\frac{17}{12}\approx1.4167

Use xₖ₊₁ = x_k/2 + 1/x_k.

More Differential Equations & Numerical Methods practice in Ucenly

Sources

Written by Ucenly. Based on the BE5B01DEN course materials: