MATH256 project
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
MATH256
1. In addition to their applications for data fitting, the Chebyshev polynomials Tn (x) are useful for approximating functions. This problem is concerned with approximations of the type f (x) ≈ SN (x), where
N
SN (x) = κn cnTn (x). ( ∗)
n=0
1
Here {cn } is a set of constants that depend on f , and κn = 2
1
if n = 0,
otherwise.
(a) Let m and n be nonnegative integers . Use the substitution x = cos θ to show that the Chebyshev polynomials Tn (x) satisfy the orthogonality relationship
Z−11
1
dx = κn
0
if m = n,
otherwise .
Hint: 2 cos(mθ) cos(nθ) = cos (m + n)θ + cos (m − n)θ .
Consider the residual
RN = Z dx.
Find an expression for and hence deduce that the residual is minimised if
cj = Z−11 dx, j = 0, 1, . . .
(c) Suppose that the coefficients bn satisfy the recurrence relation
bn (x) − 2xbn+1(x) + bn+2(x) = cn with bN+1(x) = bN+2(x) = 0.
By using the recurrence relation to eliminate cn from ( ∗), show that
SN (x) = b0 (x) − b2 (x)
(†)
You are not asked to investigate the stability of the recurrence relation .
Hint: find the coefficients multiplying b0 , b1 , b2 , . . . in ( ∗). You will need the recurrence relation for Chebyshev polynomials (problem 6.5); be careful with κn .
2. The Cn quadrature rule for the interval [−1, 1] uses the points at which Tn − 1 (t) = ±1 as its nodes
because T2 (t) = 2t2 − 1 .
(a) (i) Find the nodes and weights for the C5 quadrature rule .
(ii) Determine the first nonzero coefficient Sj for the C5 rule .
(iii) If the C5 rule and the five-point Newton– Cotes rule are applied on the same number of
subintervals, what approximate relationship do you expect the two errors to satisfy? (iv) Suppose that the C5 rule has been applied on N subintervals, and that all of the function
evaluations have been stored. How many new function evaluations are required to apply the C9 rule on the same set of subintervals? Justify your answer .
(b) Consider the approximation
−11 g(t) dt ≈ wq g(tq ).
where tq and wq are the nodes and weights for the Cn quadrature rule . Assume that n is odd,
and let k = (n − 1)/2 .
− = wq cos 2(qn1 jπ)1 !, j = 0, 1, . . . , k .
(ii) Consider the operator
Sk [cj ] = − + cj .
It can be shown (proof: exercise for fun) that
Sk "cos 2(qn1 jπ)1 !# = 0, for q = 2, . . . , n − 1.
1 |
4k2 − 1 . |
(c) (i) Write a Maple procedure that takes as its arguments a function f , real numbers a and b and a number of subintervals, N . As its result, it should return the approximate value of
I = ab f (x) dx,
calculated using the C5 rule .
(ii) Test your procedure using
I1 = 03 dx
and N = 2 . Calculate a second estimate using the five-point Newton– Cotes rule, also with N = 10 . Verify that the ratio of the errors is in agreement with your theoretical prediction from part (a) .
(iii) Repeat the calculations from part (ii) using a second integral chosen arbitrarily. Do not use a polynomial for f (x), but make sure there is no possibility of division by zero etc .
The numerical methods package provides a five point Newton– Cotes procedure; you can also download the procedure code from Canvas (five_pt_NC .mw) .
2022-05-05