In the Wikipedia article on [improper integrals](https://en.wikipedia.org/wiki/Improper_integral#Types_of_integrals), the function $f(x)=\frac{\sin x}{x}$ gives an example that is improperly integrable:
$$
\lim_{N\to\infty}\int_0^N f(x)dx=\frac{\pi}{2}
$$
but _not_ absolutely integrable:
$$
\int_0^\infty|f(x)|dx=\infty
$$
I am looking for such an example for functions defined on a closed interval:
> Can we find a function $f:[0,1]\to\mathbf{R}$, such that
$\displaystyle
\lim_{a\to 0^+}\int_a^1f(x)dx=L
$ for some real number $L$,
but
$\displaystyle
\int_0^1|f(x)|dx=\infty
$?
---
**Remark**.
I think such an example of $f$ should oscillate in the interval so that when considering the improper integral, it has lots of cancellations, and when taking the absolute value in the integral, it blows up, maybe having the harmonic series as a lower bound. But I don't have much progress in this direction.
I also consider converting the example on $[0,\infty)$ to one on $[0,1]$. But getting a bijection between $[0,1]$ and $[0,\infty)$ seems not very useful.