I know from integration that the answer is -4. However, I am messing something up somewhere while working through the Riemann sums. Going cross-eyed trying to find my mistake. I included the pertinent steps and skipped the details. I do have those; just didn't type them in. Can anybody help me out?
$$\int_{-1}^{1}\left(3x^{2}-3\right)\mathrm{d}x$$ $$\lim_{n\to \infty}\sum_{i=1}^{n}\left(3\left(\frac{2i}{n}\right)^{2}-3\right)\left(\frac{2}{n}\right)$$ $$\left(\frac{24}{n^{3}}\right)\left(\frac{2n^{3}+3n^{2}+n}{6}\right)-6$$ $$8-6=2$$
When rewriting a definite integral as a Riemann sum, it is rewritten as so:
$$\int_a^b f(x)\, dx = \lim_{n\to \infty} \sum_{i=1}^n f(x_i)\Delta x$$
Where the following are given:
$$\Delta x = {b - a\over n}$$ $$x_i = a + i\Delta x $$
You've forgotten to add $a$ in $x_i = a + i\Delta x$. It should be:
$$\lim_{n\to \infty} \sum_{i=1}^n \left(3\left(-1 + {2i\over n}\right)^2 -3\right)\left(\frac 2n\right)$$
In actuality, the Riemann sum you had was the definite integral:
$$\int_0^2 \left(3x^2 - 3\right) dx = 2$$
Because you forgot to account for $a$ for $x_i$—thus it was $0$, the lower bound was treated as $0$.