The trapezoidal method for numerically computing integral_a^b f(x) dx has an…

1997

The trapezoidal method for numerically computing integral_a^b f(x) dx has an error E bounded by ((b - a)/12) h^2 max |f''(x)|, x in [a, b], where h is the width of each trapezoid. The minimum number of trapezoids guaranteed to ensure E <= 10^-4 while computing ln 7 using f(x) = 1/x is

  1. A.

    60

  2. B.

    100

  3. C.

    600

  4. D.

    10,000

Show answer & explanation

Correct answer: C

To compute ln 7 using f(x) = 1/x, use ln 7 = integral_1^7 (1/x) dx. Thus a = 1 and b = 7, so b - a = 6.

For f(x) = 1/x,

f'(x) = -1/x^2,

f''(x) = 2/x^3.

On [1, 7], the maximum value of |f''(x)| is 2, attained at x = 1.

The given error bound is

E <= ((b - a)/12) h^2 max |f''(x)|

= (6/12) h^2 * 2

= h^2.

We need E <= 10^-4, so h^2 <= 10^-4 and h <= 10^-2 = 0.01.

If n trapezoids are used, h = (b - a)/n = 6/n. Therefore,

6/n <= 0.01, so n >= 600.

The minimum number of trapezoids guaranteed by the bound is 600.

Explore the full course: Gate Guidance By Sanchit Sir