# Math Help - trapezoid rule approximation?

1. ## trapezoid rule approximation?

How to do trapezoid rule approximation of integral of sec xdx from -1 to 1 and n= 4? Also what is the error bound? Thanks.

2. Should be everything you need here:

Trapezoidal rule - Wikipedia, the free encyclopedia

3. Thanks, but that didnt help that much.

4. So what you do is decide how many trapezoids to divide your integral into (the more trapezoids, the more accurate your answer will be, but then the more work you have to do). At each of these points on the interval, calculate sec x. Then just feed those numbers into the "composite trapezoidal rule" equation.

5. Originally Posted by shah4u19
How to do trapezoid rule approximation of integral of sec xdx from -1 to 1 and n= 4? Also what is the error bound? Thanks.
$\int_{-1}^1 \sec{x} \, dx \approx \frac{1-(-1)}{2\cdot4} \left[\sec(-1) + 2\sec\left(-\frac{1}{2}\right) + 2\sec(0) + 2\sec\left(\frac{1}{2}\right) + \sec(1) \right]$

error bound ...

$|e| \le \frac{M(b-a)^3}{12n^2}$

where ...

$f''(c) \le M \, ; \, c \in [a,b]$

6. Thanks you all for your reply. Really helps.