# Riemann Sum

How to find the area under a function by using the Riemann sum: 1 example and its solution.

## Definition

### Definition

Let's see how to find the area

under the graph of y = f(x).

First, slice the area to n pieces.

For each piece,

draw a rectangle

whose height is the function value: f(x).

Then, as n → ∞,

the sum of the pieces

becomes the area under the graph of y = f(x).

The sum of the pieces is called the Riemann sum.

## Example

### Example

### Solution

First, slice the area to n pieces.

and draw the rectangle pieces like this.

The width of the area is

1 - 0 = 1.

The area is sliced into n pieces.

So the width of each rectangle is

1/n.

The width of each piece is 1/n.

Then the x value of the right side of the kth piece is

k/n.

Draw the kth rectangle piece below.

The width is 1/n.

The height of the rectangle piece is

f(k/n) = (k/n)^{2} = k^{2}/n^{2}.

The width is 1/n.

The height is k^{2}/n^{2}.

Then the area, A_{k}, is

A_{k} = (k^{2}/n^{2})⋅(1/n).

There are n rectangle pieces.

So the sum of the n pieces, S_{n}, is

the sum of (k^{2}/n^{2})⋅(1/n) as k goes from 1 to n.

Sigma Notation

The variable of the summation is k, not n.

So take the denominators, n^{2} and n,

out from the summation.

The sum of k^{2} is

[n(n + 1)(2n + 1)]/6.

Sum of Squares: k^{2}

Then [n(n + 1)(2n + 1)]/6n^{3}.

Recall that

as n → ∞,

S_{n} becomes the area under y = x^{2}: S.

S_{n} = [n(n + 1)(2n + 1)]/6n^{3}

So S = the limit of [n(n + 1)(2n + 1)]/6n^{3}.

[n(n + 1)(2n + 1)]/6n^{3} = [2n^{3} + ...]/6n^{3}

The highest order term of the numerator is 2n^{3}.

The denominator is 6n^{3}.

Both terms are n^{3}.

So, as n → ∞,

the limit is 2/6.

Indeterminate Form

2/6 = 1/3

So the area of the colored region, S, is 1/3.

## Riemann Sum to Definite Integral

### Formula

Let's get back to the area under y = f(x).

See the kth rectangle piece

(that looks like a line).

The width is ∆x.

The height is f(x_{k}).

Then the area, A_{k}, is f(x_{k})∆x.

Then the Riemann sum, S, is

the limit of the sum of f(x_{k})∆x.

To change a Riemann sum to a definite integral,

Change the limit and the sigma

to ∫_{a}^{b}: the integral from a to b.

(a: lower limit, b: upper limit)

Change f(x_{k}) to f(x).

And change ∆x to dx.

So S = ∫_{a}^{b} f(x) dx.

So the definite integral means

the sum [∫_{a}^{b}] of the rectangle pieces [f(x) dx].

In the next page,

see how to solve a definite integral.