Prove for each of the functions $f:[0,1]\to \mathbb{R}$ defined as below, that the improper Riemann integrals exist while the Lebesgue integrals do not : $$(a) \ \ \ \ \ \ \ \ \ \ f(x)=\begin{cases} \frac{1}{x}\sin\frac{1}{x} \ \ \ \ \text{if} \ x\neq 0 \\ 0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \text{if} \ x=0 \end{cases} \\ \ \ \ \\ \ \\ \ \ \ \ \ \ \ \ \ \ (b) \ \ \ \ \ \ \ \ \ \ f(x)=\begin{cases} (-1)^nn \ \ \ \ \ \text{if} \ \ \frac{1}{n+1}<x\leq \frac{1}{n} \\ 0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \text{if} \ \ x=0\end{cases}$$
Since these two integrals are improper Riemann integrals, we have to check that $|f|$ can't be Riemann integrable over $[0,1]$. Only then we can assure that both $(a)$ and $(b)$ are not Lebesgue integrable. So our problem reduces to show that for $(a)$ $$\int_0^1 \frac{1}{x}\bigg|\sin\bigg(\frac{1}{x}\bigg)\bigg|dx=\infty$$ and for $(b)$ $$\int_0^1 |f(x)|dx=\infty$$
But I am unable to show that how these two integrals diverge. I have tried Cauchy integral test, but to no avail. And for the second function in $(b)$, I could not find a suitable approach to proceed. Any help is appreciated in this regard.
First substitute $y = \frac{1}{x}$ to get $$\int_0^1 \frac{1}{x}\bigg|\sin\bigg(\frac{1}{x}\bigg)\bigg|dx\; = \int_1^\infty \frac{|\sin(y)|}{y}dy$$ Either you already had that this integreal diverges or you consider $$\begin{align*}\int_1^\infty \frac{|\sin(y)|}{y}dy &= \sum_{k=1}^\infty \frac{1}{2k+1} \int_{2k-1}^{2k+1} |\sin(y)|dy \\ &\ge \sum_{k=1}^\infty \frac{1}{2k+1} = +\infty\end{align*}$$
Where we used that the interval $[2k-1,2k+1]$ is from length 2 and hence contains at least a full period of $|\sin(y)|$ which is $\frac{\pi}{2} < 2$. And the integral over a period of $|\sin(y)|$ is $1$.
For the second one consider that $$ |f(x)|=\begin{cases} n \ \ \ \ \ \text{if} \ \ \frac{1}{n+1}<x\leq \frac{1}{n} \\ 0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \text{if} \ \ x=0\end{cases}$$ Hence the integral becomes a simple sum...