Value of the Lebesgue integral of a function Let $(\mathbb{R},\mathfrak{M},m)$ be the measure space whith $\mathfrak{M}$ is the $\sigma$-algebra of Lebesgue and $m$ Lebesgue measure.
$$f(x) = \begin{cases}\frac{1}{\sqrt[]{x}} & x\in(0,1] \\ 0 &x\notin (0,1]\end{cases}$$
Then we have $\int_{(0,1]}f=2$.
A suggestion of how to show this equality. Thanks
 A: Consider the sequence of simple functions $\phi_n \leqslant f$ where
$$\phi_n(x) = \sum_{k=1}^n(k/n)^{-1/2}\chi_{[(k-1)/n, k/n]}(x).$$
By the MCT,
$$\int_{[0,1]}f=\lim_{n \to \infty}\int\phi_n= \lim_{n \to \infty}\sum_{k=1}^n(k/n)^{-1/2}m([(k-1)/n,k/n])\\= \lim_{n \to \infty}\frac1{\sqrt{n}}\sum_{k=1}^n\frac1{\sqrt{k}}= 2.$$
The limit follows from 
$$\frac{2}{\sqrt{k+1}+\sqrt{k}} \leqslant \frac1{\sqrt{k}} \leqslant \frac{2}{\sqrt{k}+\sqrt{k-1}}\\ \implies 2(\sqrt{k+1}-\sqrt{k} )\leqslant \frac1{\sqrt{k}}\leqslant2(\sqrt{k}-\sqrt{k-1} ).$$
Whence,
$$2\sum_{k=1}^n(\sqrt{k+1}-\sqrt{k} )\leqslant \sum_{k=1}^n\frac1{\sqrt{k}}\leqslant 2\sum_{k=1}^n (\sqrt{k}-\sqrt{k-1} ),\\2(\sqrt{n+1}-1) \leqslant  \sum_{k=1}^n\frac1{\sqrt{k}} \leqslant 2\sqrt{n},\\ 2(\sqrt{1+1/n}-1/\sqrt{n})\leqslant  \frac1{\sqrt{n}}\sum_{k=1}^n\frac1{\sqrt{k}} \leqslant 2.$$
Applying the squeeze principle,
$$\int_{[0,1]}f=\lim_{n \to \infty}\frac1{\sqrt{n}}\sum_{k=1}^n\frac1{\sqrt{k}}= 2.$$
A: The Lebesgue integral agrees with the Riemann integral whenever the latter exists. In this case, the (improper) Riemann integral exists and it is computed in the following way.
$$\int f(x)\;dx=\int_0^1\frac{1}{\sqrt{x}}\;dx=\lim_{s\rightarrow 0}\int_s^1\frac{1}{\sqrt{x}}\;dx=\left.\lim_{s\rightarrow0}2\sqrt{x}\;\right|_s^1=\lim_{s\rightarrow0}(2-2\sqrt{s})=2.$$
