Approximate $$$\int\limits_{0}^{2} e^{- 5 x^{2}}\, dx$$$ with $$$n = 4$$$ using the midpoint rule
Related calculator: Midpoint Rule Calculator for a Table
Your Input
Approximate the integral $$$\int\limits_{0}^{2} e^{- 5 x^{2}}\, dx$$$ with $$$n = 4$$$ using the midpoint rule.
Solution
The midpoint rule (also known as the midpoint approximation) uses the midpoint of a subinterval for computing the height of the approximating rectangle:
$$$\int\limits_{a}^{b} f{\left(x \right)}\, dx\approx \Delta x \left(f{\left(\frac{x_{0} + x_{1}}{2} \right)} + f{\left(\frac{x_{1} + x_{2}}{2} \right)} + f{\left(\frac{x_{2} + x_{3}}{2} \right)}+\dots+f{\left(\frac{x_{n-2} + x_{n-1}}{2} \right)} + f{\left(\frac{x_{n-1} + x_{n}}{2} \right)}\right)$$$
where $$$\Delta x = \frac{b - a}{n}$$$.
We have that $$$f{\left(x \right)} = e^{- 5 x^{2}}$$$, $$$a = 0$$$, $$$b = 2$$$, and $$$n = 4$$$.
Therefore, $$$\Delta x = \frac{2 - 0}{4} = \frac{1}{2}$$$.
Divide the interval $$$\left[0, 2\right]$$$ into $$$n = 4$$$ subintervals of the length $$$\Delta x = \frac{1}{2}$$$ with the following endpoints: $$$a = 0$$$, $$$\frac{1}{2}$$$, $$$1$$$, $$$\frac{3}{2}$$$, $$$2 = b$$$.
Now, just evaluate the function at the midpoints of the subintervals.
$$$f{\left(\frac{x_{0} + x_{1}}{2} \right)} = f{\left(\frac{0 + \frac{1}{2}}{2} \right)} = f{\left(\frac{1}{4} \right)} = e^{- \frac{5}{16}}\approx 0.731615628946642$$$
$$$f{\left(\frac{x_{1} + x_{2}}{2} \right)} = f{\left(\frac{\frac{1}{2} + 1}{2} \right)} = f{\left(\frac{3}{4} \right)} = e^{- \frac{45}{16}}\approx 0.060054667895308$$$
$$$f{\left(\frac{x_{2} + x_{3}}{2} \right)} = f{\left(\frac{1 + \frac{3}{2}}{2} \right)} = f{\left(\frac{5}{4} \right)} = e^{- \frac{125}{16}}\approx 0.000404645169326$$$
$$$f{\left(\frac{x_{3} + x_{4}}{2} \right)} = f{\left(\frac{\frac{3}{2} + 2}{2} \right)} = f{\left(\frac{7}{4} \right)} = e^{- \frac{245}{16}}\approx 2.23802919 \cdot 10^{-7}$$$
Finally, just sum up the above values and multiply by $$$\Delta x = \frac{1}{2}$$$: $$$\frac{1}{2} \left(0.731615628946642 + 0.060054667895308 + 0.000404645169326 + 2.23802919 \cdot 10^{-7}\right) = 0.396037582907098.$$$
Answer
$$$\int\limits_{0}^{2} e^{- 5 x^{2}}\, dx\approx 0.396037582907098$$$A