Download MA 427: Homework 1

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Factorization of polynomials over finite fields wikipedia , lookup

System of polynomial equations wikipedia , lookup

Multiplication algorithm wikipedia , lookup

Transcript
MA 427: Homework 1
1.
Consider the function f(x) = excos(x).
(a). Approximate f(x) by P2(x) where a = 0.0.
(b). Compute the exact and approximate error of f(0.5) – P2(0.5).
(c). Use P2(x) to approximate the integral of f(x) from x = 0 to x =1.
(d). Estimate the error made in part (c).
2.
Consider the backward finite difference approximation of the f’(x).
(a). Prove: if f(x) has bounded second order derivative, then the finite difference error is bounded by
a constant times the step size.
(b). Use the code fdapprox.m to illustrate this error for the function f(x) = e2x at x = 2. Explain the
numbers in the output table.
3.
Consider the chopped floating-point numbers with  = 3 (base), k = 3 (precision) and K = 2 (bound
on the exponent).
(a). If fl(x) = -0.121 3-2, write x as a base 10 number.
(b). List all possible floating-point numbers with  = 3, k = 3 and K = 2.
(c). Describe the overflow and underflow regions with  = 3, k = 3 and K = 2.
4.
Read example 6 on page 25 of BandF(edition 7 or 8) concerning the evaluations of the polynomial
x3 –6.1x2 + 3.2x +1.5.
(a). Use nested computation to exactly evaluate x2 –2x +7.417 = x(x-2) +7.417 at x = 4.71.
(b). Use nested computation and chopped three digits with base 10 to evaluate
x2 –2x +7.417 = x(x-2) +7.417 at x = 4.71. Find the relative error.
(c). Repeat part (b) using rounded three digits.
5.
Consider the threedigits.m code that uses variable precision arithmetic via vpa().
Modify the code to using 2, 3, 4 and 5 digits and compare the numerical results.