# Supercharge your learning!

Use adaptive quiz-based learning to study this topic faster and more effectively.

# Definitions

## Definition of the integral

The integral of a function $f$ over $[a,b]$ is the area under the graph of $f$ bounded by the lines $x=a$, $x=b$ and $y=0$. It is denoted by $$\int_a^b f(x)\,dx$$ $f$ is the integrand; $a$ is the lower limit, $b$ the upper limit. The integral is called definite when both $a$ and $b$ are finite.

Areas above the $x$-axis are positive, those below are negative.

For instance, if the function is constant, the integral is simply $$\displaystyle \int_a^b c\,dx =c(b-a).$$

A function is piecewise constant if it is constant on adjacent sub-intervals. The integral of a piecewise constant is the sum of the integral of each of the contributions where the function is constant.

Integral of a piecewise constant function

## Riemann sums

In general, we define the integral by $$\int_a^b f(x)\,dx = \lim_{n->\infty} \frac{(b-a)}{n}\sum_{i=0}^{n-1} f(x_i^n), \quad x_i^n = a+ \frac{i(b-a)}{n}.$$ The right hand expression sum is called the Riemann sum. It is the integral of a piecewise constant function that coincides with $f$ at each node $x_i^n$.

We can replace $x_i^n$ in the Riemann sum at any point in the interval $[x^n_i,x^n_{i+1}]$, i.e. the right-end, the left-end, the maximum point, the minimum point, etc.

The Riemann sum is effectively adding rectangles approximating the value of the function. As the width of the rectangles decreases, the result becomes closer to the real value of the integral.

Integration and Riemann sum