18.01 PROBLEM SET 6 – SOLUTIONS

2.

(a) [a, b] is divided into 4 equal parts by

x_{0} = a, x_{1} = a + \frac{1}{4}(b − a), x_{2} = a + \frac{1}{2}(b − a), x_{3}a + \frac{3}{4}(b − a), x_{4} = b.

The trapezoidal rule:

∫_{a}^{b} f(x)dx ≈ (\frac{1}{2}f(x_{0}) + f(x_{1}) + f(x_{2}) + f(x_{3}) + \frac{1}{2}f(x_{4})) · \frac{b − a}{4}.

Simpson’s rule:

∫_{a}^{b} f(x)dx ≈ \frac{1}{3} · (f(x_{0}) + 4 · f(x_{1}) + 2 · f(x_{2}) + 4 · f(x_{3}) + f(x_{4})) · \frac{b − a}{4}.

(b)

4 · ∫_{0}^{1} \frac{dx}{1 + x^{2}} = 4 · tan^{−1} x|_{0}^{1} = 4 · (\frac{π}{4} − 0) = π.

(c) By the trapezoidal rule (b − a = 1):

4 · ∫_{0}^{1} \frac{dx}{1 + x^{2}} ≈

≈ \frac{1}{2} · \frac{1}{1 + 0^{2}} + \frac{1}{1 + (\frac{1}{4})^{2}} + \frac{1}{1 + (\frac{1}{2})^{2}} + \frac{1}{1 + (\frac{3}{4})^{2}} + \frac{1}{2} · \frac{1}{1 + 1^{2}} =

= \frac{1}{2} + \frac{16}{17} + \frac{4}{5} + \frac{16}{25} + \frac{1}{4} = \frac{5323}{1700} = 3.131176...

By Simpson’s rule:

4 · ∫_{0}^{1} \frac{dx}{1 + x^{2}} ≈

≈ \frac{1}{3} · (\frac{1}{1 + 0^{2}} + 4 · \frac{1}{1 + (\frac{1}{4})^{2}} + 2 · \frac{1}{1 + (\frac{1}{2})^{2}} + 4 · \frac{1}{1 + (\frac{3}{4})^{2}} + \frac{1}{1 + 1^{2}} ) =

= \frac{1}{3} · (1 + 4 · \frac{16}{17} + 2 · \frac{4}{5} + 4 · \frac{16}{25} + \frac{1}{2}) = \frac{8011}{2550} = 3.141568...

The second one is more accurate since π = 3.141592.... (15 points)

Typeset by AMS-TEX