Starting from:

$30

E880-Problem Set 5 Solved

Reference: Chapter 6 and notes

1.      Do Exercise 6.1: f (x)= x   +1 , x0 = 1.

(a)      Compute degree 1 and 2 Taylor series approximation.

(b)     Compute Padé approximation (1,1).

2.     Consider the function f (x)=e4x−2 over [0,2] interval, and construct the following approximations to it:

•    Chebyshev polynomials of degree 4; choose 5 points to use as nodes.

•    Cubic spline over 5 equally spaced points in [0,2].

Then evaluate your approximations over 101 equally spaced points in [0,2] and plot them along with the true function. Comment on results – which method works better? Are higherorder Chebyshev coefficients indeed smaller? Do approximations match the slope and curvature of the original function?

"Construct the approximation" means coming up with the formula, determining the coefficients and writing a Matlab function that evaluates the approximation for an arbitrary x ∈ [0,2]. Determining the coefficients for all but Taylor requires using the standard estimation formulas or conditions, which use values of the function at nodes (and nowhere else), so it is worth writing a Matlab function for that as well. Finally, you might want to code function representing f (x), so you can easily re-use your code with a different function.

Pleasecodethepolynomialcomputationsyourself. YoucanuseMatlab’stoolstosolvesystems of equations, but you have to formulate the system yourself. If you cannot figure out splines, you can use Matlab’s spline() for a small penalty in points.

More products