Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MATH20602

Numerical Analysis 1

Problem Sheet 2

Part A

(2.1)    Consider the following table of average monthly temperature and precipitation data for Manchester:

 

Jan

Feb

Mar

Apr

May

Jun

Jul

Aug

Sep

Oct

Nov

Dec

Mean Temp. ( C)

3.8

3.9

5.7

7.9

?

14.2

15.8

15.7

13.5

10.6

6.3

4.5

Precipitation (mm)

69.0

50.0

61.0

51.0

?

67.0

65.0

79.0

74.0

77.0

78.0

78.0

(a) For both sets of data, find the cubic interpolating polynomial p3 (x) o /3  that

fits the data for March, June, September, and December, and use it to estimate the missing data for May. How large is the average relative error on the known data?

(b) Using a computer (for example, MATLAB, Julia, Python, or Excel), find the in- terpolating polynomials p10 (x)  o /10  that interpolate the 11 known months, and estimate the missing values for May.  Compare the quality of the approxi- mation for May to that of part (a), given that the true values for May are 11.3 C (temperature) and 61.0 mm (precipitation).

(2.2)    (Shamir’s secret sharing scheme) Consider the following cryptographic proto- col. Given a secret number a0 and integers 0 < k < n,

· create pk (x) = a0 + a1 x + . . . + ak xk , with distinct ai  a0 , for 1 ● i k;

· compute function values yi   = pk (xi ), for 1  ● i  n, with xi  distinct, and distribute the pairs (xi , yi ) among n persons.

Show that any k + 1 or more of the participants can combine their knowledge to recon- struct the secret number a0 , but k or fewer participants cannot do that.

(2.3)    Write down the linear function a(x) that passes through the points (x0 , f (x0 )) and (x1 , f (x1 )).  Assuming that f  o C1 (-<, <) and setting x1   = x0  + ∈, define H(x) by

H(x) = lim a(x).

∈ →0

Show that H(x0 ) = f (x0 ) and H\ (x0 ) = f\ (x0 ).

Part B

(2.4)    Find the interpolating polynomial p2  o /2 for the function f (x) = ^x at the points x0  = 0, x1  = 1, and x2  = 4, using the Lagrange form. Use the interpolating polynomial to approximate ^2.

(2.5)    Prove that the Lagrangian basis functions L0 (x), . . . , Ln (x) defined in terms of x0 , . . . , xn satisfy L0 (x) + . . . + Ln (x) = 1. Do not expand out the polynomials!

(2.6)    Let p(x) = (a + bx)/(1 + cx) and suppose we wish to satisfy

p(xi ) = yi ,       i = 1, 2, 3,

for distinct xi .  Does such a p(x) exist, and is it unique?  Why might you prefer a rational function to a polynomial?

(2.7)    Suppose we are to construct a table of values of sin x for equally spaced values of x on [0, π].  What step size should we use to ensure that quadratic interpolation between any three consecutive values of x produces an answer with error ● 10-5 ?