Gibbs Phenomenon
Published:
Continuing with the series of posts on numerical analysis, in this post, I will discuss the Gibbs phenomenon. Last time I discussed the Runge phenomenon, which is a problem that occurs when interpolating a function using high-degree polynomials. The Gibbs phenomenon is a similar problem that occurs when approximating a function with discontinuities.
Gibbs Phenomenon
Gibbs phenomenon is a phenomenon that occurs in the context of Fourier series approximation. It refers to the oscillations that appear near the discontinuities of a function when it is approximated using a finite number of Fourier coefficients.
When a function with a jump discontinuity is approximated using a Fourier series, the approximation exhibits overshoot and undershoot near the jump. These oscillations do not disappear as the number of Fourier coefficients increases, but rather become more pronounced. This is known as the Gibbs phenomenon.
My Project
Similarly, in this project, I have implemented the Gibbs phenomenon using Python. I have approximated a sign function using Chebyshev polynomials and observed the Gibbs phenomenon. The sign function is defined as follows: \(\operatorname{sign}(x)=\left\{\begin{array}{ll} -1 & \text { if } x<0 \\ 1 & \text { if } x \geq 0 \end{array}\right.\)
For revision, Chebyshev polynomials are a sequence of orthogonal polynomials that are defined on the interval $[-1,1]$. They are used in numerical analysis for interpolation and approximation of functions. The Chebyshev nodes are defined as: \(x_{k}=\cos \left(\frac{2 k-1}{2 n} \pi\right), \quad k=1,2, \ldots, n\) while the Chebyshev polynomials are defined recursively as: \(T_{0}(x)=1, \quad T_{1}(x)=x, \quad T_{n+1}(x)=2 x T_{n}(x)-T_{n-1}(x)\)
To showcase the results of my project, I have created an interactive visualization using HTML. You can view the visualization below:
Comments