{$\int_{[1/n,1]}f$} to converge and yet $f$ is not $L$-integrable over $[0,1]$ Let $f$ be a function on $[0,1]$ and continuous on $(0,1]$.
I want to find a function $f$ s.t. {$\int_{[1/n,1]}f$} converges and yet $f$ is not $L$-integrable over $[0,1]$.
My attempts:
I've found $f(x)=(1/x)Sin(1/x)$ but I can not prove that $f$is not $L$-integrable over $[0,1]$.
 A: You can piece together a continuous function $f$ on $(0,1]$ such that $f(1/n)=0$ for all $n$, and $f$ has a big spike down and a big spike up on $\left[\frac{1}{n+1},\frac{1}{n}\right]$, with $\int_{1/(n+1)}^{1/n}f(x)dx = 0$ and $\int_{1/(n+1)}^{1/n}|f(x)|dx = 1$.
A: Link to image of the Interval
I posted a link to the image if anyone wants to see what the function would look like on a sinlge interval. As the intervals become smaller each triangle will become taller. I hope this is helpful and please feel free to comment if something is wrong.
Let $n \in \mathbb{N}$ and consider the following function f(x) s.t.:
\begin{array}{ll}
0,~x \in \{0,\frac{1}{n+1},~\frac{1}{n} \} \\
16(n^2+n)^2(x-\frac{1}{n+1}),~~~~ x \in (\frac{1}{n+1},~\frac{1+4n}{4(n^2+n)})
      \\
    -16(n^2+n)^2(x-\frac{1+4n}{4(n^2+n)})+4(n^2+n),~ x \in [\frac{1+4n}{4(n^2+n)},~\frac{3+4n}{4(n^2+n)}]
     \\
16(n^2+n)^2(x-\frac{3+4n}{4(n^2+n)})-4(n^2+n),~ x \in (\frac{3+4n}{4(n^2+n)}~,\frac{1}{n})
\end{array}
Let $A_n=[\frac{1}{n+1},\frac{1}{n}].$ Observe that $\frac{1}{2}(\frac{1}{n}-\frac{1}{n+1})+\frac{1}{n+1}=\frac{1+2n}{2(n^2+n)}$ and is therefore the halfway point of $A_n.$ Likewise the $\frac{1}{4}$ and $\frac{3}{4}$ points on each $A_n$ are $\frac{1+4n}{4(n^2+n)}$ and $\frac{3+4n}{4(n^2+n)}$ respectively.  Let $A_n'$ and $A_n''$ be the first and second half of the interval $A_n$ respectively. $f$ on $A_n'$ forms an isosceles triangle above the x-axis with the base on the x-axis and has an area of 1. Likewise $f$ on $A_n''$ forms an isosceles triangle with the same traits except it is below the x-axis. Then $\int_{A_n'}f=\int^{\frac{1+2n}{2(n^2+n)}}_{\frac{1}{n+1}}f=1$  and likewise $\int_{A_n''}f=-1$. Then by additivity over domains of integration we can show that $\int_{A_n'}f+\int_{A_n''}f=\int_{A_n}f=1-1=0~\forall n$. Then by countability of integration we know  $\sum\limits^{\infty}_{n=1}\int_{A_n}f= \int_{\cup^{\infty}_{n=1}A_n}f=0$. Thus $\{\int_{[\frac{1}{n},1]}f\} \to 0.$ However  $\int_{A_n'}|f|+\int_{A_n''}|f|=\int_{A_n}|f|=1+1=2~\forall n$. Then   $\sum\limits^{\infty}_{n=1}\int_{A_n}|f|= \int_{\cup^{\infty}_{n=1}A_n}|f|=\sum\limits^{\infty}_{n=1}2=\infty$. Thus $\int_{[0,1]}|f|=\infty \Rightarrow$ $f$ on $[0,1]$ is not Lebesgue integrable.
Let's consider an alternate case in which $\{\int_{[\frac{1}{n},1]}f \}^{\infty}_{n=1}$ converges and $f$ is non negative. Then $\int_{[\frac{1}{n},1]}f \in \mathbb{R}$ and $\int_{[\frac{1}{n},1]}f \le  \int_{[\frac{1}{n+1},1]}f~~\forall n \Rightarrow$ $\{\int_{[\frac{1}{n},1]}f \}^{\infty}_{n=1}$ is an increasing sequence of real numbers. Since $[\frac{1}{n},1] \to (0,1]$ and $\{\int_{[\frac{1}{n},1]}f \}^{\infty}_{n=1}$ converges then $\int_{[\frac{1}{n},1]}f \to \int_{(0,1]}f<\infty.$ Since $f$ is non negative then $\int_{(0,1]}f=\int_{(0,1]}|f|=\int_{(0,1]}f^+<\infty$ and $\int_{(0,1]}f^-=0$. Then $f$ is Lebesgue integrable. $\square$
A: To show $(1/x)\sin (1/x)\notin L^1(0,1),$ make the change of variables $x=1/y$ to get
$$\int_0^1 |(1/x)\sin (1/x)|\, dx = \int_1^\infty |\sin (y)|/y \, dy$$ $$ \ge \sum_{n=1}^{\infty}\int_{n\pi}^{(n+1)\pi} |\sin y |/y \, dy \ge \sum_{n=1}^{\infty}(1/(n+1)\pi)\cdot \int_0^\pi |\sin y|\, dy.$$
