Ne1, Ne2 - Bisection, false position and secant methods

Ne1, Ne2 - Bisection, false position and secant methods

Locate a root by halving an interval or by intersecting a chord with the horizontal axis. You will distinguish false position from the secant method, implement their different updates, and justify the decimal places claimed for a numerical root.

Bisection keeps a root inside a shrinking interval

Two methods start from (1,−1)(1,-1) and (2,2)(2,2) on y=x2−2y=x^2-2. Both draw the same chord and obtain x=4/3x=4/3. Must all their later answers agree too?

No. Choosing the next pair of points is part of the method, not a detail. First meet the method with the clearest guarantee: preserve opposite signs and halve the interval.

You already know

A continuous function with opposite signs at two endpoints has a zero between them. Cell references can retain a fixed parameter or follow the previous row. Keep full stored precision and round only the requested output.

Continuity is essential. A sign change across a discontinuity, such as 1/x1/x across zero, need not enclose a root. Also, a sign change guarantees a root, not uniqueness; a monotonicity argument can establish uniqueness where needed.

Bisection

Suppose ff is continuous on [a,b][a,b] and f(a)f(b)<0f(a)f(b)<0. Form

c=a+b2c=\frac{a+b}{2}

If f(c)=0f(c)=0, stop. Otherwise retain whichever of [a,c][a,c] or [c,b][c,b] has opposite endpoint signs.

After nn completed halvings, the bracket width is (b0−a0)/2n(b_0-a_0)/2^n. Its midpoint has error magnitude at most half that width.

Not in the formula booklet: learn it.

The error bound is geometric: every point of the retained interval is within half its width of its midpoint. Count completed halvings from the original bracket, rather than count the printed rows indiscriminately.

[DIAGRAM: asset_name: The first bisection retains opposite signs; asset_slug: bisection_bracket; caption: The midpoint splits the interval and the sign change selects the retained half; description: The graph y=x squared minus 2 is drawn on positive x. Points at x=1 and x=2 have opposite signs. The first midpoint x=1.5 has positive function value, so a blue interval from 1 to 1.5 is retained and the interval from 1.5 to 2 is pale. The root is inside the retained half.]
The midpoint splits the interval and the sign change selects the retained half

Worked example 1: three halvings

Question. Apply three bisections to f(x)=x2−2f(x)=x^2-2, starting from [1,2][1,2]. Give the final bracket and its midpoint error bound.

Plan. Calculate each midpoint and retain the sign-changing half.

HalvingMidpoint ccf(c)f(c)Retained bracket
111.51.50.250.25[1,1.5][1,1.5]
221.251.25−0.4375-0.4375[1.25,1.5][1.25,1.5]
331.3751.375−0.109375-0.109375[1.375,1.5][1.375,1.5]
b3−a3=1.5−1.375=18three halvingsm3=1.375+1.52=1.4375midpoint of final bracket∣m3−α∣≤116=0.0625half-width bound\begin{aligned} b_3-a_3&=1.5-1.375=\frac18 && \text{three halvings}\\ m_3&=\frac{1.375+1.5}{2}=1.4375 && \text{midpoint of final bracket}\\ |m_3-\alpha|&\le\frac1{16}=0.0625 && \text{half-width bound} \end{aligned}

Why this step? The last tested point is an endpoint of the final bracket; its midpoint gives the stated half-width guarantee.

Answer. 1.375<α<1.51.375<\alpha<1.5; midpoint 1.43751.4375, error magnitude at most 0.06250.0625.

Check. The original width 11, divided by 232^3, is 1/81/8, matching the retained bracket.

Change only the starting bracket to [1.4,1.5][1.4,1.5], which is already narrower.

Worked example 2: a tighter initial bracket

Question. Repeat three bisections for the same function, starting from [1.4,1.5][1.4,1.5].

Plan. Use the same sign rule, starting from f(1.4)=−0.04f(1.4)=-0.04 and f(1.5)=0.25f(1.5)=0.25.

Halvingccf(c)f(c)Retained bracket
111.451.450.10250.1025[1.4,1.45][1.4,1.45]
221.4251.4250.0306250.030625[1.4,1.425][1.4,1.425]
331.41251.4125−0.00484375-0.00484375[1.4125,1.425][1.4125,1.425]
b3−a3=0.18=0.0125smaller original widthm3=1.41875midpoint∣m3−α∣≤0.00625half the final width\begin{aligned} b_3-a_3&=\frac{0.1}{8}=0.0125 && \text{smaller original width}\\ m_3&=1.41875 && \text{midpoint}\\ |m_3-\alpha|&\le0.00625 && \text{half the final width} \end{aligned}

Why this step? A better starting bracket improves the guarantee without changing the number of iterations.

Answer. Bracket [1.4125,1.425][1.4125,1.425], midpoint 1.418751.41875, error magnitude at most 0.006250.00625.

Check. The bound is one tenth of the previous one, matching the one-tenth starting width.

To obtain midpoint error magnitude below a specified tolerance ε\varepsilon, choose nn so that (b0−a0)/2n+1<ε(b_0-a_0)/2^{n+1}<\varepsilon. This is an error bound, not automatically a guarantee about every decimal-rounding boundary.

Watch out

Wrong: replace the left endpoint whenever the midpoint is negative, regardless of the endpoint signs. Right: retain the sign-changing half; the sign at the original left endpoint need not always be negative.

Use a new function and keep the same three-halving procedure.

False position uses a chord and keeps the bracket

A midpoint ignores the actual heights of the two endpoints. False position uses the straight line joining their graph points, then retains opposite signs as before.

The chord through (a,f(a))(a,f(a)) and (b,f(b))(b,f(b)) has equation

y=f(a)+f(b)−f(a)b−a(x−a)y=f(a)+\frac{f(b)-f(a)}{b-a}(x-a)

Setting y=0y=0 gives its horizontal-axis intercept.

False-position step

For a continuous function with f(a)f(b)<0f(a)f(b)<0,

c=af(b)−bf(a)f(b)−f(a)c=\frac{a f(b)-b f(a)}{f(b)-f(a)}

Stop if f(c)=0f(c)=0. Otherwise replace the endpoint whose function value has the same sign as f(c)f(c), preserving the sign-changing bracket.

Not in the formula booklet: learn it.

The intercept lies between opposite-sign endpoints. It need not halve the interval, and one endpoint can remain fixed for several steps.

Worked example 3: one endpoint stays fixed

Question. Apply three false-position steps to f(x)=x2−2f(x)=x^2-2, starting from [1,2][1,2]. Record the new intercepts to eight decimal places.

Plan. Find each chord intercept and replace only the endpoint with the same sign.

c1=1(2)−2(−1)2−(−1)=43first chordf(c1)=−29<0replace the left endpointc2=(4/3)2−2(−2/9)2+2/9=75inputs 4/3,2f(c2)=−125<0left endpoint movesc3=(7/5)2−2(−1/25)2+1/25=2417inputs 7/5,2f(c3)=−2289<0right endpoint still 2\begin{aligned} c_1&=\frac{1(2)-2(-1)}{2-(-1)}=\frac43 && \text{first chord}\\ f(c_1)&=-\frac29<0 && \text{replace the left endpoint}\\ c_2&=\frac{(4/3)2-2(-2/9)}{2+2/9}=\frac75 && \text{inputs }4/3,2\\f(c_2)&=-\frac1{25}<0 && \text{left endpoint moves}\\ c_3&=\frac{(7/5)2-2(-1/25)}{2+1/25}=\frac{24}{17} && \text{inputs }7/5,2\\f(c_3)&=-\frac2{289}<0 && \text{right endpoint still }2 \end{aligned}

Why this step? The right endpoint 22 is retained because its function value remains the opposite sign.

Answer. c1=1.33333333c_1=1.33333333, c2=1.40000000c_2=1.40000000, c3=1.41176471c_3=1.41176471, with final bracket [24/17,2][24/17,2].

Check. All three intercepts lie below the positive root, and f(2)=2>0f(2)=2>0 still supplies the other bracket endpoint.

Change only the initial right endpoint from 22 to 1.51.5.

Worked example 4: a closer opposite-sign endpoint

Question. Apply three false-position steps to the same function on [1,1.5][1,1.5].

Plan. Retain 1.51.5 while the successive intercepts have negative function values.

c1=1(0.25)−1.5(−1)0.25−(−1)=75new first chordf(c1)=−125<0left endpoint movesc2=(7/5)(1/4)−(3/2)(−1/25)1/4+1/25=4129right endpoint still 1.5c3=(41/29)(1/4)−(3/2)(−1/841)1/4+1/841=239169same update rule\begin{aligned} c_1&=\frac{1(0.25)-1.5(-1)}{0.25-(-1)}=\frac75 && \text{new first chord}\\ f(c_1)&=-\frac1{25}<0 && \text{left endpoint moves}\\ c_2&=\frac{(7/5)(1/4)-(3/2)(-1/25)}{1/4+1/25}=\frac{41}{29} && \text{right endpoint still }1.5\\ c_3&=\frac{(41/29)(1/4)-(3/2)(-1/841)}{1/4+1/841}=\frac{239}{169} && \text{same update rule} \end{aligned}

Why this step? Replacing the right endpoint merely because it is older would turn this into a different method.

Answer. The last two function values are −1/841-1/841 and −1/28561-1/28561, so both new intercepts replace the left endpoint. The recorded intercepts are 1.40000000,1.41379310,1.414201181.40000000,1.41379310,1.41420118, with final bracket [239/169,1.5][239/169,1.5].

Check. The closer initial endpoint gives better intercepts here, but the final bracket remains much wider than the last two intercepts' difference.

A sequence of close intercepts is not the same object as the maintained sign bracket. Do not silently use the last two negative intercepts as opposite-sign bounds.

Watch out

Wrong: keep the newest two points after every false-position step. Right: keep the pair with opposite signs, even if one endpoint is old.

Use a new equation with the same positive-side endpoint pattern.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account