Root-Finding Methods
Root-Finding Methods
Find $x$ such that $f(x) = 0$. When no algebraic solution exists, iterative numerical methods converge to the root.
Given $f(a)f(b) < 0$, repeatedly halve the interval $[a,b]$ by testing the midpoint $c = (a+b)/2$.
- If $f(a)f(c) < 0$: root in $[a,c]$
- Else: root in $[c,b]$
Error after $n$ steps: $\leq \frac{b-a}{2^n}$.
$$x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}$$
Converges quadratically near simple roots if $f'(x_n) \neq 0$.
$$x_{n+1} = x_n - f(x_n)\frac{x_n - x_{n-1}}{f(x_n)-f(x_{n-1})}$$
Like Newton's but uses a finite-difference approximation to $f'$.
Use bisection on $f(x) = x^3 - 2$ in $[1,2]$. Find the first three midpoints.
$c_1 = 1.5$, $f(1.5) = 1.375 > 0$ → $[1,1.5]$.
$c_2 = 1.25$, $f(1.25) = -0.047 < 0$ → $[1.25,1.5]$.
$c_3 = 1.375$, $f(1.375) = 0.599 > 0$ → $[1.25,1.375]$.
One iteration of Newton's method for $f(x) = x^2 - 3$ starting at $x_0 = 2$.
$f'(x) = 2x$. $x_1 = 2 - (4-3)/4 = 2 - 0.25 = 1.75$.
How many bisection steps guarantee error $< 0.01$ on $[0,1]$?
$1/2^n < 0.01 \Rightarrow 2^n > 100 \Rightarrow n \geq 7$.
Practice Problems
Show Answer Key
1. $f(1)=-1<0$, $f(2)=5>0$; sign change ✓
2. $c = 1.5$; $f(1.5)=0.875>0$ → root in $[1,1.5]$
3. $x_1 = 2-(4-5)/4 = 2+0.25 = 2.25$
4. When $f'(x_n)=0$ (horizontal tangent) or bad initial guess
5. $2/2^n<0.001$; $2^n>2000$; $n \geq 11$
6. $x_1 = 1-(e-3)/e \approx 1-(-0.282)/2.718 \approx 1.104$
7. Linear — $O(1/2^n)$
8. $f(1)=-2$, $f(2)=1$. $x_2 = 2-1\cdot(2-1)/(1-(-2)) = 2-1/3 \approx 1.667$
9. Yes, as long as initial bracket satisfies $f(a)f(b)<0$ and $f$ is continuous
10. $f(0.5)=0.378-0.5=-0.122$; $f'(0.5)=-\sin(0.5)-1=-1.479$. $x_1 = 0.5-(-0.122)/(-1.479) \approx 0.418$... actually $x_1 \approx 0.7553$
11. Bisection: linear; Newton: quadratic (much faster near root)
12. Poor guess can lead to divergence or cycling