Starting from:
$35

$29

COMPUTING ASSIGNMENT #5 Solution

Instruction

Upload a PDF file with two parts. Part one should include your typed report (your discussions, data and figures). Part two should list your code. You will receive a Crowdmark link for uploading your results.


Runge phenomenon

Runge phenomenon refers to the oscillation at the edges of an interval that occurs when using polynomial interpolation with polynomials of high degree over a set of equidistant interpola-tion points. In this assignment, you will investigate the phenomenon while implementing different forms for interpolation problems.


1. Set up and plot the Runge function f(x) =
1
on [  1; 1] in Matlab for a = 30. Report




2


1 + ax

your plot.










    2. For n + 1 interpolation points x0; x1; :::; xn, implement the following forms of the interpolat-ing polynomial.
a). Write a Matlab function that solves the interpolation problem by the Vandermonde ma-trix.



b). Write a Matlab function that computes barycentric form of the interpolating polyno-mial.



c). Write a Matlab function that computes the divided differences and the Newton form of the interpolating polynomial.



d). Set n 1000 or even larger, e.g. n = 10000. Find and click the button “Run and Time” in Matlab and compare the execution time of the three functions. Report the results and your observations.


1
MACM 316    COMPUTING ASSIGNMENT #5



3. Observe Runge phenomenon (we have observed a bit in class).

a). Set the interpolation points to be equidistant on [ 1; 1], and n = 10; 15; 25; 40. Plot the four polynomials (with respect to the four values of n) together with the Runge function. Ob-serve the oscillation at the ends of the interval [ 1; 1] and report your plots and observations.



b). Set the interpolation points to be Chebyshev on [ 1; 1], and n = 10; 15; 25; 40. Plot the four polynomials (with respect to the four values of n) together with the Runge function. Observe the results and report your plots and observations.


c). This question is exploratory. Can you find some other distributions of interpolation points (other than equidistant or Chebyshev), that give rise to a better interpolating polynomial than the equidistant points or the Chebyshev points? Try a different distribution of interpolation points, e.g. randomly distributed, and report your observations.










    4. Write a Matlab function to compute and plot the natural spline of the Runge function with n = 5; 10. Report your plot and observations.




























2

More products