Approximate $$$\int\limits_{1}^{3} \frac{\sin{\left(x \right)}}{x}\, dx$$$ with $$$n = 2$$$ using the midpoint rule

The calculator will approximate the integral of $$$\frac{\sin{\left(x \right)}}{x}$$$ from $$$1$$$ to $$$3$$$ with $$$n = 2$$$ subintervals using the midpoint rule, with steps shown.

Related calculator: Midpoint Rule Calculator for a Table

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please write it in the comments below.

Your Input

Approximate the integral $$$\int\limits_{1}^{3} \frac{\sin{\left(x \right)}}{x}\, dx$$$ with $$$n = 2$$$ 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)} = \frac{\sin{\left(x \right)}}{x}$$$, $$$a = 1$$$, $$$b = 3$$$, and $$$n = 2$$$.

Therefore, $$$\Delta x = \frac{3 - 1}{2} = 1$$$.

Divide the interval $$$\left[1, 3\right]$$$ into $$$n = 2$$$ subintervals of the length $$$\Delta x = 1$$$ with the following endpoints: $$$a = 1$$$, $$$2$$$, $$$3 = b$$$.

Now, just evaluate the function at the midpoints of the subintervals.

$$$f{\left(\frac{x_{0} + x_{1}}{2} \right)} = f{\left(\frac{1 + 2}{2} \right)} = f{\left(\frac{3}{2} \right)} = \frac{2 \sin{\left(\frac{3}{2} \right)}}{3}\approx 0.664996657736036$$$

$$$f{\left(\frac{x_{1} + x_{2}}{2} \right)} = f{\left(\frac{2 + 3}{2} \right)} = f{\left(\frac{5}{2} \right)} = \frac{2 \sin{\left(\frac{5}{2} \right)}}{5}\approx 0.239388857641583$$$

Finally, just sum up the above values and multiply by $$$\Delta x = 1$$$: $$$1 \left(0.664996657736036 + 0.239388857641583\right) = 0.904385515377619.$$$

Answer

$$$\int\limits_{1}^{3} \frac{\sin{\left(x \right)}}{x}\, dx\approx 0.904385515377619$$$A