Reference no: EM133422730
Problem 1. Calculate (sin x)/x dx for a = 10-2 correct to double precision accuracy manually using an analytic expression for the integral. Show the steps of your calculations.
Problem 2.Compute an approximate value of sin(x) dx by the composite Trapezoidal rule using h=π/16.
- Compare with the true value of the integral by using the anti-derivate for sin(x)
- Determine a numeric upper bound for the error using the Trapezoid error formula by determining the max value in the interval [0,π/2] of the derivative that appears in the error formula. Compare this numeric error bound with the error determined in a).
- Using Romberg's method determine R(2,2) for the integral in a) and determine the error by comparing R(2,2) with the true value. Note, that R(2,0) is computed in a).
Problem 3.
a) Determine the number of integration intervals n necessary in computing an approximate value for
cos x dx by the Trapezoid rule with an error less than 10-7 using intervals of size π/n.
b) is the estimate of the integral over or underestimating the integral.
Problem 4. The ex/(√x) dx is well defined even though the integrand has a singularity at x=0.
a) Give an alternate formulation of the integrand that does not exhibit any singularity.
b) For the integral as given, which of the following integration rules can be used and which would be your choice? Justify your answer and choice: Trapezoid rule, Simpson's rule, a Newton-Cotes rule, Gaussian quadrature.
Problem 5. In computing the Romberg integration triangle to generate R(n,n) how many function evaluations are required?
Problem 6. For Romberg integration we have ∫f(x)dx = R(n,m)+a2mmh2m+a2m+2mh2m+2+....., where the coefficients ak=ck(f(k-1)(b)-f(k-1)(a)).
Show that ∫f(x)dx = R(n,m) for all polynomials of degree≤2m-2.
Problem 7. What is the highest degree polynomial for which the Gauss quadrature formula (5/9)f(-sqrt(3/5))+(8/9)f(0)+(5/9)f(sqrt(3/5)) approximates f(x)dx without error? Prove your answer by integrating monomials and applying the quadrature formula to them.
MATLAB problem.
Problem 8. Consider the integral sinx/√xdx. Write MATLAB programs to carry out integration by the following methods:
a) Recursive Trapezoidal rule. Determine the number of integration intervals n such that the error estimate guarantees single precision approximation accuracy. A change of variable is required since the integrand is singular at x=0.
b) Simpson's rule. Determine the number of integration intervals n such that the error estimate guarantees single precision approximation accuracy. A change of variable is required since the integrand is singular at x=0.
c) The 3-point Newton-Cotes open rule f(x)dx = (4/3)(2f1-f2+2f3)+(28/90)h5f(4)(ξ). Determine the number of integration intervals n such that the error estimate guarantees single precision approximation accuracy.
d) Use Gauss quadrature with 3 nodes for each interval in a composite integration rule. Table of nodes and weights on page 245 of book. Let the number of integration intervals be the following nSimpson/8, nSimpson/4, nSimpson/2, nSimpsonwhere nSimpson is the number of intervals determined in b).