Anda di halaman 1dari 2

# MA2032 Assignment 3

28/9/2017

1. Use the most accurate three-point formula to determine each missing entry in the following
tables.

x f px q f 1 px q x f px q f 1 px q
-0.3 -0.27652 7.4 -68.3193
(a) -0.2 -0.25074 (b) 7.6 -71.6982
-0.1 -0.16134 7.8 -75.1576
0.0 0.0 8.0 -78.6974

2. The data in Exercise 5 were taken from the following functions. Compute the actual errors
in Exer- cise 5, and find error bounds using the error formulas.

## (a) e2x  cos 2x (b) lnpx 2q  p x 1q2

3. Use the values in the table below to approximate f 1 p0.900q, where f pxq  sin x. The true
value is cos 0.900  0.62161. Use h  0.001, 0.005, 0.01. The floating-point accuracy of given
data is 5 digits. Compare the errors for different h. What will be the optimal h? (Hint:
Remember the error estimate obtained in terms of h and ε- the maximum round-off error.)

x f px q x f pxq
0.890 0.77707 0.901 0.78395
0.895 0.78021 0.905 0.78643
0.899 0.78270 0.910 0.78950

»
4. Approximate the following integrals using the Trapezoidal rule.
0.25
(a) pcos xq2dx
»
0
0.25

## (b) x lnpx 1qdx

0.5
5. Find a bound for the error in the last problem using the error formula, and compare this to
the actual error.

6. Repeat problem 1 using Simpsons rule and find a bound for the error using the error formula,
and compare this to the actual error.

## 7. Let h  pb  aq{3, »x0  a, x1  a h, and x2  b. Find the degree of precision of the

b
quadrature formula f pxqdx  hf px1 q hf px2 q
9 3
a4 4
8. Approximate the following integrals using Gaussian quadrature with n  2, 3, 4, and compare
your results to the exact values of the integrals. The constants ci and the roots xi of the
Legendre polynomials are given in the table below.
» 1.5 » 1
(a) x ln x dx (b) x2 ex dx
1 0

n Roots xi Coefficients cj
2 0.5773502692 1.0000000000
-0.5773502692 1.0000000000
3 0.7745966692 0.5555555556
0.0000000000 0.8888888889
-0.7745966692 0.5555555556
4 0.8611363116 0.3478548451
0.3399810436 0.6521451549
-0.3399810436 0.6521451549
-0.8611363116 0.3478548451

## 9. Determine constants a, b, c, and d that will produce a quadrature formula

» 1
f pxqdx  af p1q bf p1q cf p1q df p1q
1
that has degree of precision 3.

10. Show that the formula QpP q  ci P pxi q can not have degree of precision greater than 2n  1,

i 0
regardless of the choice of c1 , ..., cn and x1 , ..., xn .