Lecture 9: Hermite interpolation availableAssignment 3 availableLecture 8 onlineLecture 7 onlineSchedule now available in "Admin"Problem class exercises now onlineLecture 6 onlineQuiz 1 solutions onlineLectures 2-3 exercises have solutions!Lecture 1 exercises have solutions!
These lecture notes are mainly a record of what we discussed in class. They should not be used as a replacement for attending lectures or reading books. Please let me know if you find any errors or have any questions about the material.
TipHypothesis
You can use the Hypothesis commenting system available on the right side panel (you can login with your U/Google account). This allows you annotate the notes (private) and leave comments or reply to other people’s comments (public).
Note
I encourage you to download the lecture notes and play around with the Julia code.
Notes for this lecture have not been updated since we met (stay tuned for updates)
7.1 Previously…..
Lagrange interpolation problem (find \(p\in \mathcal P_n\) such that \(p(x_j) = f(x_j) =: f_j\) for all \(x_j \in X = \{x_0 < \cdots < x_n\}\))
Theorem: there exists unique polynomial interpolation \(I_Xf \in \mathcal P_n\) solving the Lagrange interpolation problem,
Theorem: “Taylor-like” error estimate involving the node polynomial\(\ell_X(x) := (x-x_0)(x-x_1)\cdots (x- x_n)\): there exists \(\xi \in [a,b]\) such that
over all choices of \(X = \{x_0,\dots,x_n\}\). Equivalently, we are minimising \(\| p \|_{L^\infty}\) over all monic polynomials \(p\) of degree \(n+1\): that is, over all \(p\) such that \(p(x) = x^{n+1} + q(x)\) with \(q\in \mathcal P_n\). We will show that scaled Chebyshev polynomials (of the first kind) solve this (so-called Chebyshev) problem.
7.3 A Very Brief Introduction to Chebyshev Polynomials
Definition 7.1 For \(x \in [-1,1]\) there exists \(\theta \in [0,\pi]\) such that \(x = \cos\theta\). We can therefore define \(T_n\) on \([-1,1]\) by the condition that
We will show that \(T_n\) is a polynomial of degree \(n\). We define \(X_{\mathrm{I}}\) to be the set of \(n+1\) zeros of \(T_{n+1}\) and \(X_{\mathrm{II}}\) to be the set of \(n+1\) extreme points of \(T_n\). We will show that
The sum of these equations is therefore \(T_{n+1}(\cos\theta) + T_{n-1}(\cos\theta) = 2 \cos \theta \cos n\theta = 2 \cos(\theta) T_n(\cos\theta)\) and thus the recursion relation follows.
One can therefore show inductively that \(T_n\) is a polynomial of degree \(n\). Using the recursion, the coeficient of \(x^{n+1}\) in \(T_{n+1}\) is \(2\) times the coefficient of \(x^n\) in \(T_{n}\). You can therefore argue inductively that the coeficient of \(x^n\) in \(T_{n}\) is \(2^{n-1}\).
We have \(|T_n(\cos\theta)| = |\cos n\theta| \leq 1\) and this maximum is achieved when \(n\theta = j\pi\) for some \(j \in \mathbb Z\). Restricting this to \(\theta = \frac{j\pi}{n} \in [0,\pi]\) gives \(j = 0,\dots,n\). At these values, we have \(T_n( \cos\tfrac{j\pi}{n} ) = \cos j\pi = (-1)^j\).
\(T_{n+1}\) is a polynomial of degree \(n+1\) and thus has at most \(n+1\) zeros in the interval \([-1,1]\). We have \(T_{n+1}(\cos\theta) = \cos (n+1)\theta = 0\) when \((n+1)\theta = \frac{\pi}{2} + j \pi\) for \(j \in \mathbb Z\) such that \(\theta = \frac{ (2j+1) \pi }{ 2(n+1) } \in [0,\pi]\). That is, for \(j = 0,\dots,n\).
Here, we plot the first \(5\) Chebyshev polynomials on \([-1,1]\) together with \((x, T_n(x))\) for \(x \in X_{\mathrm{II}}\) with \(n=5\)
We define the monic (with leading coefficient equal to \(1\)) Chebyshev polynomials as \(t_0(x) = 1\) and \(t_n(x) := 2^{1-n} T_n(x)\) for \(n \geq 1\). We are ready for the main result of this lecture:
Theorem 7.1 The monic Chebyshev polynomials solve the Chebyshev problem (on \([-1,1]\)). That is,
By the change of sign theorem, there exists \(x_1,\dots,x_{n+1}\) such that \(z_j \leq x_{j+1} \leq z_{j+1}\) and \(r(x_j) = 0\). As a result, \(r\) is a polynomial of degree at most \(n\) with \(n+1\) zeros and thus \(r = 0\) and \(p = t_{n+1}\).
We have therefore shown that, choosing \(X =X_{\mathrm{I}}= \{ \text{zeros of }t_{n+1} \}\) minimises the node polynomial in the following sense
It turns out that \(\ell_{X_{\mathrm{II}}}(x) = 2^{-n} \big( T_{n+1}(x) - T_{n-1}(x) \big)\) and so \(\|\ell_{X_{\mathrm{II}}}\|_{L^\infty([-1,1])} \leq 2^{1-n}\) (here, we used \(|T_{n}|\leq 1\)) and so, in practice, one expects the same approximation rates when using \(X = X_{\mathrm{II}} = \{\text{extreme points of } T_n \}\).
7.4 Next time….
Barycentric formula for Chebyshev interpolation
Newton form & divided differences
TipTO-DO
Wednesday morning: Quiz 2
Exercises throughout the notes,
(Sign-up to office hours if you like)
7.5 Extra exercises
Exercise 7.4 Recall that \(T_{n+1}(x) = 2x T_n(x) - T_{n-1}(x)\) for \(n=1,2,...\).
Use the recursion to write down \(T_2\), \(T_3\) and \(T_4\) in the monomial basis.
Write down the Chebyshev nodes of the first kind \(X_{\mathrm I}\) for \(n = 2\) (i.e. the zeros of \(T_3\)) and check directly that \(\ell_{X_{\mathrm I}}(x) = t_3(x) = x^3 - \tfrac34 x\).
Find \(\| \ell_{X_{\mathrm I}} \|_{L^\infty([-1,1])}\) for \(n=2\) by calculus, and compare with the equispaced nodes \(\{-1, 0, 1\}\).
Exercise 7.5 In the notes, we claimed that \(\ell_{X_{\mathrm{II}}}(x) = 2^{-n} \big( T_{n+1}(x) - T_{n-1}(x) \big)\) for \(n \geq 1\). Since \(\|T_n\|_{L^\infty} = 1\), this gives \(\| \ell_{X_{\rm II}} \|_{L^\infty} \leq 2^{1-n}\).
Prove the claim as follows:
Show that \(T_{n+1}(\cos\theta) - T_{n-1}(\cos\theta) = -2 \sin\theta \sin n\theta\).
Deduce that \(T_{n+1} - T_{n-1}\) vanishes on \(X_{\mathrm{II}} = \big\{ \cos\frac{j\pi}{n} \big\}_{j=0}^n\).
Show that \(2^{-n} \big( T_{n+1} - T_{n-1} \big)\) is monic of degree \(n+1\), and conclude.
Exercise 7.6 Suppose we want to interpolate on a general interval \([a,b]\) rather than \([-1,1]\).
Let \(\phi(t) = \frac{a+b}{2} + \frac{b-a}{2} t\), so that \(\phi\) maps \([-1,1]\) onto \([a,b]\). If \(Y = \{y_0,\dots,y_n\} \subset [-1,1]\) and \(X = \phi(Y) = \{\phi(y_0), \dots, \phi(y_n)\}\), show that \[
\ell_X\big(\phi(t)\big) = \left( \frac{b-a}{2} \right)^{n+1} \ell_Y(t).
\]
Deduce that, if \(X\) is the image of \(X_{\mathrm I}\) under \(\phi\), then \(\max_{x \in [a,b]} |\ell_X(x)| = 2 \left( \frac{b-a}{4} \right)^{n+1}\).
Let \(f(x) = \sin x\) on \([0, \pi]\), interpolated at the image of \(X_{\mathrm I}\). Write down an error bound and find the smallest \(n\) that guarantees \(\max_{x\in[0,\pi]} |f(x) - I_Xf(x)| \leq 10^{-6}\).