Plz explain

The Gateway to Computer Science Excellence

0 votes

The trapezoidal method to numerically obtain $\int_a^b f(x) dx$ has an error E bounded by $\frac{b-a}{12} h^2 \max f’’(x), x \in [a, b]$ where $h$ is the width of the trapezoids. The minimum number of trapezoids guaranteed to ensure $E \leq 10^{-4}$ in computing $\ln 7$ using $f=\frac{1}{x}$ is

- 60
- 100
- 600
- 10000

0 votes

Interval [a b] = [1 7]

f(x) = 1/x

Max f"(x) in [a b] is 2 only .. // f"(x) = 2/x^3

Error = (b -a)*h*h*max f"(x)/12. // given

= (7-1)*h*h*2/12

= h*h

Error <= 10^(-4) // given

h*h <= 10^(-4)

h <= 10^(-2)

(b - a)/n = h // n is no of trapezoid

(7-1)/n >=10^(-4)

n <= 600

MinimumMinimum value of n is 600..

f(x) = 1/x

Max f"(x) in [a b] is 2 only .. // f"(x) = 2/x^3

Error = (b -a)*h*h*max f"(x)/12. // given

= (7-1)*h*h*2/12

= h*h

Error <= 10^(-4) // given

h*h <= 10^(-4)

h <= 10^(-2)

(b - a)/n = h // n is no of trapezoid

(7-1)/n >=10^(-4)

n <= 600

MinimumMinimum value of n is 600..

52,345 questions

60,487 answers

201,826 comments

95,294 users