-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathchap8.m
More file actions
executable file
·468 lines (421 loc) · 20.5 KB
/
chap8.m
File metadata and controls
executable file
·468 lines (421 loc) · 20.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
%% 8. Convergence for analytic functions
ATAPformats
%%
% <latex>
% Suppose $f$ is not just $k$ times differentiable but infinitely
% differentiable and in fact analytic on $[-1,1]$. (Recall that this means
% that for any $s\in [-1,1]$, $f$ has a Taylor series about $s$ that
% converges to $f$ in a neighborhood of $s$.) Then without any further
% assumptions we may conclude that the Chebyshev projections and
% interpolants converge {\bf geometrically}, that is, at the rate
% $O(C^{-n})$ for some constant $C>1$. This means the errors will look
% like straight lines (or better) on a semilog scale rather than a loglog
% scale. This kind of connection was first announced by Bernstein in 1911,
% who showed that the best approximations to a function $f$ on $[-1,1]$
% converge geometrically as $n\to\infty$ if and only if $f$ is analytic
% [Bernstein 1911 \& 1912{\sc b}].
% </latex>
%%
% For example, for Chebyshev interpolants of the function $(1+25x^2)^{-1}$,
% known as the _Runge function_ (Chapter 13), we get steady geometric
% convergence down to the level of rounding errors:
%%
% <latex> \vskip -2em </latex>
x = chebfun('x'); f = 1./(1+25*x.^2); nn = 0:10:200; ee = 0*nn;
for j = 1:length(nn)
n = nn(j); fn = chebfun(f,n+1); ee(j) = norm(f-fn,inf);
end
hold off, semilogy(nn,ee,'.'), grid on, axis([0 200 1e-17 10])
FS = 'fontsize';
title(['Geometric convergence of Chebyshev ' ...
' interpolants -- analytic function'],FS,9)
%%
% <latex> \vskip 1pt </latex>
%%
% If $f$ is analytic not just on $[-1,1]$ but in the whole complex
% plane---such a function is said to be _entire_---then the convergence is
% even faster than geometric. Here, for the function $\cos(20x)$, the dots
% are not approaching a fixed straight line but a curve that gets steeper
% as $n$ increases, until rounding errors cut off the progress.
%%
% <latex> \vskip -2em </latex>
f = cos(20*x); nn = 0:2:60; ee = 0*nn;
for j = 1:length(nn)
n = nn(j); fn = chebfun(f,n+1); ee(j) = norm(f-fn,inf);
end
semilogy(nn,ee,'.'), grid on, axis([0 60 1e-16 100])
title('Convergence of Chebyshev interpolants -- entire function',FS,9)
%%
% <latex> \vskip 1pt </latex>
%%
% <latex>
% There are elegant theorems that explain these effects. If $f$ is analytic
% on $[-1,1]$, then it can be analytically continued to a neighborhood of
% $[-1,1]$ in the complex plane. (The idea of analytic continuation is
% explained in complex variables textbooks; see also Chapter 28.) The
% bigger the neighborhood, the faster the convergence. In particular, for
% polynomial approximations, the neighborhoods that matter are the regions
% in the complex plane bounded by ellipses with foci at $-1$ and $1$,
% known as {\em Bernstein ellipses}
% [Bernstein 1912{\sc b}, 1912{\sc c} \&
% 1914{\sc a}]. It is easy to plot these curves: pick a number $\rho>1$
% and plot the image in the complex $x$-plane of the circle of radius
% $\rho$ in the $z$-plane under the Joukowsky map $x = (z+z^{-1})/2$. We
% let $E_\rho$ denote the open region bounded by this ellipse. Here, for
% example, are the Bernstein ellipses corresponding to the parameters $\rho
% = 1.1,1.2,\dots,2$:
% </latex>
%%
% <latex> \vskip -2em </latex>
z = exp(2i*pi*x);
for rho = 1.1:0.1:2
e = (rho*z+(rho*z).^(-1))/2; plot(e), hold on
end
ylim([-.9 .9]), axis equal
title('Bernstein ellipses for \rho = 1.1, 1.2, ..., 2',FS,9)
%%
% <latex> \vskip 1pt </latex>
%%
% It is not hard to verify that the length of the semimajor axis of
% $E_\rho$ plus the length of the semiminor axis is equal to $\rho$
% (Exercise 8.1).
%%
% Here is the basic bound on Chebyshev coefficients of analytic functions
% from which many other things follow. It first appeared in Section 61 of
% [Bernstein 1912b].
%%
% <latex> \em
% {\bf Theorem 8.1. Chebyshev coefficients of analytic functions.} Let a
% function $f$ analytic in $[-1,1]$ be analytically continuable to the open
% Bernstein ellipse $E_\rho$, where it satisfies $|f(x)|\le M$ for some
% $M$. Then its Chebyshev coefficients satisfy $|a_0| \le M$ and
% $$ | a_k | \le 2M\rho^{-k},\quad k\ge 1. \eqno (8.1) $$
% \vspace{0em} </latex>
%%
% _Proof._ As in the proofs of Theorems 3.1, 4.1, and 7.1, we make use of
% the transplantation from $f(x)$ and $T_k(x)$ on $[-1,1]$ in the $x$-plane
% to $F(z)$ and $(z^k + z^{-k})/2$ on the unit circle in the $z$-plane,
% with $x = (z+z^{-1})/2$ and $F(z) = F(z^{-1}) = f(x)$. The ellipse
% $E_\rho$ in the $x$-plane corresponds under this formula in a 1-to-2
% fashion to the annulus $\rho^{-1} < |z| < \rho$ in the $z$-plane. By
% this we mean that for each $x$ in $E_\rho\backslash [-1,1]$ there are two
% corresponding values of $z$ which are inverses of one another, and both
% the circles $|z|=\rho$ and $|z|=\rho^{-1}$ map onto the ellipse itself.
% (We can no longer use the formula $x = \hbox{Re}\,z$, which is valid only
% for $|z|=1$.) The first thing to note is that if $f$ is analytic in the
% ellipse, then $F$ is analytic in the annulus since it is the composition
% of the two analytic functions $z \mapsto (z+z^{-1})/2$ and $x \mapsto
% f(x)$. Now we make use of the contour integral formula (3.12),
% $$ a_k = {1\over\pi i}\int_{|z|=1}z^{-1-k}F(z)\,dz, $$
% with $\pi i$ replaced by $2\pi i$ for $k=0$. Suppose for a moment that
% $F$ is analytic not just in the annulus but in its closure $\rho^{-1} \le
% |z| \le \rho$. Then we can expand the contour to $|z|=\rho$ without
% changing the value of the integral, giving
% $$ a_k= {1\over\pi i}\int_{|z|=\rho}z^{-1-k}F(z)\,dz, $$
% again with $\pi i$ replaced by $2\pi i$ for $k=0$. Since the
% circumference is $2\pi \rho$ and $|F(z)| \le M$, the required bound now
% follows from an elementary estimate. If $F$ is analytic only in the open
% annulus, we can move the contour to $|z|=s$ for any $s<\rho$, leading to
% the same bound for any $s<\rho$ and hence also for $s=\rho$.
% $~\hbox{\vrule width 2.5pt depth 2.5 pt height 3.5 pt}$
%%
% Here are two of the consequences of Theorem 8.1. Equation (8.2) first
% appeared in [Bernstein 1912b, Sec. 61]. I do not know where equation
% (8.3) may have appeared, though similar slightly weaker bounds can be
% found in (4.13) and (4.16) of [Tadmor 1986]. For a generalization of
% (8.3) to interpolation in other point sets with the same asymptotic
% distribution as Chebyshev points, see Theorem 12.1.
%%
% <latex> \em
% {\bf Theorem 8.2. Convergence for analytic functions.}
% If $f$ has the properties of Theorem $8.1$, then for
% each $n\ge 0$ its Chebyshev projections satisfy
% $$ \| f - f_n \| \le {2M\rho^{-n}\over \rho - 1} \eqno (8.2) $$
% and its Chebyshev interpolants satisfy
% $$ \| f - p_n \| \le {4M\rho^{-n}\over \rho - 1}. \eqno (8.3) $$
% \vspace{-1.5em} </latex>
%%
% _Proof._ Equation (8.2) follows from Theorem 8.1 and (4.8),
% and (8.3) follows from Theorem 8.1 and (4.9).
% $~\hbox{\vrule width 2.5pt depth 2.5 pt height 3.5 pt}$
%%
% We can apply Theorem 8.2 directly if $f$ is analytic and bounded in
% $E_\rho$. If it is analytic but unbounded in $E_\rho$, then it will be
% analytic and bounded in $E_s$ for any $s<\rho$, so we still get
% convergence at the rate $O(s^{-n})$ for any $s<\rho$. If it is unbounded
% in $E_\rho$ but the only singularities on the ellipse are simple poles,
% then we get convergence at the rate $O(\kern .5pt\rho^{-n})$ after all
% (Exercise 8.15).
%%
% <latex>
% Before applying Theorem 8.2 to a couple of examples, it will be
% convenient to note formulas for $\rho$ in two common special cases.
% Suppose $f$ has its first singularity at a real value $x_0 = \pm \alpha$
% for some $\alpha>1$. Then the corresponding ellipse parameter is
% $$ \rho = \alpha + \sqrt{\alpha^2-1} \quad \hbox{(real singularity at $x = \pm \alpha$).}
% \eqno (8.4) $$
% Or suppose that the first singularity is at the pure imaginary value
% $x_0 = \pm i\beta$ for some $\beta>0$. Then we have
% $$ \rho = \beta + \sqrt{\beta^2+1} \quad \hbox{(imaginary singularity at $x = \pm i\beta$).}
% \eqno (8.5) $$
% </latex>
%%
% For example, the Runge function $(1+25x^2)^{-1}$ considered above has
% poles at $\pm i/5$. By (8.5), the corresponding value of $\rho$ is
% $(1+\sqrt{26}\kern .7pt )/5 \approx 1.220$, and the errors in Chebyshev
% interpolation match this rate beautifully:
%%
% <latex> \vskip -2em </latex>
f = 1./(1+25*x.^2); nn = 0:10:200; ee = 0*nn;
for j = 1:length(nn)
n = nn(j); fn = chebfun(f,n+1); ee(j) = norm(f-fn,inf);
end
rho = (1+sqrt(26))/5;
hold off, semilogy(nn,rho.^(-nn),'-r')
hold on, semilogy(nn,ee,'.'), grid on, axis([0 200 1e-17 10])
title('Geometric convergence for the Runge function',FS,9)
%%
% <latex> \vskip 1pt </latex>
%%
% Here is a more extreme but entirely analogous example: $\tanh(50 \pi x)$,
% with poles at $\pm 0.01i$. These poles are so close to $[-1,1]$ that the
% convergence is much slower, but it is still robust. The only difference
% in this code segment is that |norm(f-fn,inf)|, a relatively slow Chebfun
% operation that depends on finding zeros of the derivative of |f-fn|, has
% been replaced by the default 2-norm |norm(f-fn)|, which is quick. This
% makes little difference to the figure, as the exponential decay rates are
% the same. (In the $\infty$-norm, the dots in the figure would appear
% just above the red line instead of just below it.)
%%
% <latex> \vskip -2em </latex>
f = tanh(50*pi*x); nn = 0:200:4000; ee = 0*nn;
for j = 1:length(nn)
n = nn(j); fn = chebfun(f,n+1); ee(j) = norm(f-fn);
end
rho = (1+sqrt(10001))/100;
hold off, semilogy(nn,rho.^(-nn),'-r')
hold on, semilogy(nn,ee,'.')
grid on, axis([0 4000 1e-16 10])
title(['Geometric convergence for a function ' ...
'analytic in a narrow region'],FS,9)
%%
% <latex> \vskip 1pt </latex>
%%
% For an example with a real singularity, the function $\sqrt{2-x}$ has a
% branch point at $x=2$, corresponding by (8.4) to $\rho = 2+\sqrt{3}$.
% Again we see a good match, with the curve gradually bending over to the
% expected slope as $n\to\infty$.
%%
% <latex> \vskip -2em </latex>
f = sqrt(2-x);
nn = 0:30; ee = 0*nn;
for j = 1:length(nn)
n = nn(j); fn = chebfun(f,n+1); ee(j) = norm(f-fn,inf);
end
rho = 2+sqrt(3);
hold off, semilogy(nn,rho.^(-nn),'-r')
hold on, semilogy(nn,ee,'.')
grid on, axis([0 30 1e-17 10])
title(['Geometric convergence for an analytic ' ...
'function with a branch point'],FS,9)
%%
% <latex> \vskip 1pt </latex>
%%
% We now derive an elegant converse of Theorem 8.2, also due to Bernstein
% [1912b, Section 9]. The converse is not quite exact: Theorem 8.2 assumes
% analyticity and boundedness in $E_\rho$, whereas the conclusion of
% Theorem 8.3 is analyticity but not necessarily boundedness (Exercise 8.15).
%%
% *Theorem 8.3. Converse of Theorem 8.2.* _Suppose $f$ is a function on
% $[-1,1]$ for which there exist polynomial approximations $\{q_n\}$
% satisfying_
% $$ \| f - q_n \| \le C\rho^{-n}, \quad n\ge 0 $$
% _for some constants $\rho>1$ and $C>0$. Then $f$ can be analytically
% continued to an analytic function in the open Bernstein ellipse_
% $E_{\rho}$.
%%
% _Proof._ The assumption implies that the polynomials $\{q_n\}$ satisfy
% $\|q_n-q_{n-1}\|\le 2\kern .7pt C\kern .4pt \rho^{1-n}$ on $[-1,1]$.
% Since $q_n-q_{n-1}\in {\cal P}_n$, it can be shown that this implies
% $\|q_n - q_{n-1}\|_{E_s} \le 2\, C s^n \rho^{1-n} $ for any $s>1$, where
% $\|\cdot\|_{E_s}$ is the supremum norm on the $s$-ellipse $E_s$. (This
% estimate is one of _Bernstein's inequalities,_ from Section 9 of
% [Bernstein 1912b]; see Exercise 8.6.) For $s<\rho$, this gives us a
% representation for $f$ in $E_s$ as a series of analytic functions, $$ f =
% q_0 + (q_1-q_0) + (q_2-q_1) + \cdots , $$ which is uniformly convergent
% according to the Weierstrass M-test. According to another well-known
% theorem of Weierstrass, this implies that the limit is a bounded analytic
% function [Ahlfors 1953, Markushevich 1985]. Since this is true for any
% $s<\rho$, the analyticity applies throughout $E_\rho$.
% $~\hbox{\vrule width 2.5pt depth 2.5 pt height 3.5 pt}$
%%
% Note that Theorem 8.2 and 8.3 together establish a simple fact, sometimes
% known as _Bernstein's theorem_: a function defined on $[-1,1]$ can be
% approximated by polynomials with geometric accuracy if and only if it is
% analytic. (See also Exercise 8.11 and [Bagby & Levenberg 1993].)
%%
% The term ``Bernstein ellipse'' refers to any ellipse in the complex plane
% with foci $\{-1,1\}$, and if $f$ is a function analytic on $[-1,1]$, the
% bounds of Theorems 8.1 and 8.2 apply for any Bernstein ellipse inside
% which $f$ is analytic and bounded. If there is a largest ellipse inside
% which $f$ is analytic, then one might choose to say that this was ``the''
% Bernstein ellipse for $f$, but this might not always be the ellipse that
% gives the most useful bound, and if $f$ is entire, then there is no
% largest ellipse at all (Exercise 8.3).
%%
% Chebfun computations, however, suggest a practical way to single out a
% special Bernstein ellipse associated with a given function $f$. The
% _Chebfun ellipse_ for $f$ is the Bernstein ellipse whose parameter $\rho$
% satisfies the condition
% $$ \rho^{-n} = \varepsilon, \eqno (8.6) $$
% where
% $\varepsilon$ is the tolerance used by the Chebfun constructor (normally
% $2^{-52}$) and $n$ is the degree of the polynomial chosen by Chebfun to
% resolve $f$. The command |chebellipseplot| plots these Chebfun
% ellipses. Thus for $f(x) = 1/(1+25x^2)$, for example, the Chebfun ellipse
% comes very close to passing through the poles at $\pm 0.2i$:
%%
% <latex> \vskip -2em </latex>
f = chebfun('1./(1+25*x.^2)');
clf, chebellipseplot(f,'linewidth',1)
hold on, plot([.2i -.2i],'xr','markersize',12)
axis equal, ylim(.5*[-1 1]), grid on
title('Chebfun ellipse for 1/(1+25x^2)',FS,9)
%%
% <latex> \vskip 1pt </latex>
%%
% For the entire function $f(x) = \exp(-200x^2)$, the Chebfun ellipse has
% much the same shape although now $f$ has no singularities:
%%
% <latex> \vskip -2em </latex>
f = chebfun('exp(-200*x.^2)');
hold off, chebellipseplot(f,'linewidth',1)
axis equal, ylim(.5*[-1 1]), grid on
title('Chebfun ellipse for exp(-200x^2)',FS,9)
%%
% <latex> \vskip 1pt </latex>
%%
% <latex>
% \begin{displaymath}
% \framebox[4.7in][c]{\parbox{4.5in}{\vspace{2pt}\sl
% {\sc Summary of Chapter 8.} If $f$ is analytic, its Chebyshev
% coefficients $\{a_k\}$ decrease geometrically. In particular, if $f$ is
% analytic with $|f(x)| \le M$ in the Bernstein $\rho$-ellipse about
% $[-1,1]$, then $|a_k|\le 2M\rho^{-k}$. It follows that the degree $n$
% Chebyshev projection and interpolant of $f$ have accuracy
% $O(M\rho^{-n})$.\vspace{2pt}}}
% \end{displaymath}
% </latex>
%%
% <latex> \smallskip\small\parskip=2pt
% {\bf Exercise 8.1. Bernstein ellipses.} Verify that for any $\rho >1$,
% the length of the
% semiminor axis plus the length of the semimajor axis of the Bernstein
% ellipse $E_\rho$ is equal to $\rho$.
% \par
% {\bf Exercise 8.2. A Chebyshev series.}
% With {\tt x = chebfun('x')}, execute the command
% {\tt chebpolyplot(sin(100*(x-.1))+.01*tanh(20*x))}. Explain the various
% features of the resulting plot as quantitatively as you can.
% \par
% {\bf Exercise 8.3. Interpolation of an entire function.} The
% function $f(x) = \exp(-x^2)$ is analytic throughout the complex $x$-plane,
% so Theorem 8.2 can be applied for any
% value of the parameter $\rho>1$.
% Produce a semilog plot of $\|f-p_n\|$ as a function of $n$
% together with lines corresponding to the upper bound of the theorem for
% $\rho = 1.1, 1.2, 1.4, 2, 3, 5, 8$. Be sure to use the
% right value of $M$ in each case. How well do your bounds fit the data?
% \par
% {\bf Exercise 8.4. Convergence rates for different functions.}
% Based on the theorems of this chapter, what can you say about
% the convergence as $n\to\infty$ of the Chebyshev interpolants to
% (a) $\tan(x)$,
% (b) $\tanh(x)$,
% (c) $\log((x+3)/4)/(x-1)$,
% (d) $\int_{-1}^x \cos(t^2)\kern 1pt dt$,
% (e) $\tan(\tan(x))$,
% (f) $(1+x) \log(1+x)\,$?
% In each case compare theoretical bounds with numerically computed
% results. Which is the case that converges much faster than the
% theorems predict? Can you speculate as to why?
% \par
% {\bf Exercise 8.5. Accuracy of approximations in the complex plane.} Let
% $p$ be the chebfun for $f(x) = \exp(-200x^2)$ and plot contour lines in
% the complex $x$-plane corresponding to $|f(x) - p(x)| = 10^{-2}, 10^{-4},
% \dots, 10^{-14}$. How do these curves compare to the Bernstein ellipses
% corresponding to parameters $\rho$ satisfying $\rho^{-n} = \varepsilon
% \times \{ 10^2, 10^4, \dots , 10^{14}\}$, where $\varepsilon$ is the
% Chebfun constructor tolerance $2^{-52}\kern 1pt$?
% \par
% {\bf Exercise 8.6. Proof of Bernstein inequality.} Prove Bernstein's
% inequality used in the proof of Theorem 8.3: if $p$ is a polynomial of
% degree $d$, then $\|\kern .7pt p\|_{E_\rho} \le \rho^d \kern 1pt \|\kern
% .7pt p\|$, where $\|\cdot \|_{E_\rho}$ is the $\infty$-norm over the
% $\rho$-ellipse and $\|\cdot\|$ is the $\infty$-norm over $[-1,1]$. (Hint:
% Show that if the branch cut is taken to be the unit interval $[-1,1]$,
% the function $q(z) = p(z)/(z+(z^2-1)^{1/2})^d$ is analytic throughout the
% region consisting of the complex plane plus the point $z=\infty$ minus
% $[-1,1]$. Apply the maximum modulus principle.)
% \par
% {\bf Exercise 8.7. Absolute value function.}
% The function $|x-i|$ is analytic for $x\in [-1,1]$.
% This means it can be analytically continued to an analytic
% function $f(x)$ in a neighborhood of $[-1,1]$ in the complex $x$-plane.
% The formula $|x-i|$ itself does not define an analytic function
% in any complex neighborhood. Find another formula for $f$ that does,
% and use it to explain what singularities $f$ has in the complex plane.
% \par
% {\bf Exercise 8.8. Chebyshev polynomials on the Bernstein ellipse.}
% Show that for any $\rho>1$ and any $z$ on the boundary of the
% ellipse $E_\rho$ in the complex $x$-plane,
% $\lim_{n\to\infty} |T_n(x)|^{1/n} = \rho$.
% \par
% {\bf Exercise 8.9. You can't judge smoothness by eye.}
% Define $f(x) = 2+\sin(50x)$ and $g(x) = f(x)^{1.0001}$ and
% construct chebfuns for these functions on $[-1,1]$. What are
% their lengths? Explain this effect quantitatively
% using the theorems of this chapter.
% \par
% {\bf Exercise 8.10. Convergence of conjugate gradient iteration.}
% Suppose we wish to approximate $f(x) = x^{-1}$ on the interval $[m,M]$
% with $0 < m<M $. Show that for any $\kappa < M/m$, there exist
% polynomials $p_n\in {\cal P}_n$ such that $\|f-p_n\| =
% O((1+2/\sqrt\kappa\kern 1pt )^{-n})$ as $n\to\infty$, where $\|\cdot\|$
% is the $\infty$-norm on $[m,M]$. This result is famous in numerical
% linear algebra as providing an upper bound for the convergence of the
% conjugate gradient iteration applied to a symmetric positive definite
% system of equations $Ax=b$ with condition number $\kappa$. See Theorem
% 38.5 of [Trefethen \& Bau 1997].
% \par
% {\bf Exercise 8.11. Bernstein's theorem.}
% Show that the conclusion of Theorem 8.3 also holds if the hypothesis
% is weakened to $\limsup_{n\to\infty}\|f-q_n\|^{1/n} \le \rho^{-1}$.
% \par
% {\bf Exercise 8.12. Resolution power of Chebyshev interpolants.}
% The function $f_M(x) = \exp(-M^2x^2/2)$ has a spike of width $O(1/M)$
% at $x=0$. Let $n(M)$ be the degree of a chebfun for $f_M$.
% (a) Determine the asymptotic behavior of $n(M)$ as $M\to\infty$ by
% numerical experiments.
% (b) Explain this result based on the theorems of this chapter.
% \par
% {\bf Exercise 8.13. Resolution power of Bernstein polynomials.}
% Continuing the last exercise, now let $n(M)$ be the degree of
% a Bernstein polynomial (6.1) needed to approximate $f_M$
% to machine precision. (For this discussion rescale (6.1) from
% $[0,1]$ to $[-1,1]$.)
% (a) Determine the asymptotic behavior of $n(M)$ as $M\to\infty$ by
% numerical experiments.
% (b) Explain this result, not necessarily rigorously.
% \par
% {\bf Exercise 8.14. Formulas for ellipse parameter.}
% Derive (8.4) and (8.5).
% \par
% {\bf Exercise 8.15. Simple poles on the Bernstein ellipse.}
% (a) Explain how equation (3.16)
% illustrates that Theorem 8.3 is not an exact converse of Theorem 8.2.
% (b) Let $f$ be analytic in the open Bernstein ellipse
% region $E_\rho$ for some $\rho>1$ with the only singularities
% on the ellipse itself being simple poles. Show that
% $\|f-f_n\|$ and $\|f-p_n\|$ are of size $O(\kern .5pt\rho^{-n})$ as $n\to\infty$.
% \par </latex>