ExerciseNonlinear equationsintermediate
Exercise: the secant by hand
The secant method applied to cos²x−x=0 from x0=0, x1=1: five iterations with explicit divided differences and superlinear convergence on display.
Solution
ExampleSecant with x₀=0, x₁=1
Approximate the root of f(x)=cos2x−x with the secant method starting from x0=0 and x1=1.
Initial values: f(0)=1 and f(1)=−0.7081. The first divided difference is f[x1,x0]=1−0f(1)−f(0)=−1.7081, and:
With f(x2)=0.10924: f[x2,x1]=0.585455−10.10924−(−0.7081)=−1.9721, hence x3=0.585455−−1.97210.10924=0.640845.
Two more iterations follow the same pattern: x4=0.641722 (residual 1.6⋅10−5) and x5=0.6417144 (residual 2.0⋅10−9).
In four useful iterations the residual falls from 10−1 to 10−9 without evaluating any derivative. The cadence of the exponents (−1,−3,−5,−9) reflects the superlinear order p≈1.618: slower than Newton, much faster than bisection.