Solving nonlinear equations · Lecture 7

The False Position Method

Bisection ignores how big f(a) and f(b) are. False position draws the straight line between them and takes its crossing: usually much faster, still safely bracketed.

Md Mahbub E Noor · Assistant Professor
CSE-3107 Numerical Methods · B.Sc. 3rd Year 1st Semester
Department of CSE, University of Barishal

Why this lecture

The problem: bisection throws information away

Bisection needed 20 steps for x3−x−2=0x^3 - x - 2 = 0 on [1,2][1, 2]. Look at what it ignored.

  • f(1)=−2f(1) = -2 and f(2)=4f(2) = 4: the function is twice as far from zero at x=2x = 2 as at x=1x = 1
  • Common sense: the root should be about one third of the way from 1 to 2, not in the middle
  • Bisection used only the signs −- and ++; the sizes 2 and 4 were thrown away
  • Today: use the sizes too, and see whether that is always a good idea
xxf(x)f(x)
1−2
2+4
bisection guess1.5
"proportional" guess1+22+4=1.3331 + \tfrac{2}{2+4} = 1.333
true root1.5214
Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
2 / 21

Today's goals

  • Derive the false position formula from the chord through (a,f(a))(a, f(a)) and (b,f(b))(b, f(b))
  • Carry out false position by hand and present the iteration table
  • Give an honest error bound after nn iterations
  • Compare false position with bisection, including its one-sided weakness and the Illinois fix
  • Know its best and worst cases, and which later methods remove its limitations
Last time

Bisection: halve the bracket each time. Safe, error bound (b−a)/2n(b-a)/2^n, but only one bit per step.


Today

Keep the bracket (safety) but choose a smarter point inside it (speed).

Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
3 / 21
Start here

The idea in one picture

xf(x)12A (1, −2)B (2, 4)c₁ = 1.333c₂ = 1.463true root 1.521
Same start as bisection: a bracket with a sign change.But now look at the sizes: A is 2 below the axis, B is 4 above.Join A and B with a straight line (a chord).Where the chord crosses the axis is our estimate: nearer to A.f(c₁) is negative, so c₁ replaces A.Draw the new chord from the new point to B.Its crossing c₂ is closer again.The estimates creep towards the root from one side.
In plain words
  • Bisection ignores how big f is at the two ends
  • A straight line between the end points gives a smarter guess
  • Keep the part with the sign change, as before
New words today
chord
the straight line joining two points of a curve
false position
where that line crosses the axis
linear interpolation
pretending the curve is straight between two points
bracket
still kept, so the root cannot escape
Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
4 / 21

The idea: follow the chord

Join (a,f(a))(a, f(a)) and (b,f(b))(b, f(b)) with a straight line; take the point cc where it crosses the xx-axis.

Line through the two pointsy−f(b)=f(b)−f(a)b−a (x−b)y - f(b) = \frac{f(b) - f(a)}{b - a}\,(x - b)
Set y = 0 and solve for xc=b−f(b) b−af(b)−f(a)  =  a f(b)−b f(a)f(b)−f(a)c = b - f(b)\,\frac{b - a}{f(b) - f(a)} \;=\; \frac{a\,f(b) - b\,f(a)}{f(b) - f(a)}
  • Same bracketing rule as bisection: keep the sub-interval where ff changes sign
  • If ∣f(a)∣≪∣f(b)∣|f(a)| \ll |f(b)|, then cc lands close to aa, as common sense suggests
  • The second form is easiest by calculator; the first is safer in code (less cancellation)
  • It is linear interpolation: we pretend ff is a straight line between aa and bb
Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
5 / 21
The method, step by step

The false position algorithm

  1. Start with [a,b][a, b] where f(a) f(b)<0f(a)\,f(b) < 0
  2. Chord point c=a f(b)−b f(a)f(b)−f(a)c = \dfrac{a\,f(b) - b\,f(a)}{f(b) - f(a)}; compute f(c)f(c)
  3. If f(a) f(c)<0f(a)\,f(c) < 0, the root is in [a,c][a, c]: set b=cb = c
  4. Otherwise the root is in [c,b][c, b]: set a=ca = c (if f(c)=0f(c) = 0, stop: cc is the root)
  5. Repeat until two successive cc agree: ∣cn−cn−1∣<ε|c_n - c_{n-1}| < \varepsilon; the answer is the last cc

Only step 2 differs from bisection. The stopping test changes too, because one end of the bracket may never move, so (b−a)(b - a) need not shrink.

Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
6 / 21

Explore: chord after chord

  • The orange chord joins the current endpoints
  • Its crossing is the new point cc
  • Watch which endpoint moves: here only aa moves, b=2b = 2 never changes
  • Compare the speed with bisection (previous lecture)
Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
7 / 21

Problem 1: x3−x−2=0x^3 - x - 2 = 0 on [1,2][1, 2], three iterations

Problem 1"Using the False Position method, find the root of f(x)=x3−x−2=0f(x) = x^3 - x - 2 = 0, taking the initial bracketing interval [1,2][1, 2]. Perform three iterations, tabulating x1,x2,x3x_1, x_2, x_3 and f(x)f(x) at each step, and report the absolute error bound after the third iteration."
nnaabbf(a)f(a)f(b)f(b)xn=af(b)−bf(a)f(b)−f(a)x_n = \dfrac{af(b) - bf(a)}{f(b) - f(a)}f(xn)f(x_n)
112−241(4)−2(−2)4+2=1.333333\frac{1(4) - 2(-2)}{4 + 2} = 1.333333−0.962963
21.3333332−0.96296341.462687−0.333339
31.4626872−0.33333941.504019−0.101818

Every f(xn)<0f(x_n) < 0, so aa moves and b=2b = 2 stays. Next slide: the error bound.

Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
8 / 21

The error bound after three iterations

Problem 2After x3=1.504019x_3 = 1.504019 with f(x3)=−0.101818f(x_3) = -0.101818, how far can we be from the true root?
1
Bracket bound (always valid): the root is in [x3,2][x_3, 2], so ∣r−x3∣≤2−1.504019=0.496|r - x_3| \le 2 - 1.504019 = 0.496. True, but useless: the bracket does not shrink to zero
2
Change between iterates (an estimate, not a guarantee): ∣x3−x2∣=0.041|x_3 - x_2| = 0.041
3
Mean value bound (rigorous and sharp): f(x3)=f(x3)−f(r)=f′(ξ)(x3−r)f(x_3) = f(x_3) - f(r) = f'(\xi)(x_3 - r), so ∣r−x3∣≤∣f(x3)∣min⁡∣f′∣|r - x_3| \le \dfrac{|f(x_3)|}{\min |f'|} on [x3,2][x_3, 2]
4
f′(x)=3x2−1f'(x) = 3x^2 - 1 is increasing, so min⁡f′=f′(1.504019)=5.786\min f' = f'(1.504019) = 5.786:   ∣r−x3∣≤0.1018185.786=0.0176\;|r - x_3| \le \dfrac{0.101818}{5.786} = 0.0176
Absolute error bound ≈ 0.018 (true root 1.5213797, actual error 0.01736 ✓). The bracket width alone (0.496) would be a very poor bound.
Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
9 / 21

Problem 3: ex−3x=0e^{x} - 3x = 0 on [0,1][0, 1]

Problem 3"Find out the root of the following equation using the false position method: ex−3x=0e^{x} - 3x = 0 in [0,1][0, 1]."
nnaabbf(a)f(a)f(b)f(b)xnx_nf(xn)f(x_n)
1011−0.2817180.780203−0.158694
200.7802031−0.1586940.673347−0.059252
300.6733471−0.0592520.635682−0.018736
400.6356821−0.0187360.623991−0.005611
500.6239911−0.0056110.620509−0.001653
600.6205091−0.0016530.619485−0.000484

Here bb moves and a=0a = 0 is stuck. Root ≈ 0.6195 after 6 steps (true 0.6190613). Converging, but only about one digit every two steps.

Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
10 / 21

Problem 4: x3+x2−3x−3=0x^3 + x^2 - 3x - 3 = 0 between 1 and 2

Problem 4"Establish the method of false position for finding roots of algebraic equations. Find by the method of Regula Falsi a root of x3+x2−3x−3=0x^3 + x^2 - 3x - 3 = 0 lying between 1 and 2."
nnaabbf(a)f(a)f(b)f(b)xnx_nf(xn)f(x_n)
112−431.571429−1.364431
21.5714292−1.36443131.705411−0.247745
31.7054112−0.24774531.727883−0.039340
41.7278832−0.03934031.731405−0.006111
51.7314052−0.00611131.731951−0.000946

Bonus check: x3+x2−3x−3=(x+1)(x2−3)x^3 + x^2 - 3x - 3 = (x + 1)(x^2 - 3), so the exact root is 3=1.7320508\sqrt{3} = 1.7320508. After 5 steps: 1.7320 (4 correct decimals).

Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
11 / 21
Classical vs numerical

Same problem, two approaches: x3+x2−3x−3=0x^3 + x^2 - 3x - 3 = 0

Algebra

Classical (exact formula)

  • Spot the factor: x2(x+1)−3(x+1)=(x+1)(x2−3)x^2(x+1) - 3(x+1) = (x+1)(x^2 - 3)
  • Roots −1-1 and ±3\pm\sqrt3; in [1,2][1, 2]: x=3x = \sqrt3
  • Works only because a factorisation happens to exist
vs
Algorithm

Numerical (false position)

  • Bracket [1,2][1, 2]: f(1)=−4f(1) = -4, f(2)=3f(2) = 3
  • 9 iterations for 10−610^{-6}: x≈1.732051x \approx 1.732051
  • Matches 3=1.7320508\sqrt3 = 1.7320508, and needed no clever factoring
When the classical approach cannot work

ex=3xe^{x} = 3x (Problem 3)

Mixing exe^x with a polynomial in xx leaves no algebraic route; the root has no expression in elementary functions. False position: x=0.619061x = 0.619061 in 12 iterations.

Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
12 / 21

False position in Python and C

  • Same structure as bisection; only the formula for cc changes
  • Stops when two successive cc agree within tol, or when f(c)=0f(c) = 0
  • The C version stores f(a)f(a) and f(b)f(b) so each step costs one evaluation
  • Try x10−1x^{10} - 1 on [0,1.3][0, 1.3] and count the iterations
Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
13 / 21
Practice

Practice problem

Problem 5"Discuss the method of False Position to find an approximate root of an equation f(x)=0f(x) = 0."
How to write a complete answer
  • Start from a bracket [a,b][a, b] with f(a)f(b)<0f(a)f(b) < 0 (IVT guarantees a root)
  • Replace the curve by the chord; derive c=af(b)−bf(a)f(b)−f(a)c = \dfrac{af(b) - bf(a)}{f(b) - f(a)} with a small sketch
  • Keep the sub-interval with the sign change; repeat until ∣cn−cn−1∣<ε|c_n - c_{n-1}| < \varepsilon
  • Advantages: always converges, usually faster than bisection. Limitation: one endpoint can stay fixed, convergence becomes slow (linear) for strongly curved ff
Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
14 / 21

The weakness: one endpoint gets stuck

  • f(x)=x10−1f(x) = x^{10} - 1 on [0,1.3][0, 1.3]: root at 1
  • f(1.3)=12.8f(1.3) = 12.8 is huge, f(0)=−1f(0) = -1; the chords all cross far left
  • False position needs 57 iterations for 10−610^{-6}; bisection needs 21
  • Fix (Illinois method): when the same end is kept twice, halve its stored ff value; this restores fast convergence (14 steps here instead of 57)
Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
15 / 21
When to use it

False position: method profile

Best case
  • ff nearly straight on the bracket: on a straight line it is exact in 1 step (bisection needs 20)
  • Smooth, gently curved ff: x3−x−2x^3 - x - 2 and ex−3xe^x - 3x need 12 steps for 10−610^{-6}, bisection 20
  • Keeps the bracket: it can never lose the root
Worst case
  • Strong curvature with the root near one end: x10−1x^{10} - 1 on [0,1.3][0, 1.3] needs 57 steps (bisection 21)
  • One endpoint stays fixed, so the bracket never shrinks and gives no useful error bound
  • Same as bisection: needs a sign change, fooled by poles
Best suited for
  • Smooth monotone functions where a bracket is available
  • Inverting tables and calibration curves (one step = linear interpolation)
  • The Illinois variant: a cheap, safe default for 1-D problems
Avoid when
  • ff is strongly convex or concave on the bracket
  • You need an error bound at every step (use bisection)
  • f′f' is available and you want quadratic speed (use Newton)

Rule of thumb: prefer Illinois to plain false position; it keeps the speed on easy problems and fixes the stall on hard ones.

Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
16 / 21
Comparison

Comparative analysis: bisection, false position, Illinois

f(x)f(x), bracketBisectionFalse positionIllinoisWinner
x3−x−2x^3 - x - 2, [1,2][1, 2]20128Illinois
ex−3xe^x - 3x, [0,1][0, 1]20128Illinois
x2−4x−10x^2 - 4x - 10, [5,6][5, 6]2055false position / Illinois
x10−1x^{10} - 1, [0,1.3][0, 1.3]215714Illinois (plain FP loses)

Iterations to reach 10−610^{-6}. Bisection never wins on speed but never loses badly; plain false position can be the best or the worst; Illinois is never bad on these problems.

Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
17 / 21
Roadmap

Limitations, and where we fix them

False position keeps bisection's safety and adds speed on easy problems. What is still missing:

What it does well (keep this)
  • Bracketing: always converges
  • Uses function values, so fast on nearly linear ff
  • No derivative needed
  • Exact in one step for linear ff
LimitationHow it is overcomeWhere
One endpoint gets stuck (slow on curved ff)
→
Illinois: halve the stuck ff value
this lecture
Still linear convergence
→
Use the tangent: quadratic convergence
Lecture 9 →
Needs a bracket with a sign change
→
Open methods start from a guess: fixed point
Lecture 8 →
Keeping old points slows it down
→
Always use the two newest points: the secant method
Lecture 10 →
One equation only
→
Newton for systems
Lecture 10 →
Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
18 / 21
Applications

Where this method runs in the real world

Click a card to see where "follow the chord" is used.

Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
19 / 21

Checkpoint

Checkpoint · think, then discuss with your neighbourFalse position on [1,2][1, 2] with f(1)=−3f(1) = -3 and f(2)=1f(2) = 1. What is the first estimate x1x_1?
A1.25
B1.5
C1.75
D1.333
C. x1=1(1)−2(−3)1−(−3)=74=1.75x_1 = \dfrac{1(1) - 2(-3)}{1 - (-3)} = \dfrac{7}{4} = 1.75. The root is closer to bb because ∣f(b)∣<∣f(a)∣|f(b)| < |f(a)|.
Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
20 / 21

Summary

Key points
  • False position: c=af(b)−bf(a)f(b)−f(a)c = \dfrac{af(b) - bf(a)}{f(b) - f(a)}, the root of the chord; keep the sign-change half
  • Always converges (bracketing), usually faster than bisection
  • One endpoint often stays fixed: the bracket does not shrink to zero; error bound via ∣f(c)∣/min⁡∣f′∣|f(c)|/\min|f'|
  • Very slow for strongly curved ff (e.g. x10−1x^{10} - 1); the Illinois fix halves the stuck ff value
Opening problem: solved

The proportional guess 1.333 was the first false-position point. Continuing gives the root 1.521380 in 12 steps (bisection: 20; Illinois: 8).

Homework
  1. Find the root of xlog⁡10x−1.2=0x \log_{10} x - 1.2 = 0 in [2,3][2, 3] by false position, 4 iterations.
  2. Repeat Problem 1 by bisection for 3 iterations. Which method is closer to the true root 1.52138 after 3 steps?
  3. Implement the Illinois modification in the Python code and count iterations for x10−1x^{10} - 1 on [0,1.3][0, 1.3].
  4. Lab: solve x3−5x+1=0x^3 - 5x + 1 = 0 in [0,1][0, 1] with both methods in the solver tab.
Next lecture

Fixed-point iteration. Rewrite f(x)=0f(x) = 0 as x=g(x)x = g(x) and simply repeat. When does that work? (Often called the "iteration method".)

Md Mahbub E Noor
Lecture 7: False Position (Regula Falsi)
University of Barishal
21 / 21