Chebyshev Approximation Polynomial

Numerical Methods

Source inspiration: (Mathew 2000-2019).

Description

Chebyshev-node interpolation uses clustered nodes near interval endpoints to reduce oscillation compared with equally spaced interpolation at the same degree. This is why Chebyshev-based polynomial approximation is a standard remedy for Runge-type endpoint blow-up.

On an interval \([a,b]\), \(n\) Chebyshev nodes are the mapped roots

\[ x_k = \frac{a+b}{2} + \frac{b-a}{2}\cos\!\left(\frac{(2k-1)\pi}{2n}\right),\qquad k=1,\ldots,n. \]

Animations

Each animation increases polynomial degree one step at a time for a fixed function and approximation interval.

Julia source for all cases

Case 01

Case 01 caption: f(x)=1/(1-x), interval [-1.6, 0.9].

Case 02

Case 02 caption: f(x)=1/(1+x), interval [-0.9, 1.6].

Case 03

Case 03 caption: f(x)=1/(1-x)^2, interval [-1.6, 0.9].

Case 04

Case 04 caption: f(x)=sqrt(x), interval [0, 4] (expanded).

Case 05

Case 05 caption: f(x)=sqrt(x), interval [0, 8].

Case 06

Case 06 caption: f(x)=sqrt(x), interval [0, 10].

Case 07

Case 07 caption: f(x)=1/sqrt(1-x), interval [-1.6, 0.9].

Case 08

Case 08 caption: f(x)=1/(1+10x^2), interval [-1, 1], up to order 31.

Case 09

Case 09 caption: f(x)=log(x), interval [0.02, 2].

Case 10

Case 10 caption: f(x)=log(x), interval [0.02, 4].

Case 11

Case 11 caption: f(x)=log(1+x), interval [-0.98, 1].

Case 12

Case 12 caption: f(x)=sin(x), interval [-3pi, 3pi].

Case 13

Case 13 caption: f(x)=cos(x), interval [-3pi, 3pi].

Case 14

Case 14 caption: f(x)=tan(x), approximation interval [-1.45, 1.45] inside singularities.

Case 15

Case 15 caption: f(x)=exp(x), interval [-2, 3].

Case 16

Case 16 caption: f(x)=cos(x)*exp(-x), interval [-2, 4].

Case 17

Case 17 caption: f(x)=cosh(x), interval [-4, 4].

Case 18

Case 18 caption: f(x)=atan(x), interval [-2.2, 2.2].

Case 19

Case 19 caption: f(x)=asin(x), interval [-1.5, 1.5].

Case 20

Case 20 caption: f(x)=besselj(0,x), interval [-10.2, 10.2].

Case 21

Case 21 caption: f(x)=besselj(1,x), interval [-10.2, 10.2].

Case 22

Case 22 caption: f(x)=normal_pdf(x), interval [-3, 3].

Case 23

Case 23 caption: f(x)=normal_cdf(x), interval [-3, 3].

Case 24

Case 24 caption: f(x)=gamma(x), interval [0.05, 2].

Case 25

Case 25 caption: f(x)=gamma(x), interval [0.05, 4].

Case 26

Case 26 caption: f(x)=gamma(x), interval [0.5, 5].

Case 27

Case 27 caption: f(x)=bessely(0,x), interval [0.5, 20].

Case 28

Case 28 caption: f(x)=bessely(0,x), interval [0.5, 10].

Case 29

Case 29 caption: f(x)=bessely(0,x), interval [0.5, 6] (expanded).

References

Mathew, John H. 2000-2019. Numerical Analysis - Numerical Methods Modules. https://web.archive.org/web/20190808102217/http://mathfaculty.fullerton.edu/mathews/n2003/NumericalUndergradMod.html.