Author's Name: Huang Chenyu
Purpose of the experiment
What is Runge's Phenomenon?
The Runge's phenomenon was discovered in 1901 by Carl Runge. This phenomenon is characterised by oscillations at both ends of the interpolated interval when we interpolate functions with polynomials. This oscillation tells us that when interpolating to fit certain functions, even though the polynomial approximates the function well in the interval, the approximation to the function may be poor at the edges of the interval or even outside the interval.
What is the significance of the Runge's phenomenon for polynomial fitting?
What it means for polynomial interpolation and in over-fitting is that when we fit points generated by the true distribution, the resulting polynomial function is not as close to the true function as the higher the number of times. We need to do some preparatory work to understand the trend of the curve of the true function and then use the appropriate method to fit it. That is, do not readily use higher polynomials without being familiar with the trend of the curve movement.
Demonstrate Runge's Phenomenon using Runge's function :
The following code shows the generation of the Runge‘s phenomenon and the results, in which we mainly use Lagrange polynomials for interpolation, selecting the number of equidistant nodes as 10, 15, and 20.
The function is fitted according to three different node selections, and the fitting results are plotted against the original function in the following figure. The results are shown in the following figure.
Results & Problems
It is easy to see from Figure 1 that the Runge‘s phenomenon does not appear when the number of nodes is 10, but when we select the number of nodes to 15 and 20, there is a large oscillation at the edge of the selected range of functions, and the more nodes are selected, the greater the oscillation amplitude, which is the Runge's phenomenon.
What is a possible remedy to avoid spurious oscillations?
This oscillation is caused by the selection of nodes that are equidistant within the interval, so we can avoid the Runge's phenomenon by re-selecting the nodes using the Chebyshev function.
Demonstrate the effectiveness of this remedy though some example(s).
Here is an example. This example shows how we fit the original function using both Lagrangian interpolation with equidistant nodes and Lagrangian interpolation with Chebyshev nodes when we pick the number of nodes x = 15 and plot it as an image.
After re-selecting the nodes using the Chebyshev function, we compared the results of the refitting with the original function and the results of the fitting using equidistant nodes, which are shown in the figure above. The Runge's phenomenon largely disappears after the nodes are re-selected, proving that this method is effective in avoiding the oscillation phenomenon.