1.09

Locating roots by change of sign

Locating roots by a change of sign 1.09

Locating roots by a change of sign (Numerical methods)
Definitions
  • Root of : a value with ; graphically, a point where meets the -axis.
  • Continuous on an interval: the graph of can be drawn across that interval without lifting the pen — no jumps, gaps or vertical asymptotes.
Key results
  • Intermediate Value Theorem: if is continuous on and and have opposite signs, then has at least one root between and .
  • In practice the test is simply the sign of the product: guarantees a sign change, and hence a root, in the interval .
  • Evaluating at successive values inside the interval narrows the interval containing the root to any required degree of accuracy.
Notes
  • Continuity is not an optional detail. satisfies and , an apparent sign change, yet has no root at all — the sign changes across a vertical asymptote rather than across the -axis.
  • Always state the two function values, the fact that they have opposite signs, and the fact that is continuous on the interval. A sign-change answer with any of the three missing is an incomplete argument.
  • State the theorem's conclusion as 'a root', not 'the root' — the theorem only guarantees existence, and says nothing by itself about how many roots lie in the interval.

Narrowing the interval: decimal search 1.09

Key results
  • Interval bisection is the same idea with the interval halved each time: test the midpoint, keep whichever half still shows a sign change.
  • To justify a root as correct to 1 decimal place, show a sign change across the whole rounding interval — any narrower interval lying inside it will do.
Method
  1. Confirm a sign change over a starting interval by evaluating and .
  2. Subdivide the interval into equal steps (usually tenths) and evaluate at each step, tabulating the signs.
  3. Identify the consecutive pair of values between which the sign changes; the root lies in that narrower interval.
  4. Repeat on the new interval until it is short enough to pin the root down to the required accuracy.

In practiceShow that has a root between 2 and 3, and find it to 1 decimal place.

  1. a sign change, and is continuous
  2. the first tenth where the sign changes
  3. test the boundary of the rounding interval
  4. The root lies between 2.05 and 2.1, so it is 2.1 to 1 decimal place.
Notes
  • Rounding is a claim about an interval, not about a single evaluation: showing is small does not prove the root rounds to .
  • Bisection always works given a sign change but is slow: each step gains only about one third of a decimal digit, so around ten steps are needed per three digits.
  • Tabulate values neatly (x, f(x), sign) as you go — losing track of which sign belongs to which x-value is the most common source of an incorrectly narrowed interval.

Limitations of the sign-change method 1.09

Limitations of the sign-change method (Numerical methods)
Key results
  • A sign change proves at least one root exists, but never proves the root is unique — an odd number of roots in the interval produces exactly the same single sign change.
  • An even number of roots in the interval produces no sign change at all, even though roots are present.
  • A repeated root touches the axis without crossing it, so it never produces a sign change: has a root at , yet and are both positive.
Notes
  • A sketch of , or knowledge of how many turning points has, is the standard safeguard against missing or double-counting roots.
  • Choose the search interval short enough that the graph is plausibly monotonic across it; a long interval hides pairs of roots.
  • The number of stationary points of bounds the number of roots it can have — a cubic has at most two turning points, so at most three roots, which narrows how many a sign-change search needs to find.

Worked examples

Worked example

Show that the equation has a root between and .

Show worked solution

Let:

Then:

and:

Since and , there is a change of sign, and is a polynomial and therefore continuous on .

By the Intermediate Value Theorem there is at least one root of in the interval .

Worked example

Use a decimal search to find, to 1 decimal place, the root of that lies between and .

Show worked solution

With:

and:

so the sign changes and the root lies in .

To decide the first decimal place, test the midpoint of the rounding interval:

So the root lies in , which is contained in , and every value in that interval rounds to .

Hence the root is to 1 decimal place.

Continuing,

and:

so the root lies in:

and is to 2 decimal places.

1.09

Iteration and fixed-point methods

Fixed-point iteration 1.09

Fixed-point iteration (Numerical methods)
Definitions
  • Rearrangement: writing in the equivalent form , so that a root of is a fixed point of .
  • Fixed point of : a value with .
Key results
  • Iterating from a starting value generates a sequence; if that sequence converges to a limit , then , so is a root of the original equation .
  • The same equation has many valid rearrangements. From one can obtain , or , or , all with the same roots.
Method
  1. Rearrange into the form .
  2. Choose a starting value near the root, guided by a sign-change search or a sketch.
  3. Compute , , and so on, keeping full calculator accuracy between steps and rounding only at the end.
  4. Stop when successive iterates agree to the accuracy required, then confirm the answer by a sign change over its rounding interval.

In practiceUse with to find the root of to 3 decimal places.

  1. a rearrangement
  2. full accuracy between steps
  3. sign change over the rounding interval
  4. So the root is to 3 decimal places.
Notes
  • Rounding intermediate iterates and feeding the rounded value back in is the most common source of a wrong final digit — use the calculator's answer key to iterate.
  • Convergence of the iteration is evidence, not proof: the formal check that the limit really is the root to the stated accuracy is still a sign change.
  • If the iterates start moving further from the intended root, or oscillate wildly instead of settling, stop and try a different rearrangement rather than continuing in the hope it corrects itself.

Convergence, divergence and cobweb diagrams 1.09

Convergence, divergence and cobwebs (Numerical methods)
Key results
  • Whether converges near a root depends on the gradient of there: the iteration converges when |g&#039;(\alpha)|<1 and diverges when |g&#039;(\alpha)|>1.
  • Staircase diagram: when 0<g&#039;(\alpha)<1, the iterates approach the root from one side in steps.
  • Cobweb diagram: when -1<g&#039;(\alpha)<0, the iterates alternate either side of the root while closing in on it.
  • The smaller |g&#039;(\alpha)| is, the faster the convergence.
Method
  1. Sketch and the line on the same axes; their intersection is the root.
  2. From on the -axis, move vertically to the curve — that height is .
  3. Move horizontally to the line , which carries the value back onto the -axis.
  4. Repeat; the picture staircases inward or cobwebs inward if the iteration converges, and spirals or steps away if it diverges.

In practiceWill converge to the root ? Compare .

  1. \displaystyle g(x)=(2x+5)^{1/3}:\ \ g&#039;(\alpha)=\tfrac23(2\alpha+5)^{-2/3}\approx0.150<g&#039;(\alpha)<1: a staircase that converges
  2. \displaystyle g(x)=\tfrac12\left(x^3-5\right):\ \ g&#039;(\alpha)=\tfrac32\alpha^2\approx6.6|g&#039;(\alpha)|>1: the steps move away from the root
  3. With -1<g&#039;(\alpha)<0 the diagram would be a cobweb spiralling inwards.
Notes
  • A diverging rearrangement is not a mistake in the algebra — it is simply unusable, and a different rearrangement must be tried.
  • One rearrangement can converge to one root of the equation while a different rearrangement, or a different , converges to another.
  • g&#039;(\alpha) can be estimated in practice from the equation without knowing exactly, by differentiating and evaluating near the approximate root already found from a sign-change search.

Worked example

Worked example

The equation can be rearranged as:

Starting with , find , , and to 4 decimal places, and comment on the convergence.

Show worked solution

The rearrangement is valid because:

so any limit of the iteration is a root of the original equation.

Iterating:

from :

; (all to 4 d.p., with full accuracy carried between steps).

The iterates increase steadily towards the root and each new estimate changes by roughly a fifth of the previous change, which is the staircase behaviour expected when:

0<g&#039;(\alpha)<1

Convergence is reliable but noticeably slower than Newton-Raphson on the same equation.

1.09

The Newton–Raphson method

The Newton-Raphson method 1.09

The Newton–Raphson method (Numerical methods)
Key results
  • Newton-Raphson iteration: x_{n+1} = x_n - \dfrac{f(x_n)}{f&#039;(x_n)}.
  • Geometrically, the tangent to at the point is followed down to the -axis, and the crossing point is taken as the next estimate.
  • The formula is derived directly from that tangent: the tangent has equation y-f(x_n)=f&#039;(x_n)(x-x_n), and setting gives x=x_n-\dfrac{f(x_n)}{f&#039;(x_n)}.
  • Near a simple root with a well-behaved curve, convergence is very fast — roughly doubling the number of correct digits at each step, far quicker than a typical fixed-point rearrangement.
Method
  1. Differentiate to obtain f&#039;(x).
  2. Choose a sensible close to the root, informed by a sign-change search or a sketch.
  3. Apply x_{n+1}=x_n-\dfrac{f(x_n)}{f&#039;(x_n)}, keeping full accuracy between iterations.
  4. Stop when successive iterates agree to the required accuracy, and verify with a sign change over the rounding interval.

In practiceApply Newton-Raphson to from .

  1. \displaystyle f&#039;(x)=3x^2-2
  2. \displaystyle x_1=2-\dfrac{f(2)}{f&#039;(2)}=2-\dfrac{-1}{10}=2.1
  3. converging fast
  4. and agree to 6 decimal places: .
Notes
  • Newton-Raphson is itself a fixed-point iteration, with g(x)=x-\dfrac{f(x)}{f&#039;(x)} — it is just an unusually well-chosen one.
  • Newton-Raphson needs BOTH and f&#039;(x) evaluated at each step, unlike simple fixed-point iteration — forgetting to differentiate first, and instead reusing in place of f&#039;(x), is a common setup error.

When Newton-Raphson fails 1.09

When Newton–Raphson fails (Numerical methods)
Key results
  • If f&#039;(x_n)=0 the iteration is undefined: the tangent is horizontal and never meets the -axis.
  • If f&#039;(x_n) is merely close to zero — that is, is near a stationary point — the correction term \dfrac{f(x_n)}{f&#039;(x_n)} is enormous, and the next estimate is thrown far away, possibly converging to a completely different root or diverging.
  • The method can also fail if the interval between and the root contains a discontinuity or vertical asymptote of .
Notes
  • This is why a sensible initial estimate matters: locate the root by a sign change first, then start Newton-Raphson inside that interval.
  • If asked to explain a failure, name the specific cause at the given (for example 'the initial estimate is a stationary point, so f&#039;(x_0)=0 and the tangent never meets the -axis'), rather than saying only that the method 'does not work'.
  • A quick sketch showing the tangent at the given is often the fastest way to see and explain why it shoots off towards the wrong root or fails to converge at all.

Worked examples

Worked example

Use the Newton-Raphson method with to find , and for:

Show worked solution
f&#039;(x)=3x^2-2

At :

and:

f&#039;(2)=3(4)-2=10

so:

At :

and:

f&#039;(2.1)=3(4.41)-2=11.23

so:

(4 d.p.).

At:

and:

f&#039;(x_2)=11.161647

so:

The estimates have already stabilised to 6 decimal places after three steps, illustrating how quickly Newton-Raphson converges near a simple root; the root is to 6 d.p.

Worked example

Explain why the Newton-Raphson method cannot be applied to:

with , and use a better starting value to find the largest root to 4 decimal places.

Show worked solution
f&#039;(x)=3x^2-3

so:

f&#039;(1)=3-3=0

The Newton-Raphson formula requires division by f&#039;(x_0), which is undefined here: geometrically, is a stationary point, the tangent there is horizontal, and it never meets the -axis.

Choose instead , which is a sensible estimate since:

and:

give a sign change in .

Then:

f&#039;(1.5)=3(2.25)-3=3.75

so:

Next,

and:

f&#039;(1.5333333)=4.0533333

so:

A further step gives:

so the root is to 4 d.p.

As a check,

and:

confirming a sign change across the rounding interval.

1.09

Numerical integration: the trapezium rule

Numerical integration: the trapezium rule 1.09

The trapezium rule (Numerical methods)
Definitions
  • Strip: one of the equal-width slices the interval is divided into, each of width .
  • Ordinate: one of the function values at the strip boundaries .
Key results
  • Trapezium rule: , with .
  • The rule treats each strip as a trapezium rather than a rectangle, replacing the curve across each strip by the straight chord joining its two ordinates.
  • The two outer ordinates and are counted once each; every interior ordinate is counted twice, because it is a side shared by two adjacent trapezia.
Method
  1. Compute and list the values of .
  2. Tabulate the corresponding ordinates , keeping more decimal places than the final answer needs.
  3. Add the two end ordinates, add twice the sum of all the interior ordinates.
  4. Multiply the total by and round the final answer only at this stage.

In practiceEstimate using 4 strips.

  1. 5 ordinates, 5 decimal places
  2. ends once, interior twice
  3. an overestimate: the curve is convex (true value 2.958)
Notes
  • Confusing strips with ordinates is the classic error: strips means ordinates, so '5 ordinates' means 4 strips.
  • For a trigonometric integrand, the calculator must be in radians, since in calculus always uses radian measure.
  • More strips always give a better approximation, but the trapezium rule can never give the exact area under a genuinely curved (non-straight) function, however many strips are used — it is an approximation method by design.

Accuracy of the trapezium rule 1.09

Accuracy of the trapezium rule (Numerical methods)
Key results
  • The rule overestimates the area under a convex (concave-up, f&#039;&#039;>0) curve, because each straight chord lies above the curve.
  • The rule underestimates the area under a concave (concave-down, f&#039;&#039;<0) curve, because each straight chord lies below the curve.
  • The error is approximately proportional to , so doubling the number of strips reduces the error by a factor of about 4.
Notes
  • This reasoning gives the direction of the error without ever computing the integral exactly — a sketch, or the sign of f&#039;&#039;, is enough.
  • If the curve changes concavity inside , no direction can be claimed: the over- and under-estimates in different parts of the interval partly cancel.
  • Increasing improves accuracy but never makes the answer exact for a genuinely curved graph; the trapezium rule is exact only for a straight line.
  • Whether an approximation is an over- or under-estimate can be stated with certainty from the concavity alone — no numerical comparison against the true value is needed to answer that part of a question.

Worked examples

Worked example

Use the trapezium rule with 4 strips to estimate:

and compare with the exact value.

Show worked solution

With strips over , , so:

giving:

The trapezium rule gives:

The exact value is:

so the trapezium rule overestimates here — as expected, since is convex (:

y&#039;&#039;=2>0

).

Doubling to 8 strips gives , and the error falls from to , a factor of about 4, matching the behaviour of the error.

Worked example

Use the trapezium rule with 5 ordinates to estimate:

giving your answer to 4 decimal places.

State, with a reason, whether this is an overestimate or an underestimate, and confirm by evaluating the integral exactly.

Show worked solution

Five ordinates means 4 strips, so:

and:

The ordinates are ,

The interior ordinates sum to , so the estimate is:

(4 d.p.).

Since has:

y&#039;&#039;=-\dfrac{1}{x^2}<0

the curve is concave throughout , so each chord lies below the curve and the rule underestimates.

Exactly, integrating by parts,

so:

(4 d.p.).

The estimate is indeed smaller, by about .