# A-level Mathematics/OCR/FP2/Complex Integration

## Midpoint Rule

The Midpoint Rule is more accurate than the Trapezium Rule. It works by finding the mid-points of rectangles drawn to the curve. The Midpoint Rule is:

${\displaystyle \int _{a}^{b}f\left(x\right)\,dx\approx =h\left[f\left(x_{1}\right)+f\left(x_{2}\right)+\ldots +f\left(x_{n}\right)\right]}$

Where: ${\displaystyle h={\frac {b-a}{n}}}$ n is the number of strips.

and ${\displaystyle x_{i}={\frac {1}{2}}\left[\left(a+\left\{i-1\right\}h\right)+\left(a+ih\right)\right]}$

### Example

Use the Midpoint Rule to evaluate ${\displaystyle \int _{1}^{5}x^{2}+2x\ dx}$ using 4 strips.

Firstly, we work out h.

${\displaystyle h={\frac {5-1}{4}}={\frac {1}{1}}=1}$

Now we begin to set up the Midpoint Rule.

${\displaystyle \int _{1}^{5}x^{2}+2x\ dx\approx 1\left[f\left(x_{1}\right)+f\left(x_{2}\right)+f\left(x_{3}\right)+f\left(x_{4}\right)\right]}$

${\displaystyle x_{1}={\frac {1}{2}}\left[\left(1+\left\{1-1\right\}1\right)+\left(1+1\times 1\right)\right]={\frac {1}{2}}\left[\left(1\right)+\left(2\right)\right]=1.5}$

${\displaystyle x_{2}={\frac {1}{2}}\left[\left(1+\left\{2-1\right\}1\right)+\left(1+2\times 1\right)\right]={\frac {1}{2}}\left[\left(2\right)+\left(3\right)\right]=2.5}$

${\displaystyle x_{3}={\frac {1}{2}}\left[\left(1+\left\{3-1\right\}1\right)+\left(1+3\times 1\right)\right]={\frac {1}{2}}\left[\left(3\right)+\left(4\right)\right]=3.5}$

${\displaystyle x_{4}={\frac {1}{2}}\left[\left(1+\left\{4-1\right\}1\right)+\left(1+4\times 1\right)\right]={\frac {1}{2}}\left[\left(4\right)+\left(5\right)\right]=4.5}$

${\displaystyle \int _{1}^{5}x^{2}+2x\ dx\approx 1\left[f\left(1.5\right)+f\left(2.5\right)+f\left(3.5\right)+f\left(4.5\right)\right]}$

Now we need to solve f(n)

${\displaystyle \int _{1}^{5}x^{2}+2x\ dx\approx 1\left[5.25+11.3+19.3+29.3\right]}$

${\displaystyle \int _{1}^{5}x^{2}+2x\ dx\approx 65}$

As you can see the resultant from the midpoint rule is closer to the true value ${\displaystyle 65{\frac {1}{3}}}$ than the trapezium rule, but worse than Simpson's Rule.