# Integral of a piece-wise continuous function using the definition.

I am defining a sequence of functions $f_n$ as follows:

$f_n(x) = nx$ if $x \leq \frac{1}{n}$, 1 if $x > \frac{1}{n}$.

I try computing a lower Darboux integral of $f_n(x)$ on [0,1] (like lower riemann integral but infimum of f on subinterval of partition rather than its value at midpoint). I use a partition of equally spaced points which define subintervals of length $\frac{1}{m}$ where $m < n$.

I arrive at an expression of the form: $(\sum_{i=1}^{i=k}\frac{1}{m}\frac{i-1}{m}n)$ + $\frac{n-k}{m}$. Where $k$ is the smallest integer such that $k \geq \frac{m}{n}$.

I tried to find an upperbound by setting $k = 1 + \frac{m}{n}$. And I arrive at an expression : $\frac{3n + 3m}{2nm} + \frac{n}{m}$. My conceptual problem is that my understanding is that as $m \rightarrow \infty$ the partition gets finer so the lowerbound approximation to the integral should get bigger. Yet I'm not sure about that from what I have. It seems as if $m\rightarrow \infty$ my expression tends to $\frac{3}{2n}$.

How would I use the definition of Riemann(darboux) integration to compute the integral of the functions $f_n$?

Thank you.

• What interval are you considering doing integration on? – xbh Sep 14 '18 at 2:45
• Sorry, [0,1], will edit my question. – trynalearn Sep 14 '18 at 2:47

First, I find it personally helpful to do some visualization, below are some examples of $f_n(x)$
From these we can develop some useful intuition. First notice that $f_1(x) = x$ $(\textrm{for } x \in [0,1])$. Also, observe that as $n \rightarrow \infty$ we must have that $$\int_{[0,1]} f_n(x) \rightarrow 1$$ since the portion of the area under the curve taken up by when $x \leq n^{-1}$ goes to zero as $n$ tends to infinity and $$\int_{[0,1]}dx =1.$$ Define $x_i = \frac{i}{m}$, then I have $m-1$ subintervals of the form $[x_i, x_{i+1}]$, where $0 \leq i \leq m$. Observe that by the definition of $f_n(x)$ we have that $$\inf_{x \in [x_i,x_i+1]} f_n(x) = f_n(x_i),$$ as $f_n$ is either increasing or constant. so $$\int_{[0,1]}f_n(x)dx = \lim_{m\rightarrow \infty}\sum_{i=0}^{m-1}f_n(x_i)\Delta x$$ which is simply the Riemann Integral with left hand endpoints. For example, if I wanted to approximate $f_5$ with $m = 4$, then I would have the following situation: $$\int_{[0,1]}f_5(x) \approx f(0)\cdot\frac{1}{4} + f\left(\frac{1}{4}\right)\cdot\frac{1}{4} + f\left(\frac{1}{2}\right)\cdot\frac{1}{4} = 0 + 1\frac{1}{4} + \frac{1}{4} = \frac{1}{2}$$
What happens if I let $m = 10$? $m = 20$? I recommend doing this to develop intuition. In any case we can see that this is just the left hand sided Integral, and as $f_n$ is either increasing or constant this will be an underestimate, so yes the lower-bound estimate will increase as I make my partition finer.
As to explicitly calculating this integral. If you want to do it rigorously one can simply use the usual techniques for proving Riemann Integrals have a certain value while realizing that for particular $f_n$ $$\int_{[0,1]} f_n(x)dx = \frac{1}{2n} + 1 - \frac{1}{n}$$