# Thread: The trapezium rule

1. ## The trapezium rule

Hi,

I am revising the trapezium rule and I can't continue because I am stuck on an exercise question.

I am asked to find the approximation for this value using the trapezium rule between x = 1 and x = 4

$\displaystyle \int (x-1)(x-4)dx$

When I work it out I keep getting a negative value. What would I do here.

Thanks.

2. The exact value is

$\displaystyle \int_{1}^{4}(x-1)(x-4)\,dx=-\frac{9}{2}.$

I would hope you get negative values! What's your h?

3. I am asked to use 6 strips.

So h = 0.5

I have been told that the answer cannot result in a negative value.

4. As Ackbeet just told you the answer is a negative number.

5. Originally Posted by Googl
I have been told that the answer cannot result in a negative value.
I think you were told wrong, then. The integrand is negative everywhere in the interval of integration, and zero at the endpoints. Aside from knowing the exact value of this fairly straight-forward integral, there are theorems that can prove, at least quite easily, that the integral is non-positive. With just a little more work, you can prove that the integral is negative using inequalities.

Here's a detailed calculation of the exact integral using the Fundamental Theorem of the Calculus:

$\displaystyle \int_{1}^{4}(x-1)(x-4)\,dx=\int_{1}^{4}(x^{2}-5x+4)\,dx=\left(\frac{x^{3}}{3}-\frac{5x^{2}}{2}+4x\right)\Bigg|_{1}^{4}$

$\displaystyle =\left(\frac{4^{3}}{3}-\frac{5(4)^{2}}{2}+4\cdot 4\right)-\left(\frac{1}{3}-\frac{5}{2}+4\right)=\frac{1}{6}\left[(2\cdot 64-3\cdot 80+6\cdot 16)-(2-5\cdot 3+4\cdot 6)\right]=\frac{1}{6}(-27)=-\frac{9}{2},$

as mentioned before.

Let's let

$\displaystyle f(x)=(x-1)(x-4),$

the integrand.

Using the trapezoidal rule, I believe you will have

$\displaystyle \int_{1}^{4}f(x)\,dx\approx\frac{h}{2}(f(1)+2f(1.5 )+2f(2)+2f(2.5)+2f(3)+2f(3.5)+f(4)).$

I get -4.375, which isn't too awful bad, compared with the true value of -4.5.