[SOLVED] Numerical Analysis-Homework 5

20.99 $

Category:

Description

Rate this product
  1. Scaled integral of B-splines.

Deduce from the Theorem on derivatives of B-splines that the scaled integral of a B-spline Bin(x) over its support is independent of its index i even if the spacing of the knots is not uniform.

  1. Symmetric Polynomials.

We have a theorem on expressing complete symmetric polynomials as divided difference of monomials.

  • Verify this theorem for m = 4 and n = 2 by working out the table of divided difference and comparing the result to the definition of complete symmetric polynomials.
  • Prove this theorem by the lemma on the recursive relation on complete symmetric polynomials.

.

1         C++ programming

  • Let f : R → R be a given function. Implement two modules to interpolate f by the quadratic and cubic cardinal B-splines, which corresponds to the two corollaries in the notes on unique interpolation by quadratic B-splines and complete cubic cardinal Bsplines, respectively.
  • Run your subroutines on the function

,

using 10 for quadratic B-splines and ti = −6+i, i = 1,…,11 for complete cubic cardinal B-splines. Plot the polynomials against the exact function.

  • Define ES(x) = |S(x) − f(x)| as the interpolation error. For the two cardinal B-spline interpolants, what are the values of ES(x) at the sites x = −3.5,−3,−0.5,0,0.5,3,3.5? Program in C++ to output these values. Why are some of the errors close to machine precision? Which of the two B-splines is more accurate?
  • The roots of the following equation constitute a closed planar curve in the shape of a heart:

.                     (1)

Modify your C++ subroutines in the previous homework to plot the heart. As discussed in the lectures, the parameter of the curve should be the cumulative chordal length defined from n given points (x1,y1), (x2,y2), . (xn,yn) as

.

Choose n = 10,40,160 and produce three plots of the heart function. (Hints: Your knots should include the characteristic points and you should think about (i) how many pieces of splines to use? (ii) what boundary conditions are appropriate? ) You can choose the knots by C++ or by yourselves. No matter what method you use, make sure that the final result shown in your homework can be reproduced by running one simple command “produceHeartCurve” or something like that.