If you can get a good grasp on this, then you can understand how an integral works.
You can learn how to use latex by clicking on 'reply with quote' at the lower right corner of this post and seeing the code. There are many sites online to learn as well.
\(\displaystyle \displaystyle \int_{-1}^{3}(-1-x^{2})dx\)
The subintervals have width \(\displaystyle \displaystyle \Delta x=\frac{b-a}{n}=\frac{3-(-1)}{n}=\frac{4}{n}\)
The right endpoint method is \(\displaystyle \displaystyle x_{k}=a+{\Delta}k=-1+\frac{4k}{n}\)
Thus, the rectangle k has area \(\displaystyle \displaystyle f(x_{k})\Delta x=\left[-1-\left(-1-\frac{4k}{n}\right)^{2}\right]\cdot \frac{4}{n}\). See how it looks like integral notation now?. \(\displaystyle \Delta x\) is dx and so on.
Now, do some algebra:
The sum of the rectangle areas is \(\displaystyle \displaystyle \sum_{k=1}^{n}f(x_{k})\Delta x=\sum_{k=1}^{n}\left(\frac{-64k^{2}}{n^{3}}+\frac{32k}{n^{2}}-\frac{8}{n}\right)\)
\(\displaystyle \displaystyle \frac{-64}{n^{3}}\sum_{k=1}^{n}k^{2}+\frac{32}{n^{2}}\sum_{k=1}^{n}-\frac{8}{n}\sum_{k=1}^{n}1\)
Now, here you have to know the sums of the integers and squares formulas:
\(\displaystyle \displaystyle \sum_{k=1}^{n}k^{2}=\frac{n(n+1)(2n+1)}{6}, \;\ \sum_{k=1}^{n}k=\frac{n(n+1)}{2}\)
and sub these in:
\(\displaystyle \displaystyle \frac{-64}{n^{3}}\cdot\frac{n(n+1)(2n+1)}{6}+\frac{32}{k^{2}}\cdot \frac{n(n+1)}{2}-\frac{8}{n}\cdot n\)
Now, some more algebra. This is mostly where mistakes occur.
\(\displaystyle \displaystyle \frac{-16}{n}-\frac{32}{3n^{2}}-\frac{40}{3}\)
Now, take the limit as \(\displaystyle n\to \infty\) and you can see the the area under the curve.
That is what an integral does. Sums up the area of an infinite number of rectangles. 'n' is the number of rectangles. As this n gets bigger and bigger or \(\displaystyle n\to \infty\), we get closer to the actual area under the curve.