# Integral and antiderivative

1. Area under the graph as a paradigm
2. Definitions (upper and lower sums, integrability).
3. Integrability of continuous functions.
4. Newton-Leibniz formula: integral and antiderivative.
5. Elementary rules of antiderivation (linearity, anti-Leibniz rule of “integration by parts”).
6. Anti-chain rule, change of variables in the integral and its geometric meaning.
7. Riemann–Stieltjes integral and change of variables in it.
8. Integrability of discontinuous functions.

Not covered in the class: Lebesgue theorem and motivations for transition from Riemann to the Lebesgue integral.

The sketchy notes are available here.

## Integral: antiderivative and area

The last lecture (only partially exposed in the class) deals with the two seemingly unrelated problem: how to antidifferentiate functions (i.e., how to find a function when its derivative is known) and how to compute areas, in particular, under the graph of a given nonlinear function.

The answers turn out to be closely related by the famous Newton-Leibniz formula, which expresses the undergraph area through the antiderivative (primitive) of the function.

We discuss some tricks which allow to read the table of the derivatives from right to left (how to invert the Leibniz rule?) and find out that not all anterivatives can be “explicitly computed”. This “non-computability”, however, has its bright side: among “non-computable” antiderivatives we find functions which possess very special and useful properties, like the primitive of the power $x^{-1}=\frac1x$, which transforms multiplication into addition.

The lecture notes are available here.

## Integral: antiderivation and area

If $f:[a,b]\to\mathbb R$ is a function, can we find another differential function $F:[a,b]\to\mathbb R$ such that the derivative of $F$ is $f$? If yes, then how many such functions exist? If we have a complete record of the car speedometer, can we trace the route? compute the end point of the travel?

“Uniqueness” of solution is easy: if there are two solutions $F_1(x),F_2(x)$ such that $F'_{1,2}=f$, then the derivative of their difference $F=F_1-F_2$ is identically zero. By the finite difference lemma, for any point $x\in[a,b]$ there exists an intermediate point $z\in[a,x]$ such that $F(x)-F(a)=F'(z)=0$, thus $F$ is a constant.

Clearly, if $F(x)$ is a solution, then $F(x)+c,c\in\mathbb R$, is also a solution. In particular, we can choose this constant so that $F(a)$ takes any specified value.

Example. If $f(x)\equiv\lambda\in\mathbb R$, then $F(x)=F(a)+\lambda (b-a)$, as one can check by the direct derivation.

Example. If $f$ can be found in the right  hand side of any table of derivatives (eventually, with a constant coefficient), then $F$ can be found in the same table. E.g., if $f(x)=\mu x^{\mu-1},~\mu\ne 0$, then $F(x)=x^\mu,~\mu\ne 0$. Denoting $\mu-1=\nu$ and dividing both sides by $\mu=\nu+1$, we conclude that if $f(x)=x^\nu,~\nu\ne -1$, then $F(x)=\frac1{\nu+1}\,x^{\nu+1}$. The case of $\nu=-1$ occurs on another line in the table: if $f(x)=\frac1x,~x>0$, then $F(x)=\ln x$.

What to do if $f$ cannot be so easily found? A good idea is to try approximating $f$ by some simple functions and see what happens.

Example. Let $[a,b]=[0,N]$ and assume that the function $f$ takes the same constant value $\lambda_i$ on the (semi)interval $[i,i+1)$. Then one can easily check that the following function,

$F(x)=\lambda_0+\lambda_1+\cdots+\lambda_{i-1}+\lambda_i(x-i),\qquad x\in [i,i+1),\quad i=0,\dots,N-1,\qquad(1)$

is satisfying the following conditions:

1. continuous on the entire segment $[0,N]$,
2. differentiable everywhere except the entire points $1,2,\dots,N-1$,
3. the derivative of $F$ coincides with $f$,
4. the graph of $F$ is a broken line (קו שבור).

Instead of the cumbersome (מורכות) formula (1), one can use the equivalent verbal description:

$F(x)=$area under the graph of $f$ between the vertical segments $a$ and $x.\qquad (2)$

Indeed, if $h$ is small enough, then both $x$ and $x+h$ belong to the same interval $(i,i+1)$ and hence $F(x+h)-F(x)=\lambda_i h$, thus the derivative $F'(x)=\lambda_i=f(x)$.

Clearly, an arbitrary interval $[a,b]$ can be subdivided into $N$ equal subintervals: the formula (1) will be changed, yet its meaning (2) would obviously remain the same.

This observation suggests that  the formula (2) gives the answer also in the general case, provided that the expression “the area under the graph” makes sense. Clearly, this is the case when $f(x)$ is piecewise constant  (“the step function”, פונקציית מדרגה, as above) and even when $f$ is piecewise linear (קו שבור). Note that we allow only for step functions having only finitely many intervals of continuity, to avoid summing infinitely many areas of rectangles!

To define the area in the general case, we appeal to the following intuitively clear observation: if $X\subseteq Y$ are two nested subsets of the plane, then the areas of the sets, if it is well defined, should satisfy the inequality $s(X)\leq s(Y)$. For polygons this is an elementary theorem.

Let $f:[a,b]\to\mathbb R$ be a bounded function on a finite interval. For any step function $g_i(x):[a,b]\to\mathbb R$ which is everywhere less or equal to $f$, $g_-(x)\le f(x)$, the area $s(g_-)$ under the graph of $g_-$ is called a lower sum for $f$ on $[a,b]$. In a similar way, an upper sum for $f$ is the area under the graph of any step function $g_+(x)$ such that $f(x)\le g_+(x)$ on $[a,b]$. Clearly, for any two such functions $g_-,g_+$, the inequality $s(g_-)\le s(g_+)$ holds, thus any lower sum is less or equal to any upper sum.

Definition. A function  $f:[a,b]\to\mathbb R$ is called integrable on the segment $[a,b]$, if there exists a single number $s=s(f)$ which separates the lower and the upper sums, so that $s_-\le s \le s_+$ for any pair of lower/upper sums $s_\pm=s(g_\pm)$. This number is called the integral (האינטגרל המסוים) of the function $f(x)$ on the interval $[a,b]$ and denoted by $\displaystyle \int_a^b f(x)\,dx$.♦

An equivalent definition of integrability requires that for any positive $\varepsilon>0$ there exist an upper and a lower sum which differ by no more than $\varepsilon$:

$\forall\varepsilon>0~~\exists g_-,g_+\text{ step functions }:g_-(x)\le f(x)\le g_+(x),~~s(g_+)-s(g_-)<\varepsilon.$

Exercise. Prove that the two definitions are indeed equivalent.

Exercise. Prove that the function $f(x)=px+q,~p,q\in\mathbb R$, is integrable (in the above sense) on any interval and its integral is equal to the (geometrically calculated) area of the corresponding trapeze (טרפז).

Proposition. Any monotone (bounded) function is integrable.

Proof. Consider the partition of $[a,b]$ into $N$ equal parts by the points $a=x_0 and denote $\lambda_i=f(x_i)$ the values of $f$ at these points. Then the two step functions, $g_-(x)=\lambda_{i},~~x\in [x_i,x_{i+1})$ and $g_+(x)=\lambda_{i+1},~~x\in [x_i,x_{i+1})$ squeeze $f$ between them. The lower sum is $s_-=\frac1N(\lambda_0+\lambda_1+\cdots+\lambda_{N_1})$ and $s_+=\frac1N(\lambda_1+\cdots+\lambda_N)$. Their difference is less or equal to $(\lambda_N-\lambda_0)/N$ and it  becomes less than any positive number $\varepsilon$ when $N$ is large enough.

Theorem. Any continuous function (on the closed interval) is integrable.

Proof. The idea is to construct two step functions with the common set of jump points $a=x_0 such that on each interval $[x_i,x_{i+1})$ these functions squeeze $f$ between themselves and differ by less than a given $latex\varepsilon>0$. The points $x_i$ should be close enough to each other so that the continuity of $f$ implies the required proximity of the corresponding values.

More precisely, for any point $c\in[a,b]$ there exists a small interval latex $U_c\subseteq[a,b]$ containing $c$ such that on this interval the function is squeezed between $f(c)-\frac12\varepsilon$ and $f(c)+\frac12\varepsilon$.  The union of all these small intervals covers $[a,b]$ which is compact. Hence there exists a finite covering of $[a,b]$ by these intervals. The endpoints of these intervals subdivide $[a,b]$ into finitely many intervals $U_i$ in such a way that on each interval the function $f$ is squeezed between two constants $\lambda_i\le f(x) \le \lambda_+$ such that $\lambda_+-\lambda_-<\varepsilon$. The corresponding upper and lower sum differ by no more than $\sum (\lambda_+-\lambda_-)(x_{i+1}-x_i)\le \varepsilon \sum (x_{i+1}-x_i)\le \varepsilon (b-a)$. This difference can be as small as required if $\varepsilon$ is chosen small enough. ♦

Clearly, continuity is sufficient but not necessary assumption for integrability: the step functions are by definition integrable, though they are discontinuous. The accurate description of all integrable functions goes beyond the scope of these notes, yet there are certainly many non-integrable functions.

Example. The Dirichlet function is non-integrable on $[0,1]$. Indeed, any upper sum must be at least 1, and any lower sum at most 0, hence the gap between these values cannot be bridged (complete all details of this proof!).

Problems.

1. Prove that any function on $[0,1]$ which differs from identical zero at only finitely many points, is integrable and its integral is zero, no matter what are the values at these points.
2. Prove that a function that differs from identical zero at countably many points $x_1,x_2,\dots,x_n,\dots$, is integrable and the integral is zero if $\lim_{k\to\infty}f(x_k)=0$. Can one drop the limit assumption?
3. Prove that the Riemann function equal to $f(x)=1/q$ at the rational points $x=p/q$ (assuming $p,q$ mutually prime) and zero at irrational points, is integrable on $[0,1]$ and its integral is zero.

Problem. Is the function $f(x)=\sin \frac1x$ integrable on $[0,1]$? (Do not try to compute the integral :-))

Sin(1/x) for x near the origin

## The Newton-Leibniz formula

Quite obviously, if $f:[a,b]\to\mathbb R^1$ is integrable on $[a,b]$, then it is also integrable on any sub-interval $[a,c]$, $a\le c \le b$. The formula (2) relating the area (definite integral) with the antiderivative $F$ of an integrable function $f$ will take the form

$\displaystyle F(c)=F(a)+\int_a^c f(x)\,dx \iff \int_a^c f(x)\,dx=F(c)-F(a).$

This allows to express the area under the graph of a function in terms of its antiderivative (if the latter exists and is known).

However, integrability is a weaker condition than existence of the antiderivative: if $f$ is a step function with the partition points $x_1,\dots,x_N$, then the corresponding area function $F(z)=\int_0^z f(x)\,dx$ is continuous but differentiable only everywhere except these points.

Theorem. If $f(x)$ is continuous at a point $c\in[a,b]$, then the area function $F(z)=\int_a^z f(x)\,dx$ is differentiable at $c$ and $F'(c)=f(c)$. ♦

## Change of the independent variable in the integrals

If $f(x)$ is a function defined on the interval $x\in [a,b]$, and $z$ is a new variable which is obtained from $x$ by a monotone differentiable transformation, $z=h(x)$, then this transformation maps bijectively (1-1-way) the interval $[a,b]$ into the interval $[h(a),h(b)]$. The function $f(x)$ becomes after such change a new function $g(z)$ of the new variable: $g(z)=f(x)$ if and only if $z=h(x)$, i.e., the two functions take equal values at the two points “connected” by the transformation $h$.

The “formal” relationship between these functions is easier written “in the opposite direction”, expressing $f$ via $g$:

$f(x)=g(h(x))=(g\circ h)(x).$

The graphs of functions of $f$ and $g$ are obtained from each other by a “non-uniform stretch along the horizontal axis” which keeps the vertical direction. In particular, any step function with the partition points $x_1 will be transformed into the step function with the partition points $z_1, $z_i=h(x_i)$, with the same values. Moreover, if $f(x)$ is squeezed between two step functions, $f_-\le f\le f_+$, then its transform is squeezed between the transforms $g_\pm$ of these functions.

Thus it is sufficient to study how the change of variables affects areas under step functions, which are equal to finite sums $\sum_1^N \lambda_i(x_{i}-x_{i-1})$ and their transforms $\sum_1^N \lambda_i(z_i-z_{i-1})$. The heights $\lambda_i$ are unchanged, and the widths $z_i-z_i$ by the finite difference lemma are equal to the initial widths multiplied by the derivative $h'(c_i)$ computed at some intermediate points $c_i\in[x_{i-1},x_i]$. The result is as if instead of the step function $f(x)$ we would integrate the function $f(x)\cdot h'(x)$. Passing to limit, we conclude that

$\displaystyle \int_a^b g(h(x))\,h'(x)\,dx=\int_{h(a)}^{h(b)}g(z)\,dz.$

Change of independent variable and integral of a step function

Of course, this is equivalent to the chain rule of differentiation for the primitive functions: if $F(X)=\int_a ^X f(x)\,dx$ and $G(Z)=\int_{h(a)}^Z g(z)\,dz$, then $F(X)=G(h(X))$ and $F'(X)=G'(h(X))\cdot h'(X)$.

The formula for change of variables of integrals can be easily memorized using the existing notation: in the formula $\int g(z)\,dz$ one has to transform not just the integrand $g(z)$ by substituting $z=h(x)$, but also the differential $dz$ should be transformed using the formula $dz=h'(x)\,dx$.

Blog at WordPress.com.