We want to produce an evenly spaced table of values for the function f(x) sin(x) for...
2. Graph the functions f(x)x(x 1)(x-2) ..(x- k) for k- 1,2,..,10. (These are examples of the polynomials occurring in the error formula for polynomial interpolation.) We want to produce an evenly spaced table of values for the function f(x) sin(x) for x E [O,T/2] such that, with cubic interpolation, we can give the values of the function at any point in the interval with an error less than 5 10-12. That means finding a number n such that with h-/2n...
3. Determine (analytically) the spacing h in a table of evenly spaced values of the function f(x)vx between 1 and 2, so that interpolation with a) degree polynomial b) 2"d degree polynomial in this table will yield a desired accuracy of at least N places after zero. Choose your own N.
1. Consider the polynonial Pl (z) of degree 4 interpolating the function f(x) sin(x) on the interval n/4,4 at the equidistant points r--r/4, xi =-r/8, x2 = 0, 3 π/8, and x4 = π/4. Estimate the maximum of the interpolation absolute error for x E [-r/4, π/4 , ie, give an upper bound for this absolute error maxsin(x) P(x) s? Remark: you are not asked to give the interpolation polynomial P(r). 1. Consider the polynonial Pl (z) of degree 4...
6. We want to study the effect of different choices of interpolation points {X0,X1,..., 2n} on the function wn(x) = (x – xo)(x – 21)... (x – In) in the formula for the error in interpolation polynomials. In particular, we want to study evenly spaced points and Chebyshev points in the interval (-1, 1). Con- sider the following choices: 2i (a) x₂ = –1 + i = 0.....n n 7T (b) X; = - cos i = 0,...,n. n +1...
6. Consider f(x)-sinx and evenly spaced nodes 0-0 < xīく… < Zn-2T. Let P(z) be the piecewise cubic interpolant given values and first derivatives of f at the nodes. (a) In the case n = 100, use calculus and the error formula 4! where 1 E [xi,Ti+1], to bound the absolute error lf(1)-P(1) (b) For arbitrary x E [0.2 , use error bounds to determine n ensuring that If(x)- P(x) s 10-10 6. Consider f(x)-sinx and evenly spaced nodes 0-0
Q1 2016 a) We want to develop a method for calculating the function f(x) = sin(t)/t dt for small or moderately small values of x. this is a special function called the sine integral, and it is related to another special function called the exponential integral. it rises in diffraction problems. Derive a Taylor-series expression for f(x), and give an upper bound for the error when the series is terminated after the n-th order term. sint = see image b)we...
(Matlab) Suppose we have a function “hw5f.m” that takes as input x and outputs the value for a function f(x). Write a Matlab program that inputs: • interval [a, b]; • m, the number of data points with evenly spaced nodes from x1 = a to xm = b, and values from f(x); • location z satisfying x2 < z < xm−1, where h = (b − a)/(m − 1); and outputs the value of the interpolaton polynomial using only...
π/2 (6 3 cos x) dx 0 (a) Derive the formula for multi-segment (evenly spaced) left-hand rectangles and then use it to approximate the value of the integral with n=1; n-2; n-4 segments. Calculate the true error and relative true error for each (b) Derive the formula for multi-segment (evenly spaced) right-hand rectangles and then use it to approximate the value of the integral with n=1; n=2; n-4 segments. Calculate the true error and relative true error for each (c)...
Problem 5. Consider least squares polynomial approximation to f(x) = cos (nx) on x E [-1,1] using the inner product 1. In finding coefficients you will need to compute the integral By symmetry, an 0 for odd n, so we need only consider even n. (a) Make a change of variables and use appropriate identities to transform the integral for a to cos (Bcos 8)cos (ne) de (b) The Bessel function of even order, (x), can be defined by the...
1. (a) We need to calculate accurate values of the function for very large values of x. However, it is found that just programming this formula into a computer gives very poor accuracy for large x Explain why this happens, and show how to re-write the function so that it can be used reliably, even when x is large. [6 points] (b) In diffraction theory, it is sometimes necessary to evaluate the function sin θ f(x) for small to moderate...