CH 19
CH 19
311
c19.qxd 7/11/11 5:45 PM Page 312
1. From
L 0(x) ⫽ x 2 ⫺ 20.5x ⫹ 104.5
1
L 1(x) ⫽ (⫺x 2 ⫹ 20x ⫺ 99)
0.75
c19.qxd 7/11/11 5:45 PM Page 313
1 2
L 2(x) ⫽ (x ⫺ 18.5x ⫹ 85.5)
3
(see Example 2) and the 5S-values of the logarithm in the text we obtain
p2(x) ⫽ ⫺0.005233x 2 ⫹ 0.205017x ⫹ 0.775950.
This gives the values and errors
2.2407, error 0
2.3028, error ⫺0.0002
2.3517, error ⫺0.0003
2.4416, error 0.0007
2.4826, error 0.0024.
It illustrates that in extrapolation one may usually get less accurate values than one does
in interpolation. p2(x) would change if we took more accurate values of the logarithm.
Small changes in initial values can produce large differences in final values.
Examples in which the difference in accuracy between interpolation and extrapo-
lation is larger can easily be constructed.
3. The difference table is
1.0 0.94608
0.37860
1.5 1.32468 ⫺0.09787
0.28073 ⫺0.00975
2.0 1.60541 ⫺0.10762
0.17311
2.5 1.77852
0 0.25 0.27633
0.97667
1 0.5 0.5250 ⫺0.44304
0.64640
2 1.0 0.84270
c19.qxd 7/11/11 5:45 PM Page 314
we obtain
p2(0.75) ⫽ 0.2763 ⫹ (0.75 ⫺ 0.25) # 0.9767 ⫹ (0.75 ⫺ 0.25)(0.75 ⫺ 0.5) # (⫺0.4430)
⫽ 0.7093,
in agreement with Prob. 9, except for a roundoff error.
8. With the change in j the difference table is
⫺3 0.5 1.127626
0.057839
⫺2 0.6 1.185465 0.011865
0.069704 0.000697
⫺1 0.7 1.255169 0.012562
0.082266
0 0.8 1.337435
If we impose the additional condition (3) with given k 0 and k n (tangent direction of
the spline at the beginning and at the end of the total interval considered), then for given
data the cubic spline is unique.
y
50
40
30
20
10
0
0 2 4 6 x
From this and, similarly, from (13) with j ⫽ 1 and j ⫽ 2 we get the spline g(x)
consisting of the three polynomials (see the figure)
q0(x) ⫽ 1 ⫹ x 3 (0 ⬉ x ⬉ 2)
q1(x) ⫽ 9 ⫹ 12(x ⫺ 2) ⫹ 6(x ⫺ 2) ⫺ 2(x ⫺ 2) ⫽ 25 – 36x ⫹ 18x ⫺ 2x 3
2 3 2
(2 ⬉ x ⬉ 4)
q2(x) ⫽ 41 ⫹ 12(x ⫺ 4) ⫺ 6(x ⫺ 4)2 ⫽ ⫺103 ⫹ 60x ⫺ 6x 2 (4 ⬉ x ⬉ 6).
10. We obtain
q0 ⫽ 2 ⫹ x 2 ⫺ x3
q1 ⫽ ⫺ 2 ⫺ 8 (x ⫺ 2) ⫺ 5(x ⫺ 2)2 ⫹ 5(x ⫺ 2)3
q2 ⫽ 2 ⫹ 32(x ⫺ 4) ⫹ 25(x ⫺ 4)2 ⫺ 11(x ⫺ 4)3.
The data of Prob. 10 are obtained from those of Prob. 9 by subtracting 2 from the
f-values, leaving k 0 and k 3 as they were. Hence, to obtain the answer to Prob. 10,
subtract 2 from each of the three polynomials in the answer to Prob. 9.
3. 0.693150. Exact to 6S: ln 2 ⫽ 0.693147; hence Simpson’s rule here gives a 5S-exact
value.
4. 0.07392816. Exact to 7S: 0.07392811 ⫽ ⫺12 (exp (⫺0.42) ⫺ 1)
5. 0.785398514 (9S-exact 0.785398164)
6. C ⫽ ⫺0.54>90 in (9), ⫺0.000694 ⬉ P ⬉ ⫺0.000094 (actual error ⫺0.000292).
In (10),
1
P0.5 ⬇ 15 (0.864956 ⫺ 0.868951) ⫽ ⫺0.000266.
Note that the absolute value of this is less than that of the actual error, and we must
carefully distinguish between bounds and approximate values.
8. From (10) and Prob. 1 we obtain
1
0.94608693 ⫹ 15 (0.94608693 ⫺ 0.946145) ⫽ 0.946083
which is exact to 6S, the error being 7 units of the 8th decimal.
c19.qxd 7/11/11 5:45 PM Page 317
10. We obtain
5 2 4
a4 a sin a j ⫺ b ⫹ 2 a sin k 2 ⫹ sin b ⫽ 0.545941.
1 1 1 1 25
24 j⫽1 4 8 k⫽1
16 16
3. ⫺3.145 ⬉ d ⬉ ⫺3.035
5. x 1 ⫽ 50 ⫹ 7151 ⫽ 99.990, x 2 ⫽ 0.01, x 2 ⫽ 1>99.990 ⫽ 0.010001
7. 0.5, 0.924207, 0.829106, 0.824146, 0.824132, 0.824132.
Answer: ⫾0.824132
9. 0.406 (3S-exact 0.411)
10. q0(x) ⫽ x 3, q1(x) ⫽ 1 ⫹ 3(x ⫺ 1) ⫹ 3(x ⫺ 1)2 ⫺ (x ⫺ 1)3, q2(x) ⫽ 6 ⫹
6(x ⫺ 2) ⫺ 2 (x ⫺ 2)3; p ⫽ ⫺83 x ⫹ 92 x 2 ⫺ 56 x 3
12. 0.90450 (5S-exact 0.90452)
13. (a) (⫺0 ⫹ 0.43)>0.4 ⫽ 0.16, (b) (⫺0.12 ⫹ 0.33)>0.2 ⫽ 0.13, exact 0.12