Exam practice
Every question from the end of every unit, with hints and answers to open. After you check an answer, mark how you did, and come back to the ones you didn’t get.
6 questions
Unit 20 · Numerical Computation
Printable PDFs
- Study notes 2 pages
- Worksheet 4 pages Answer key
- Harder practice questions 2 pages Answer key
Short questions
Show that has a root between 2 and 3, and find it correct to two decimal places by bisection. (5 marks)
Hint
Stop when both ends of the interval round to the same two decimal places.
Answer
f(2) = 8 − 8 − 7 = −7 < 0, f(3) = 27 − 12 − 7 = 8 > 0: a root in (2, 3).
| n | a | b | c | f(c) |
|---|---|---|---|---|
| 1 | 2 | 3 | 2.5 | −1.3750 |
| 2 | 2.5 | 3 | 2.75 | 2.7969 |
| 3 | 2.5 | 2.75 | 2.625 | 0.5879 |
| 4 | 2.5 | 2.625 | 2.5625 | −0.4236 |
| 5 | 2.5625 | 2.625 | 2.59375 | 0.0746 |
| 6 | 2.5625 | 2.59375 | 2.578125 | −0.1764 |
| 7 | 2.578125 | 2.59375 | 2.5859375 | −0.0514 |
The root is in [2.5859375, 2.59375]; both ends round to 2.59. The root is 2.59 correct to two decimal places.
Find the root of correct to four decimal places by Newton–Raphson, starting from x₀ = 2.5. (5 marks)
Hint
. Keep six decimal places.
Answer
, .
x₃ = 2.740646
x₂ and x₃ agree to four places: x = 2.7406.
- a.Show that Newton–Raphson for is . (2 marks)
- b.Use it to find correct to four decimal places, from x₀ = 2.5. (3 marks)
Answer
a. is the root of , with :
b. , , x₃ = 2.571282. So . (Check: .)
.
- a.Show that Newton–Raphson from x₀ = 0 never reaches a root. (2 marks)
- b.Find the root correct to three decimal places, starting from x₀ = −2. (3 marks)
Answer
- a.. From 0: ; from 1: . The values repeat 0, 1, 0, 1, … for ever, and neither is a root (f(0) = 2, f(1) = 1).
- b.f(−2) = −2, f(−1) = 3: the root is in (−2, −1).
, , x₃ = −1.769293, x₄ = −1.769292. The root is −1.769.
- a.An interval of width 1 traps a root. How many bisection steps make the error less than 0.00005 (four decimal places)? (2 marks)
- b.Newton–Raphson for from x₀ = 0.5 gives 0.566311, 0.567143, 0.567143. Find the approximate error and the relative approximate error of each step, and say which method you would use and why. (3 marks)
Answer
- a. means : is too few, so 15 steps ().
- b. (), then 0.000832 (0.147%), then less than 0.0000005 (under 0.0001%). The root is 0.567143, found in three steps where bisection would need about 20 for the same six places. Newton–Raphson, since is easy to find and never zero; bisection when the derivative is hard or the start uncertain.
Long question
The equation 3x − cos x − 1 = 0 (x in radians).
- a.Show that it has a root in (0, 1). (1 mark)
- b.Do four steps of bisection, and give the interval the root is in and the greatest possible error. (3 marks)
- c.Find the root correct to four decimal places by Newton–Raphson from x₀ = 0.5. (3 marks)
- d.Compare the two methods’ approximate errors. (1 mark)
Answer
a. f(0) = −1 − 1 = −2 < 0, f(1) = 3 − 0.5403 − 1 = 1.4597 > 0: a root in (0, 1).
b.
| n | a | b | c | f(c) |
|---|---|---|---|---|
| 1 | 0 | 1 | 0.5 | −0.3776 |
| 2 | 0.5 | 1 | 0.75 | 0.5183 |
| 3 | 0.5 | 0.75 | 0.625 | 0.0640 |
| 4 | 0.5 | 0.625 | 0.5625 | −0.1584 |
The root is in [0.5625, 0.625]; the midpoint c₄ = 0.5625 is within of it.
- c.f′(x) = 3 + sin x. , x₂ = 0.607102, x₃ = 0.607102. The root is 0.6071.
- d.Bisection’s approximate error halves each step: |c₄ − c₃| = 0.0625. Newton–Raphson’s fell 0.109, 0.0014, 0.0000002: after three steps it is over 100,000 times smaller than bisection’s after four.
