20.2 Errors 561
so that, in the present case,
andx
2
has only one significant figure.
However, because the roots of a quadratic have the property x
1
x
2
1 = 1 c 2 a, an
alternativeformula for the second root isx
2
1 = 1 c 2 x
1
a,
with error of 1 in the least significant figure.
This example shows that the correct procedure for the solution of a quadratic
equation, irrespective of the number of significant figures used, is
(20.3b)
0 Exercise 6
EXAMPLE 20.4Table 20.1 shows some results obtained for the function
f(x) 1 = 1 (1 1 − 1 cos 1 x) 2 x
2
with a 10-digit pocket calculator.
Table 20.1 Values off(x) 1 = 1 (1 1 − 1 cos 1 x) 2 x
2
x Computed f(x) True f(x)
0.1 0.4995 8346 3 0.4995 8347 22
0.01 0.4999 95 0.4999 9583 33
0.001 0.4999 0.4999 9995 83
0.0001 0.49 0.4999 9999 96
0.00001 0 0.5000 0000 00
An alternative, and correct, procedure to eliminate the differencing errors is to use the
truncated MacLaurin expansion of the function,
which, by Taylor’s theorem, has error bound2.5 1 × 110
− 11
for|x| 1 ≤ 1 0.1.
0 Exercises 7, 8
11
246
01
2
24
−
≈
!
−
!
!
≤.
cosx
x
xx
for | |x
if bxthen
b
a
b
a
c
a
x
c
x
=−−
−
0 ,=
22
1
2
2
1
aa
if bxthen
b
a
b
a
c
a
x
c
x
<=−+
−
0 ,=
22
1
2
2
1
aa
x
2
2 000
35 94
= 0 05565
.
.
=.
x
2
= −18 322 18 00 17 94 0 06=.−.=.
x
1
= +18 322 18 00 17 94 35 94=.+.=.