4.6 KB · commit a9602da
5.1 The function y=x3+9 is tabulated below: (3,36),(4,73),(5,134) Predict the value of y(4.5) using quadratic and natural cubic splines and state the absolute error in each case.
5.2 Given the points (0,0), (π/2,1) and (π,0) satisfying the function y=sinx, 0≤x≤π, determine the value of y(π/6) using quadratic spline approximation. Compare your result with that obtained in Example 5.5.
5.3 Determine the cubic spline s(x) valid in the interval [x0,x1] for the following data, given that s′′(x0)=y′′(x0)ands′′(x2)=y′′(x2). Find y(6.3).
| x | 6.2 | 6.4 | 6.6 |
|---|---|---|---|
| y=xlnx | 11.3119 | 11.8803 | 12.4549 |
5.4 Fit (a) a natural cubic spline and (b) a D1 cubic spline to the following data:
| x | 0.10 | 0.20 | 0.30 |
|---|---|---|---|
| y=ex | 1.1052 | 1.2214 | 1.3499 |
Find y(0.15) in each case and state which of these is the best fit.
5.5 Derive the cubic spline formula with D1 end conditions. Show that s′(xi)=yi′−1801h4yiv+O(h6) Given that the data (−1,1),(0,0)and(1,1) satisfies the function y=f(x) in −1≤x≤1, find the cubic spline approximation of y(−0.5) if y′(−1)=−4 and y′(1)=4.
5.6 Determine the cubic spline in 0≤x≤1 representing the data points and the end conditions given in Question 5.5 above.
5.7 Write an algorithm to implement formula (5.27) for computing a cubic spline in the interval [xi−1,xi].
5.8 The data points (−2,16),(0,0),(2,16) satisfy the relation y=f(x) in the interval −2≤x≤2. Determine the cubic spline valid in this interval and satisfying the end conditions y′(−2)=−32 and y′(2)=32.
5.9 Show that the error in the spline second derivative is given by s′′(xi)=yi′′−121h2yiiv+O(h4).
5.10 Prove the minimization property of Section 5.2.1 for the D1 spline.
5.11 If the function y(x) is periodic with period (xn−x0), the spline is called a periodic spline. In this case, we have s0(r)(x)=sn(r)(x),r=0,1,2. Using these conditions, obtain the recurrence relation in the matrix form.
5.12 If the end conditions are taken as M1=2M0+M2andMn−1=2Mn+Mn−2, then the spline curve is the same as the single cubic which is fitted throughout to the given data. For the data points (−2,−12),(−1,−8),(0,−3.9),(1,−0.1), the single cubic which fits these points is given by y=−151x3−203x2+60241x−3.9. Find the cubic spline which fits this data with the above end conditions.
5.13 The following table gives the values of z=f(x,y) for different values of x and y. Use the method of Section 5.3 to find z when x=1.5 and y=1.5. Compare your result with the actual value obtained from z=f(x,y)=x2+y2+y.
| y\x | 1 | 2 | 3 |
|---|---|---|---|
| 1 | 3 | 6 | 11 |
| 2 | 7 | 10 | 15 |
| 3 | 13 | 16 | 21 |
5.14 Using the data
| x | 0 | 1 | 2 |
|---|---|---|---|
| y=x3−5 | −5 | −4 | 3 |
find the cardinal splines Li(x) and hence determine the natural cubic spline valid in the interval 0≤x≤2.
5.15 Using the formula (5.58), determine the cubic B-spline s(x) with support [0,4] on the knots 0,1,2,3,4. State whether this is a unique representation.
5.16 With respect to the knots 0,1,2,3,4,5,6, compute B-splines of order 6 at x=1 using Cox–de Boor recurrence formula.
5.1 106.75 (error=6.625); 103 (error=2.875)
5.2 0.3333
5.3 11.5953
5.4 1.1622; 1.1618
5.5 s1(−0.5)=0
5.6 s2(x)=2x3−x2,0≤x≤1
5.8 −4x2−4x3;−4x2+4x3
5.12 s1(x)=−151x3−203x2+60241x−3.9
5.13 6.125
5.14 s(x)=23x3−21x−5,0≤x≤1
5.15 s(x)=c3[x3−4(x−1)+3+6(x−2)+3−4(x−3)+3]
5.16 s1,3=1,s2,3=21,s3,4=61,
s4,5=241,s4,6=0,s5,6=1201,
s5,7=0,s6,7=7201.