Multiple-Choice Test Spline Method Interpolation COMPLETE SOLUTION SET 1. The ollowing n data points, ( x ), ( x ),.. ( x, ) 1, y 1, y n y n quadratic spline interpolation the x-data needs to be (A) equally spaced (B) placed in ascending or descending order o x -values (C) integers (D) positive The correct answer is (B). The ollowing n data points, ( x, y 1 1 ), ( x, y ),.. ( ) x n, y n, are given. For conducting, are given. For conducting quadratic spline interpolation the x-data needs to be arranged in ascending or descending order.
. In cubic spline interpolation, (A) the irst derivatives o the splines are continuous at the interior data points (B) the second derivatives o the splines are continuous at the interior data points (C) the irst and the second derivatives o the splines are continuous at the interior data points (D) the third derivatives o the splines are continuous at the interior data points In cubic spline interpolation, the irst and the second derivatives o the splines are continuous at the interior data points. In quadratic spline interpolation, only the irst derivatives o the splines are continuous at the interior data points.
3. The ollowing incomplete y vs. x data is given. x 1 7 y 5 11???????? 3 The data is it by quadratic spline interpolants given by x ax, 1 x ( ) 1 ( x) x + 1x 9, x ( x) bx + cx + d, x ( x) 5x 303x + 98, x 7 where a, b, c, and d are constants. The value o c is most nearly (A) 303. 00 (B) 1. 50 (C) 0.0000 (D) 1.000 Method 1: Since the irst derivatives o two quadratic splines are continuous at the interior points, at x d d ( bx + cx d ) ( x + 1x 9) bx c x + 1 + x () b + c () + 1 8b + c (1) and at x d d bx + cx d bx c 50x 303 ( ) ( 5x 303x + 98) + x () b + c 50() 303 1b + c 3 () Equations (1) and () in matrix orm 8 1 b 1 1 c 3 Solving these equations gives b 0.5 c 0
Method : The third spline bx + cx + d goes through x. However, so does the second spline. We can use this latter knowledge to ind the value o y at x. ( x) x + 1x 9, x () () + 1() 9 15 The third spline bx + cx + d goes through x. Hence b () + c() + d 15 1 b + c + d 15 (1) The third spline bx + cx + d goes through x. However, so does the ourth spline. We can use this latter knowledge to ind the value o y at x. ( x) 5x 303x + 98, x 7 () 5() 303() + 98 10 The third spline bx + cx + d goes through x. Hence b () + c() + d 10 3 b + c + d 10 () Since the irst derivatives o second and third quadratic splines are continuous at the interior points, at x d d ( bx + cx d ) ( x + 1x 9) bx c x + 1 + x () b + c () + 1 8b + c (3) Equations (1), () and (3) are then 1 b + c + d 15 3 b + c + d 10 8b + c + 0d Putting these equations in matrix orm gives 1 1 3 1 b 15 c 10 8 1 0 d Solving the above equations gives b 0.5 c 0 d 19
. The ollowing incomplete y vs. x data is given. where x 1 7 y 5 11???????? 3 The data is it by quadratic spline interpolants given by x ax 1, 1 x, ( ) ( x) x + 1x 9, x ( x) bx + cx + d, x ( x) ex + x + g, x 7 d a, b, c, d, e,, and g are constants. The value o (A) 1. 50 (B). 0000 (C) 3.000 (D) 1.00 Since the spline ( x) x + 1x 9 is valid in the interval x, the derivative at x. is d ( x) x + 1 d (.). + 1 10. + 1 3.000 at x. most nearly is
5. The ollowing incomplete y vs. x data is given. Where x 1 7 y 5 11???????? 3 The data is it by quadratic spline interpolants given by x ax 1, 1 x, ( ) ( x) x + 1x 9, x ( x) bx + cx + d, x ( x) 5x 303x + 98, x 7 a, b, c, and d are constants. What is the value o ( x)? (A) 00 (B) 5.7 (C) 5.750 (D) 8.000 To ind ( x) we must take ( ax ) + ( x + 1x 9) value o the constant a. Since at x, y 11 a 1 11 11+ 1 a Thus, ( x) ( x 1) + ( x + 1x 9) x [( 3 ) ( 3 ) ] 1 but irst we have to ind the [( 1 ) (.75 ) ] + [( 8.583+ 85.75 3) ( 5.3333+ 8 18) ] [.75] + [ 1] 5.75 3 1 x + x + x 9x 3 + 3 3 + 7 9 3 3 + 7 9
. A robot needs to ollow a path that passes consecutively through six points as shown in the igure. To ind the shortest path that is also smooth you would recommend which o the ollowing? (A) Pass a ith order polynomial through the data (B) Pass linear splines through the data (C) Pass quadratic splines through the data (D) Regress the data to a second order polynomial Path o a Robot y 8 7 5 3 1 0 0 5 10 15 x Using linear splines (Choice B) would create a straight-line path between consecutive points. Although this will be the shortest path it will not be smooth. Regressing the data to a second order polynomial (Choice D) will result in a smooth path but it will not pass through all the points. As demonstrated in the ollowing igure, using polynomial interpolation such as choice (A) is a bad idea and will result in a long path. By using quadratic spline interpolation (choice C), the path will be short as well as smooth.
10 8 y 0 0 8 10 1 x Cubic Spline Fith Order Polynomial