# Find the riemann sum for f(x)=x+x^2?

Jul 14, 2018

${\int}_{a}^{b} f \left(x\right) \text{d} x = {\lim}_{n \to \infty} \frac{1}{n} ^ 2 {\sum}_{i = a n}^{b n} \left(i + {i}^{2} / n\right)$

#### Explanation:

A Riemann sum is a certain type of approximations for an integral. The easiest and simplest method to use is a rectangle sum; where we sum the area of $n$ rectangles with equal width to approximate the area under a curve; as $n$ approaches infinity, the sum approaches the true value of the net area.

Here's a Riemann sum with $4$ rectangles only:

This is just an example. Instead, consider $n$ rectangles.

Let $f$ be a function. Say, we wish to find the area under $f$ from $a$ to $b$. For the moment, let's only do the case $a = 0$ and $b = 1$. We will generalise later.

Now; imagine ${x}_{0} , {x}_{1} , {x}_{2} , \ldots {x}_{n}$ to be some "marks" on the x-axis such that the width of the i-th rectangle is ${x}_{i} - {x}_{i - 1}$ and ${x}_{0} = 0$.

Let ${\Delta}_{i} = {x}_{i} - {x}_{i - 1}$ be the width of the i-th rectangle. As we want ${\Delta}_{i}$ to be constant, we can more easily call it $\textcolor{red}{\Delta}$.

Another property about our x-axis marks is that the lenght/non-width side of the i-th rectangle is going to be $f \left({x}_{i}\right)$. Hence, the its area is going to be

$\text{Area"_i = "width" xx "lenght} = \Delta f \left({x}_{i}\right)$

Since we want the area until $b = 1$, we must have ${x}_{n} = 1$.

The areas of the rectangles approximate the areas under the graph of $f$. If there are $n$ rectangles, then:

${\int}_{0}^{1} f \left(x\right) \text{d} x \approx {\sum}_{i = 1}^{n} \left({x}_{i} - {x}_{i - 1}\right) f \left({x}_{i}\right) = {\sum}_{i = 1}^{n} \Delta f \left({x}_{i}\right)$

One way to make ${\Delta}_{i}$ constant is by defining ${x}_{i} = \frac{i}{n}$. Then,

${\Delta}_{i} = \frac{i}{n} - \frac{i - 1}{n} = \frac{1}{n}$, $\forall i \in \mathbb{N}$.

By this definition, ${x}_{0} = 0$ and ${x}_{n} = 1$, as desired.

${\int}_{0}^{1} f \left(x\right) \text{d} x \approx {\sum}_{i = 1}^{n} \frac{1}{n} f \left(\frac{i}{n}\right)$

The more rectangles we have, the better the sum approximates the integral. Thus, we can say that

${\int}_{0}^{1} f \left(x\right) \text{d} x = {\lim}_{n \to \infty} {\sum}_{i = 0}^{n} \frac{1}{n} f \left(\frac{i}{n}\right)$

Generalisation: Since we want the area from $a$ to $b$, the very first rectangle must have lenght $f \left(a\right)$ and the last one $f \left(b\right)$; to do this, we can change the lower and upper bounds of the sum operator:

$\textcolor{b l u e}{{\int}_{a}^{b} f \left(x\right) \text{d} x = {\lim}_{n \to \infty} {\sum}_{i = a n}^{b n} \frac{1}{n} f \left(\frac{i}{n}\right)}$

This is one of the many Riemann Sum formulae for a function $f$.

In our case, $f \left(x\right) = x + {x}^{2}$:

$\therefore {\int}_{a}^{b} f \left(x\right) \text{d} x \approx {\sum}_{i = a n}^{b n} \frac{1}{n} \left(\frac{i}{n} + {i}^{2} / {n}^{2}\right)$

$\therefore {\int}_{a}^{b} f \left(x\right) \text{d} x \approx \frac{1}{n} ^ 2 {\sum}_{i = a n}^{b n} \left(i + {i}^{2} / n\right)$

if there are $n$ rectangles, as stated already.