Approximate $$$\int\limits_{0}^{1} \left(- 2 x^{2} + x\right)\, dx$$$ with $$$n = 3$$$ using the trapezoidal rule
Related calculator: Trapezoidal Rule Calculator for a Table
Your Input
Approximate the integral $$$\int\limits_{0}^{1} \left(- 2 x^{2} + x\right)\, dx$$$ with $$$n = 3$$$ using the trapezoidal rule.
Solution
The trapezoidal rule uses trapezoids to approximate the area:
$$$\int\limits_{a}^{b} f{\left(x \right)}\, dx\approx \frac{\Delta x}{2} \left(f{\left(x_{0} \right)} + 2 f{\left(x_{1} \right)} + 2 f{\left(x_{2} \right)} + 2 f{\left(x_{3} \right)}+\dots+2 f{\left(x_{n-2} \right)} + 2 f{\left(x_{n-1} \right)} + f{\left(x_{n} \right)}\right)$$$
where $$$\Delta x = \frac{b - a}{n}$$$.
We have that $$$f{\left(x \right)} = - 2 x^{2} + x$$$, $$$a = 0$$$, $$$b = 1$$$, and $$$n = 3$$$.
Therefore, $$$\Delta x = \frac{1 - 0}{3} = \frac{1}{3}$$$.
Divide the interval $$$\left[0, 1\right]$$$ into $$$n = 3$$$ subintervals of the length $$$\Delta x = \frac{1}{3}$$$ with the following endpoints: $$$a = 0$$$, $$$\frac{1}{3}$$$, $$$\frac{2}{3}$$$, $$$1 = b$$$.
Now, just evaluate the function at these endpoints.
$$$f{\left(x_{0} \right)} = f{\left(0 \right)} = 0$$$
$$$2 f{\left(x_{1} \right)} = 2 f{\left(\frac{1}{3} \right)} = \frac{2}{9}\approx 0.222222222222222$$$
$$$2 f{\left(x_{2} \right)} = 2 f{\left(\frac{2}{3} \right)} = - \frac{4}{9}\approx -0.444444444444444$$$
$$$f{\left(x_{3} \right)} = f{\left(1 \right)} = -1$$$
Finally, just sum up the above values and multiply by $$$\frac{\Delta x}{2} = \frac{1}{6}$$$: $$$\frac{1}{6} \left(0 + 0.222222222222222 - 0.444444444444444 - 1\right) = -0.203703703703704.$$$
Answer
$$$\int\limits_{0}^{1} \left(- 2 x^{2} + x\right)\, dx\approx -0.203703703703704$$$A