2. Definite integral

Riemann’s integral

Assume, that we are given a function f, and we would like to calculate (intuitively and somehow imprecisely speaking) the area under the graph of f, meaning the measure of the area between the x axis and the graph in a given interval [a,b], but taking the areas under the axis (if there are some) in the negative. How to calculate it?

We can divide the area into some rectangular bars and calculate the sum of areas of those bars, and (if our function is not very weird), the more precise our partition will be the more accurately we will get the area. In other words we speak about a limit, called the Riemann’s integral.

Assume we are given a sequence of partitions of [a,b] into subintervals, namely in the n-th step let a=x_{n,0}<x_{n,1}<\ldots <x_{n,n}=b be such that the distance between two consequent points is near to zero, precisely such that \lim_{n\to\infty}\max_{1\leq k\leq n} |x_{k,n}-x_{k-1,n}|=0, and let \eta_{k,n}\in [x_{k,n}, x_{k+1,n}], then the Riemann’s integral is the following limit:

    \[\int_a^b f(x)\,dx=\lim_{n\to\infty}\sum_{k=0}^{n-1}f(\eta_{k,n})(x_{k+1,n}-x_{k,n}),\]

which is the limit of the sum of areas of those bars, if this limit exists and does not depend on the choice of the partitions and points \eta_{k,n}.

This integral exists, if f is a nice function, e.g. it exists if f is continuous or if f is monotone. In such a case we can take any partition into bars (if its maximal width decreases in the limit to zero).

E.g.: let us calculate \int_0^1 x^2\,dx — take partition k/n, k\in\{0,\ldots,n\}. And \eta_{k,n}=k/n. We get:

    \[\int_0^1 x^2\,dx=\lim_{n\to\infty}\sum_{k=0}^{n-1}\frac{1}{n}\cdot \frac{k^2}{n^2}=\]


Definite and indefinite integrals

Actually, the primitive function and the Riemann’s integral are very similar ideas, namely if F, is a primitive function of f, then:

    \[\int_a^b f(x)\,dx=F(b)-F(a).\]

Often F(b)-F(a) we denote by F(x)|_a^b.

So, e.g.:

    \[\int_\frac{\pi}{2}^{2\pi}\cos x\,dx=\sin x|_{\frac{\pi}{2}}^{2\pi}=0-1=-1.\]

Integration by parts

Integration by parts works in the same way as in the indefinite case:

    \[\int_{a}^{b}f'(x)g(x)=f(x)g(x)|_a^b-\int_a^b f(x)g'(x)\,dx.\]


    \[\int_{0}^\pi x\sin x\, dx= -x\cos x|_0^\pi+\int_0^\pi\cos x\,dx=-(-\pi-0)+\sin|_0^\pi=\pi+0=\pi.\]

Integration by substitution

Integration by substitution can also be used but one needs to remember to change the limits of the integral respectively.

E.g. we would like to calculate \int_{\sqrt{\pi/2}}^{\sqrt{\pi}}2x\sin x^2\,dx, and we will use substitution t=x^2. We get \frac{dt}{dx}=2x and t(\sqrt{\pi/2})=\pi/2 and t(\sqrt{\pi})=\pi, and therefore:

    \[\int_{\sqrt{\pi/2}}^{\sqrt{\pi}}2x\sin x^2\,dx=\int_{\pi/2}^{\pi}\sin t\,dt=-\cos|_{\pi/2}^\pi=-(-1-0)=1.\]

Improper integral

Sometimes we would like to integrate functions in such a way that one of the integral limits is \pm\infty or any other point in which the indefinite integral in undefined. Such a integral can be understood as a limit of integrals, e.g.:

    \[\int_{1}^{\infty}e^{-x}\,dx=\lim_{\beta\to\infty}\int_{1}^{\beta}e^{-x}\,dx=\lim_{\beta\to\infty}(-e^{-x})|_1^\beta=1/e-\lim_{\beta\to\infty} e^{-\beta}=1/e.\]

Measuring area

Obviously, it means that we can measure an area just subtracting integrals. E.g. area between line y=x and curve y=x^2 (they intersect at x=0 i x=1 and the line is above), is:

    \[\int_0^1 x-x^2\, dx=\left.\left(\frac{x^2}{2}-\frac{x^3}{3}\right)\right|_0^1=\frac{1}{6}.\]

Length of a curve

We can also calculate a length of a curve using integrals. Given a parametrization of a curve (x(t),y(t)), its length between t=a and t=b, is given by the following formula:


Let us check this formula for the line x=y between x=0 and x=1. Such a line has parametrization x(t)=t, y(t)=t^2. Therefore its length is:


Definite integral and derivatives

Consider a function

    \[F(x)=\int_{a(x)}^{b(x)} g(t)\,dt.\]

It is a function of x, and we can calculate its derivative. This is easy. Let G(t) be such that G'(t)=g(t). Then




e.g. if F(x)=\int_{1}^{x^2} dt/t, then F'(x)=(G(x^2)-G(1))'=2x/x^2=2/x.