Trapezoidal Approximation Error

Join the discussion
Registration is free. Start your own thread to ask a follow-up.
1 reply · 2K views · last reply
theBEAST
Messages
361
Reaction score
0

Homework Statement


Text problem: approximate the integral of f(x) dx from 0 to 2 using the Trapezoid Rule, where K2 = max over x in [0,2] of |f''(x)| < a, with a = 3. Asks for the smallest number of subintervals N to guarantee accuracy to 2 decimal places.


The Attempt at a Solution


Handwritten derivation on lined paper of a trapezoidal error bound: |E_T| ≤ K(b-a)^3/(12n^2) ≤ 0.005, then 0.005 ≥ 3(2)^3/(12n^2), n^2 ≥ 3·2^3/(12(0.005)), n ≥ 20, n > 20.

Thus my answer is N = 20.

I wasn't sure if I should use ≤ or just <. Also to get 2 decimal place accuracy would using 0.005 be correct?
 
Physics news on Phys.org
theBEAST said:

Homework Statement


Text problem: approximate the integral from 0 to 2 of f(x) dx using the Trapezoid Rule, with K2 = max over x in [0,2] of |f''(x)| < a, where a = 3. Asks for the smallest number of subintervals N to guarantee accuracy to 2 decimal places.


The Attempt at a Solution


Handwritten work for problem 12 bounding trapezoidal rule error: |E_T| ≤ K(b−a)^3/(12n^2) ≤ 0.005, then 0.005 ≥ 3(2)^3/(12n^2), n^2 ≥ 3·2^3/(12(0.005)), n ≥ 20.

Thus my answer is N = 20.

I wasn't sure if I should use ≤ or just <. Also to get 2 decimal place accuracy would using 0.005 be correct?

Your work looks fine to me, but I think I would use < instead of ≤. If your error < .005, you'll be guaranteed 2 decimal place accuracy.