MCS 471 Practice Problems for Interpolation with Some Answers ------------------------------------------------------------------------------- CAUTION: These problems are just for practice and are not to be handed in. Some of these old exam problems and answers may not be relevant to your current course. Caveat Usor! In the following problems, use "EXAM PRECISION: chop to "d" significant digits only when you write an intermediate or final answer down and continue calculations with those numbers recorded. ------------------------------------------------------------------------------- Background Reading: Gerald and Wheatley, Chapter 3 Topics 3.2 Lagrangian Polynomials 3.3 Divided Differences 3.4 Evenly Spaced Data (Newton-Gregory Polynomial Form) ------------------------------------------------------------------------------- 0. For problems in the Gerald and Wheatley text, try chapter 3 exercises (pp. 300-307, 5th ed.) #1,2,3,4,11,12,13,14,24,26,28,29,30,31,32. 1. Find an approximation to the value f(0.25) using an interpolating polynomial passing through the 3 points: (x(i),f(x(i))= (0.1,0.07972), (0.2,0.1591), (0.3,0.2376), using d=4 digit chopping. (Ans.: 0.1984) 2. Inverse quadratic interpolation: Suppose the inverse function x=g(y)=y*exp(y) is given instead of the direct function y=f(y). (a) Using y1=1, y2=2, y3=3 find x1, x2, x3 (i.e. xi=x(i)=y(i)*exp(y(i))) to d=3 digits. (note: exp(x) on some calculators is keyed as "x,expx" while it is "x,inv,lnx" on others.) (b) Use the (inverse quadratic) interpolating polynominal p2(x) through (xi,yi)=(x(i),y(i)) for i=1 to 3 from (a) to approximate y=f(10) (i.e. the solution of 10=y*exp(y) ) to d=3 digits. (Ans.: (a) x-vector=(2.71,14.7,60.2); (b) f(10) =1.64+or-0.01 depending on the chops.) 3. Compute pn(n+1), where pn(x) = "p-sub-n-of-x", for n=0,1,2,3,4 if pn(k)=k/(k+1) for k=0 to n. (Partial Ans.: p2(3)=0.500). 4. How many multiplications/divisions and additions/subtractions as a function of n are needed to compute the sum of x**x from k=0 to n by (a) direct (slow) sum of powers counting exponentiations as equivalent multiplications and (b) by Newton's (Horner's) rule of fast polynomial evaluation?. (Hint: sum of k for k=1 to m is m*(m+1)/2). (Ans.: mults. = n; adds. = n) 5. Approximate v(2.738) using an interpolatory polynomial that best fits the data, x: 2.600 2.700 2.800 2.900 v: 6.815 7.944 9.299 10.93 . Here d=4. (Final Ans.: v(2.738)=(4c) 8.429 or 8.428 with extra intermediate chops). 6. Approximate j3(5.137) by interpolating the data: x: 5.000 5.200 5.600 j3(x): .3648 .3265 .2298 Here d =4. (Final Ans.: j3(5.137)=(4c) .3392 or .3390 with extra chops). -------------------------------------------------------------------------------