Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

ATILIM U NIVERSITY,

M ATHEMATICS D EPARTMENT

MATH380 Numerical Methods for Engineers


Assignment 5( Interpolation/Least Square lines/Spline/Numerical
Differentiation )

November 30, 2016

1. Consider the following data

x −1 0 2
y 1 −2 −1

a) Find the Lagrange polynomial P (x) of least degree that inter-


polates this data.
b) Find the Newton polynomial Q(x)of least degree that interpo-
lates this data.
c) Construct the divided difference table for this data.
d) Find the least-squares line y = f (x) = Ax +B for this set of data.
e) Find the natural cubic spline interpolation polynomial that in-
terpolates this set of data.
f) Show that the polynomials P (x) and Q(x) are identical.
g) We add one more point (3, 1) to this set of data, i.e

x −1 0 2 3
y 1 −2 −1 1

Find an interpolation polynomial that interpolates this data.(Hint:


Use polynomial in part (b))

2. Given that
p p p
cos( 0) = 1, cos( 1) = 0.540, cos( 2) = 0.155

1
Find an interpolation polynomial P (x) the interpolates the points

(0, 1), (1, 0.540),


(2, 0.155).
p
Use this polynomial to approximate cos( 1.5), i.e. find P(1.5). Find
the absolute error p
|P (1.5) − cos( 1.5)|
in this approximation.
3. Find the order of the following approximations
− f (x + 2h) + 16 f (x + h) − 30 f (x) + 16 f (x − h) + f (x − 2h)
a) f 00 (x) ≈
12h 2
f (x + 3h) − 3 f (x + 2h) + 3 f (x + h) − f (x)
b) f (3) (x) ≈
h3
4. Use f 00 (x) and f (3) (x) in Question3, with h = 0.1 to approximate
f 00 (−1) and f (3) (−1) for the function

f (x) = x 5 − x 3 .

Find the relative error in each approximation.


5. Use f 00 (x) and f (3) (x) in Question3, with h = 0.2 to approximate
f 00 (1) and f (3) (1) for the function
p
x
f (x) = e .

Find the relative error in each approximation.


6. Use the second-order approximation to
f (x + h) − 2 f (x) + f (x − h)
f 00 (x) ≈
h2
to find an approximation of order 4 by using Richardson extrapola-
tion.
7. Determine the value of a, b, c ∈ R that makes the function
 3
x x ∈ [0, 1]
S(x) =
 a + b(x − 1) + c(x − 1)2 + 1 (x − 1)3 x ∈ [1, 3]
2
a cubic spline. Is it a natural cubic spline?

2
8. Textbook Sec.4.3 Q2

9. Textbook Sec.4.4 Q6

10. Textbook Sec.5.1 Q1-(b)

11. Textbook Sec.5.3 Q3-(a)

12. Textbook Sec.5.3 Q9-(b) (Use only the knots x 0 , x 2 and x 3 . Not use
the knot x 1 .)

You might also like