Skip to content

Commit 8474e8d

Browse files
committed
Adds exercise for interp 2
1 parent e2515f3 commit 8474e8d

1 file changed

Lines changed: 27 additions & 1 deletion

File tree

poly_interp2.ipynb

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,36 @@
368368
" continuous_update = False) "
369369
]
370370
},
371+
{
372+
"cell_type": "markdown",
373+
"id": "b38ed7a0",
374+
"metadata": {},
375+
"source": [
376+
"```{admonition} Exercise\n",
377+
":class: danger\n",
378+
"\n",
379+
"This question is about estimating the error in interpolation with analytic formulae and by brute force.\n",
380+
"\n",
381+
"For a function $f$ analytic in $[-1, 1]$ and analytically continuable to the \"stadium\" $E_{\\rho}$, where it satisfies $f \\leq M$ for some $M$, [Trefethen's ATAP]() derives the following error bound on the Chebyshev interpolant (with $n+1$ nodes):\n",
382+
"$$ ||f - p_n|| \\leq \\frac{4M\\rho^{-n}}{\\rho - 1}. $$\n",
383+
"\n",
384+
"The stadium $E_{\\rho}$ is defined as follows: if we have a circle of radius $\\rho$ in the complex $z$-plane, then make the subsitution $x = (z + z^{-1})/2$, then we get the stadium $E_{\\rho}$ (known as a Bernstein ellipse) in the complex $x$-plane.\n",
385+
"\n",
386+
"- a) Show that we do indeed get an ellipse in the complex $x$-plane. What are its semi-major and semi-minor axes?\n",
387+
"- b) Take the function $f(x) = \\frac{1}{1 + (x/x_0)^2}$. What $\\rho$ parameter does the Bernstein ellipse going through its poles correspond to? \n",
388+
"- c) Plot the expected convergence rate (ommitting anything that doesn't depend on $n$) of barycentric interpolation with respect to $n$, and the actual convergence rate, for $x_0 = 2$. What type of convergence is this? Comment on the plot.\n",
389+
"\n",
390+
"_Hints_:\n",
391+
"* Use an $L_{\\infty}$ norm to measure the error (i.e. take the maximum over dense, equally spaced \"target\" points distributed on the interval).\n",
392+
"* Use a logarithmic $y$ and linear $x$ axis (and label them!).\n",
393+
"* Label the curves and add a legend.\n",
394+
"```"
395+
]
396+
},
371397
{
372398
"cell_type": "code",
373399
"execution_count": null,
374-
"id": "76e9cef1",
400+
"id": "4fce701e",
375401
"metadata": {},
376402
"outputs": [],
377403
"source": []

0 commit comments

Comments
 (0)