9 Numerical methods — coverage pack

5 specification leaves · notes, questions, answers and worked methods

9.1 · Locate roots of f(x) = 0 by considering changes of sign of f(x) in an interval on which f(x) is sufficiently well behaved; understand how change of sign methods can fail.

  • If a continuous function has values of opposite sign at the endpoints of an interval, the intermediate value theorem guarantees at least one root inside that interval.
  • Evaluate f(a)f(a) and f(b)f(b) accurately, record their signs, and conclude that a root lies in (a,b)(a,b) only after checking that ff is continuous there.
  • For example, f(1)<0f(1)<0 and f(2)>0f(2)>0 for a continuous ff, so the graph must cross the xx-axis at least once between 11 and 22.
  • A sign change across a discontinuity need not contain a root, while a repeated root can touch the axis without changing sign; a common error is to treat the sign test as an equivalence.

Tier 1 · Easy

  1. 1. Let f(x)=x2x1f(x)=x^2-x-1. Use endpoint values to establish that (1,2)(1,2) brackets a zero of ff.[2 marks]

    Answer

    • f(1)=1f(1)=-1 and f(2)=1f(2)=1, so continuity and the change of sign give a root in (1,2)(1,2).

    Method: Substitute the endpoints: f(1)=111=1f(1)=1-1-1=-1 and f(2)=421=1f(2)=4-2-1=1. A polynomial is continuous, and the endpoint values have opposite signs, so the intermediate value theorem guarantees at least one root between 11 and 22.

Tier 2 · Standard

  1. 1. For f(x)=x3+x5f(x)=x^3+x-5, show that there is exactly one root in (1,2)(1,2).[4 marks]

    Answer

    • f(1)=3f(1)=-3 and f(2)=5f(2)=5, so a root lies in (1,2)(1,2).
    • Since f(x)=3x2+1>0f'(x)=3x^2+1>0, ff is strictly increasing and the root is unique.

    Method: Calculate f(1)=1+15=3f(1)=1+1-5=-3 and f(2)=8+25=5f(2)=8+2-5=5. Continuity gives at least one root in (1,2)(1,2). Also f(x)=3x2+1f'(x)=3x^2+1, which is positive for every real xx, so ff is strictly increasing and cannot cross the axis more than once.

Tier 3 · Hard

  1. 1. Two sign tests are proposed. For h(x)=1x2h(x)=\frac{1}{x-2}, the values h(1)h(1) and h(3)h(3) have opposite signs. For k(x)=(x2)2k(x)=(x-2)^2, the values k(1.9)k(1.9) and k(2.1)k(2.1) have the same sign. Explain why neither test gives the correct conclusion about roots in the stated intervals.[4 marks]

    Answer

    • hh changes sign across x=2x=2 but has no root because it is discontinuous there.
    • kk has the repeated root x=2x=2 but does not change sign across it.

    Method: For hh, h(1)=1h(1)=-1 and h(3)=1h(3)=1, but hh is undefined at x=2x=2, so continuity fails and the sign change occurs across a vertical asymptote rather than a root. For kk, k(2)=0k(2)=0, but squaring makes k(x)0k(x)\geq0 on both sides of 22, so the graph touches the axis at a repeated root without crossing it.

9.2 · Solve equations approximately using simple iterative methods; be able to draw associated cobweb and staircase diagrams.

  • A fixed-point iteration rewrites an equation as x=g(x)x=g(x) and generates approximations using xn+1=g(xn)x_{n+1}=g(x_n) from a chosen starting value.
  • Calculate successive values without premature rounding; on a graph of y=g(x)y=g(x) and y=xy=x, move vertically to y=g(x)y=g(x) and horizontally to y=xy=x to display each iteration.
  • Near a fixed point α\alpha, iterations usually converge when g(α)<1|g'(\alpha)|<1: a positive gradient gives a staircase pattern and a negative gradient gives a cobweb pattern.
  • Different rearrangements of the same equation can converge at different rates or diverge; a common error is to assume that obtaining x=g(x)x=g(x) automatically produces a useful recurrence.

Tier 1 · Easy

  1. 1. The recurrence xn+1=12(xn+6xn)x_{n+1}=\frac{1}{2}\left(x_n+\frac{6}{x_n}\right) is used with x0=2x_0=2. Find x1x_1 and x2x_2.[2 marks]

    Answer

    • x1=2.5x_1=2.5 and x2=2.45x_2=2.45

    Method: Substitute x0=2x_0=2 to obtain x1=12(2+6/2)=2.5x_1=\frac12(2+6/2)=2.5. Then x2=12(2.5+6/2.5)=12(4.9)=2.45x_2=\frac12(2.5+6/2.5)=\frac12(4.9)=2.45.

Tier 2 · Standard

  1. 1. Use xn+1=7xnx_{n+1}=\sqrt{7-x_n} with x0=2x_0=2 to calculate x1x_1, x2x_2 and x3x_3 to 44 decimal places. State the equation satisfied by any limiting value.[4 marks]

    Answer

    • x1=2.2361x_1=2.2361, x2=2.1826x_2=2.1826 and x3=2.1948x_3=2.1948.
    • A limiting value satisfies x2+x7=0x^2+x-7=0.

    Method: Repeated substitution gives x1=5=2.236067x_1=\sqrt5=2.236067\ldots, x2=72.236067=2.182643x_2=\sqrt{7-2.236067\ldots}=2.182643\ldots and x3=72.182643=2.194847x_3=\sqrt{7-2.182643\ldots}=2.194847\ldots. If the sequence tends to LL, then L=7LL=\sqrt{7-L}, so L2+L7=0L^2+L-7=0.

Tier 3 · Hard

  1. 1. For xn+1=30.4xnx_{n+1}=3-0.4x_n with x0=1x_0=1, find x1x_1 to x4x_4. Determine the limiting value and state whether the graphical construction is a cobweb or a staircase, giving a reason.[5 marks]

    Answer

    • x1=2.6x_1=2.6, x2=1.96x_2=1.96, x3=2.216x_3=2.216 and x4=2.1136x_4=2.1136.
    • The limit is 157\frac{15}{7}, and the construction is a convergent cobweb because g(x)=0.4g'(x)=-0.4.

    Method: Apply the recurrence successively: x1=30.4=2.6x_1=3-0.4=2.6, x2=30.4(2.6)=1.96x_2=3-0.4(2.6)=1.96, x3=30.4(1.96)=2.216x_3=3-0.4(1.96)=2.216 and x4=30.4(2.216)=2.1136x_4=3-0.4(2.216)=2.1136. A limit LL obeys L=30.4LL=3-0.4L, hence L=3/1.4=15/7L=3/1.4=15/7. Since the constant gradient is negative, the iterates alternate across the fixed point, producing a cobweb; since 0.4<1|-0.4|<1, it converges.

9.3 · Solve equations using the Newton-Raphson method and other recurrence relations of the form xₙ₊₁ = g(xₙ); understand how such methods can fail.

  • Newton-Raphson replaces the curve locally by its tangent, giving xn+1=xnf(xn)f(xn)x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)} for a root of f(x)=0f(x)=0.
  • Differentiate first, substitute the current approximation into both ff and ff', and retain extra calculator digits until the requested final accuracy.
  • For instance, applying Newton-Raphson to f(x)=x2af(x)=x^2-a gives xn+1=12(xn+axn)x_{n+1}=\frac12\left(x_n+\frac{a}{x_n}\right).
  • The method can fail when f(xn)=0f'(x_n)=0, when a tangent sends the next value away from the desired root, or when the values enter a cycle; a common error is to continue without checking the iterates.

Tier 1 · Easy

  1. 1. Use one Newton-Raphson step on f(x)=x27f(x)=x^2-7 starting from x0=2.5x_0=2.5. Find x1x_1.[2 marks]

    Answer

    • x1=2.65x_1=2.65

    Method: Here f(x)=2xf'(x)=2x. Therefore x1=2.52.5272(2.5)=2.50.755=2.65x_1=2.5-\frac{2.5^2-7}{2(2.5)}=2.5-\frac{-0.75}{5}=2.65.

Tier 2 · Standard

  1. 1. Derive a Newton-Raphson recurrence for x3+x4=0x^3+x-4=0. Starting with x0=1.3x_0=1.3, find x1x_1 and x2x_2 to 55 decimal places.[5 marks]

    Answer

    • xn+1=xnxn3+xn43xn2+1x_{n+1}=x_n-\frac{x_n^3+x_n-4}{3x_n^2+1}.
    • x1=1.38287x_1=1.38287 and x2=1.37881x_2=1.37881.

    Method: Set f(x)=x3+x4f(x)=x^3+x-4, so f(x)=3x2+1f'(x)=3x^2+1. Substitution in the Newton-Raphson formula gives xn+1=xnxn3+xn43xn2+1x_{n+1}=x_n-\frac{x_n^3+x_n-4}{3x_n^2+1}. Using x0=1.3x_0=1.3 gives x1=1.382866x_1=1.382866\ldots, and substituting this unrounded value gives x2=1.378806x_2=1.378806\ldots.

Tier 3 · Hard

  1. 1. Newton-Raphson is applied to f(x)=x32x+2f(x)=x^3-2x+2 with x0=0x_0=0. Calculate x1x_1, x2x_2 and x3x_3, then explain why the method fails from this starting value.[4 marks]

    Answer

    • x1=1x_1=1, x2=0x_2=0 and x3=1x_3=1.
    • The iterates form the two-cycle 0,1,0,1,0,1,0,1,\ldots and do not approach a root.

    Method: Since f(x)=3x22f'(x)=3x^2-2, Newton-Raphson gives xn+1=xnxn32xn+23xn22x_{n+1}=x_n-\frac{x_n^3-2x_n+2}{3x_n^2-2}. From x0=0x_0=0, x1=02/(2)=1x_1=0-2/(-2)=1. Then x2=11/1=0x_2=1-1/1=0, so the same two values repeat and x3=1x_3=1. The recurrence is trapped in a cycle rather than converging.

9.4 · Understand and use numerical integration of functions, including the use of the trapezium rule and estimating the approximate area under a curve and limits that it must lie between.

  • The trapezium rule approximates an integral by replacing the curve over each strip with a straight chord and adding the resulting trapezium areas.
  • For ordinates y0,,yny_0,\ldots,y_n at equal spacing hh, use h2[y0+yn+2(y1++yn1)]\frac{h}{2}[y_0+y_n+2(y_1+\cdots+y_{n-1})] and include each interior ordinate twice.
  • A convex curve with f(x)>0f''(x)>0 lies below its chords, so the trapezium rule overestimates its integral; more, narrower strips usually improve the estimate.
  • Numerical area is not automatically the signed integral: a common error is to leave contributions below the xx-axis negative when the question asks for total area.

Tier 1 · Easy

  1. 1. The values of a function are y=1,3,9y=1,3,9 at x=0,1,2x=0,1,2 respectively. Use two strips and the trapezium rule to estimate 02ydx\int_0^2 y\,dx.[2 marks]

    Answer

    • 88

    Method: The strip width is h=1h=1. The trapezium rule gives 12[1+9+2(3)]=12(16)=8\frac12[1+9+2(3)]=\frac12(16)=8.

Tier 2 · Standard

  1. 1. Use four equal strips and the trapezium rule to estimate 02(x2+1)dx\int_0^2(x^2+1)\,dx. State whether the estimate is an overestimate or an underestimate, with a reason.[4 marks]

    Answer

    • 4.754.75
    • It is an overestimate because f(x)=2>0f''(x)=2>0, so the curve is convex.

    Method: Here h=0.5h=0.5 and the ordinates at x=0,0.5,1,1.5,2x=0,0.5,1,1.5,2 are 1,1.25,2,3.25,51,1.25,2,3.25,5. Thus the estimate is 0.52[1+5+2(1.25+2+3.25)]=0.25(19)=4.75\frac{0.5}{2}[1+5+2(1.25+2+3.25)]=0.25(19)=4.75. Since f(x)=2>0f''(x)=2>0, each chord lies above the curve, so the result is an overestimate.

Tier 3 · Hard

  1. 1. For f(x)=1xf(x)=\frac1x on 1x21\leq x\leq2, use four equal strips to find a trapezium-rule estimate. By using left- and right-endpoint rectangles, also give lower and upper bounds for 121xdx\int_1^2\frac1x\,dx. Give decimals to 44 decimal places.[6 marks]

    Answer

    • Trapezium estimate =0.6970=0.6970.
    • 0.6345<121xdx<0.75950.6345<\int_1^2\frac1x\,dx<0.7595.

    Method: The width is h=0.25h=0.25 and the ordinates are 1,45,23,47,121,\frac45,\frac23,\frac47,\frac12. The trapezium estimate is 18[1+12+2(45+23+47)]=11711680=0.6970\frac18[1+\frac12+2(\frac45+\frac23+\frac47)]=\frac{1171}{1680}=0.6970. Since 1/x1/x is decreasing, right endpoints give the lower sum 14(45+23+47+12)=533840=0.6345\frac14(\frac45+\frac23+\frac47+\frac12)=\frac{533}{840}=0.6345, while left endpoints give the upper sum 14(1+45+23+47)=319420=0.7595\frac14(1+\frac45+\frac23+\frac47)=\frac{319}{420}=0.7595.

9.5 · Use numerical methods to solve problems in context.

  • A contextual numerical model translates a physical condition, such as a target value or accumulated quantity, into a root, recurrence or numerical integral.
  • Define the function and units before applying the method, choose an interval or starting value that is meaningful in the context, and state the requested accuracy.
  • For a threshold M(t)=CM(t)=C, solve M(t)C=0M(t)-C=0 numerically; for a varying rate q(t)q(t), approximate the accumulated change with q(t)dt\int q(t)\,dt.
  • A calculator value is not a complete contextual answer: a common error is to omit units, ignore the model's domain or round in a way that makes a safety decision invalid.

Tier 1 · Easy

  1. 1. A greenhouse temperature is modelled by T(t)=18+4tt2T(t)=18+4t-t^2 degrees Celsius, where tt is hours after noon. Show that the temperature returns to 20C20^\circ\mathrm{C} at a time between 33 and 44 hours after noon.[2 marks]

    Answer

    • T(3)20=1T(3)-20=1 and T(4)20=2T(4)-20=-2, so the return time lies between 33 and 44 hours after noon.

    Method: Define f(t)=T(t)20=2+4tt2f(t)=T(t)-20=-2+4t-t^2. Then f(3)=2+129=1f(3)=-2+12-9=1 and f(4)=2+1616=2f(4)=-2+16-16=-2. The model is continuous and the sign changes, so a solution occurs in (3,4)(3,4).

Tier 2 · Standard

  1. 1. A culture is modelled by P(t)=200e0.3tP(t)=200e^{0.3t}, where tt is in hours. Use Newton-Raphson on f(t)=200e0.3t1000f(t)=200e^{0.3t}-1000 with t0=5t_0=5 to find t1t_1 and t2t_2. Hence estimate when the culture reaches 10001000 cells.[5 marks]

    Answer

    • t1=5.38550t_1=5.38550 and t2=5.36486t_2=5.36486.
    • The culture reaches 10001000 cells after approximately 5.3655.365 hours.

    Method: Differentiate to get f(t)=60e0.3tf'(t)=60e^{0.3t}. Use tn+1=tn200e0.3tn100060e0.3tnt_{n+1}=t_n-\frac{200e^{0.3t_n}-1000}{60e^{0.3t_n}}. Substitution of t0=5t_0=5 gives t1=5.385502t_1=5.385502\ldots, and the next substitution gives t2=5.364857t_2=5.364857\ldots. The positive time is therefore about 5.3655.365 hours.

Tier 3 · Hard

  1. 1. Water enters a tank at rates 10,14,18,21,19,15,1110,14,18,21,19,15,11 litres per minute at times 0,5,10,15,20,25,300,5,10,15,20,25,30 minutes. The tank initially contains 350350 litres and has capacity 800800 litres. Use the trapezium rule to estimate whether the tank overflows during the 3030 minutes, and estimate any excess at the end.[5 marks]

    Answer

    • Estimated inflow =487.5=487.5 litres and estimated final volume =837.5=837.5 litres.
    • The model predicts overflow, with 37.537.5 litres in excess of capacity at 3030 minutes.

    Method: With spacing h=5h=5, the trapezium estimate is 52[10+11+2(14+18+21+19+15)]=52(195)=487.5\frac52[10+11+2(14+18+21+19+15)]=\frac52(195)=487.5 litres. Adding the initial 350350 litres gives 837.5837.5 litres, which is 837.5800=37.5837.5-800=37.5 litres above capacity, so the tank must have overflowed by the end.