Skip to content

9709 · 3.6

Numerical solution of equations — practice questions

Practice and worked examples for 9709 Numerical solution of equations. Short previews only — attempt the full question in MarkScheme against the official scheme.

Worked example 1

The equation x3+2x1=0x^3 + 2x - 1 = 0 has a single real root. (i) Show that the root lies between x=0.4x=0.4 and x=0.5x=0.5. (ii) Use the iterative formula xn+1=1xn2+2x_{n+1} = \frac{1}{x_n^2 + 2} with a starting value of x0=0.45x_0 = 0.45 to find the root correct to 3 decimal places. Give the result of each iteration to 5 decimal places.

Show solution outline

(i) Let f(x)=x3+2x1f(x) = x^3 + 2x - 1. f(0.4)=(0.4)3+2(0.4)1=0.064+0.81=0.136f(0.4) = (0.4)^3 + 2(0.4) - 1 = 0.064 + 0.8 - 1 = -0.136 f(0.5)=(0.5)3+2(0.5)1=0.125+11=0.125f(0.5) = (0.5)^3 + 2(0.5) - 1 = 0.125 + 1 - 1 = 0.125 Since f(x)f(x) is a continuous function and there is a change of sign between x=0.4x=0.4 and x=0.5x=0.5, a root must lie in the interval (0.4,0.5)(0.4, 0.5). [M1 for both evaluations, A1 for conclusion]

(ii) We are given the iterative formula xn+1=1xn2+2x_{n+1} = \frac{1}{x_n^2 + 2} and x0=0.45x_0 = 0.45. x1=1(0.45)2+2=12.2025=0.45403...x_1 = \frac{1}{(0.45)^2 + 2} = \frac{1}{2.2025} = 0.45403... x2=1(0.45403...)2+2=0.45340...x_2 = \frac{1}{(0.45403...)^2 + 2} = 0.45340... x3=1(0.45340...)2+2=0.45352...x_3 = \frac{1}{(0.45340...)^2 + 2} = 0.45352... x4=1(0.45352...)2+2=0.45350...x_4 = \frac{1}{(0.45352...)^2 + 2} = 0.45350... x5=1(0.45350...)2+2=0.45350...x_5 = \frac{1}{(0.45350...)^2 + 2} = 0.45350... [M1 for using the formula correctly at least once]

The values are converging. To show the root is 0.4540.454 to 3 d.p., we check the interval [0.4535,0.4545][0.4535, 0.4545]. f(0.4535)=(0.4535)3+2(0.4535)1=0.00018...<0f(0.4535) = (0.4535)^3 + 2(0.4535) - 1 = -0.00018... < 0 f(0.4545)=(0.4545)3+2(0.4545)1=+0.0020...>0f(0.4545) = (0.4545)^3 + 2(0.4545) - 1 = +0.0020... > 0 There is a sign change in the interval [0.4535,0.4545][0.4535, 0.4545], so the root is 0.4540.454 correct to 3 decimal places. [A1 for showing iterations converge, A1 for correct check and final answer]

Worked example 2

The equation ex5x=0e^x - 5x = 0 has a root near x=2x=2. Use the Newton-Raphson method with a starting value of x0=2x_0=2 to find this root correct to 4 decimal places.

Show solution outline

Let f(x)=ex5xf(x) = e^x - 5x. Then f(x)=ex5f'(x) = e^x - 5. The Newton-Raphson formula is xn+1=xnexn5xnexn5x_{n+1} = x_n - \frac{e^{x_n} - 5x_n}{e^{x_n} - 5}. [M1 for correct f(x)f'(x) and formula]

We start with x0=2x_0 = 2. x1=2e25(2)e25=27.389056107.3890565=22.6109442.389056=2(1.09288)=3.09288x_1 = 2 - \frac{e^2 - 5(2)}{e^2 - 5} = 2 - \frac{7.389056 - 10}{7.389056 - 5} = 2 - \frac{-2.610944}{2.389056} = 2 - (-1.09288) = 3.09288 [M1 for first correct application of formula]

x2=3.09288e3.092885(3.09288)e3.092885=3.0928822.029515.464422.02955=3.092886.565117.0295=3.092880.38551=2.70737x_2 = 3.09288 - \frac{e^{3.09288} - 5(3.09288)}{e^{3.09288} - 5} = 3.09288 - \frac{22.0295 - 15.4644}{22.0295 - 5} = 3.09288 - \frac{6.5651}{17.0295} = 3.09288 - 0.38551 = 2.70737

x3=2.70737e2.707375(2.70737)e2.707375=2.7073714.988813.5368514.98885=2.707371.451959.9888=2.707370.14535=2.56202x_3 = 2.70737 - \frac{e^{2.70737} - 5(2.70737)}{e^{2.70737} - 5} = 2.70737 - \frac{14.9888 - 13.53685}{14.9888 - 5} = 2.70737 - \frac{1.45195}{9.9888} = 2.70737 - 0.14535 = 2.56202

Continuing this process (often done on a calculator): x4=2.54303x_4 = 2.54303 x5=2.54264x_5 = 2.54264 x6=2.54264x_6 = 2.54264

The values have converged. To check for 4 d.p., we test the interval [2.542635,2.542645][2.542635, 2.542645]. f(2.542635)=e2.5426355(2.542635)=0.000003...<0f(2.542635) = e^{2.542635} - 5(2.542635) = -0.000003... < 0 f(2.542645)=e2.5426455(2.542645)=+0.000009...>0f(2.542645) = e^{2.542645} - 5(2.542645) = +0.000009... > 0 Since there is a sign change, the root is 2.54262.5426 correct to 4 decimal places. [A1 for showing convergence, A1 for correct answer to 4 d.p. after a valid check]