Download as pdf
Download as pdf
You are on page 1of 9
IV Piecewise Cubic Interpolation; CUBSPL Broken lines are neither very smooth nor very efficient approximators. Both for a smoother approximation and for a more efficient approximation, one has to go to piecewise polynomial approximation with higher order pieces. The most popular choice continues to be a cubic approximating function. In this chapter, we describe various schemes for piecewise cubic interpolation and give a program for cubic spline interpolation with various end conditions. Given the data 9(71),-..,9(tm) with a= 7, <--+ <1» =b, we construct a piecewise cubic interpolant f to g as follows. On each interval [1;..Ti4:1}, we have f agree with some polynomial P; of order 4, Q) f(z) =Pi(z) for 7 [S| 4 40-2) 2, Aald tevin +e). In matrix form, this reads 2 Ply —a)™D~*(y ~ a) + 5 (1 p)e™ Re -1Q7, with D the diagonal matrix [5y1,..-,dyw]. But, by (4), c= 3R-!Q7a, so that (1) can be written entirely in terms of a as (8) p(y—a)™D-?(y ~ a) + (1 — p)(R“1Q7 a) R(R*Q7 a). Since both D-? and (R-1QT)? R(R-!Q7) are (symmetric and) positive definite, (5) is minimized when a satisfies ~2pD-?(y — a) + 12(1 - p)(R1Q7)*R(R-1Q7)a = 0 210 XIV, Smoothing and Lenst-Squares Approximation or, using the fact that Roh = (ROT and simplifying, (6) pb Hy - a) = 2(1 = P/Q In particular, ss) <9 -9)" 70-9) = | 2=9))'yoett, compute S(fp) once we know ¢, with [[b[]3 := 2 [bs]?, which allows us to we multiply both sides of (6) by In order to obtain a linear system for ¢, 3QTD? and then use (4) to get p(3QTy — Re) = (1 — p)Q7D*Qe or (6(1 - p)Q7D°Q + pR)c = 3pQ7y. Now let u be such that c= 3pu. Then, in summary, (7) (6(1 - p)Q7D°Q + pR)u=QTy and 6) S(fp) = (6(1 ~ p))"1DQuil3, while, by (6), (9) a=y-6(1—p)D*Qu. From thi — om this, we obtain the information for the ppform of fy 08 follows: Splzi) = a4 Fplzi) = A | (0 | a;/ Az, — m1 ) Meas a 4 (Sp (2i)/2)Aay ~ (f(a) /6)(Azx4)? BR) = (e141) Sp (ai) [Ax

You might also like