This is exercise 7.19 from Rudin's RCA.
Suppose $f$ is continuous on $R$, $f(x)>0$ if $0<x<1,$ $f(x)=0$ otherwise. Define $$h_c(x) = \sup \{n^c f(nx):n=1,2,3,\dots\}.$$ Prove that $h_c$ is in $L^1(R)$ if $0<c<1$.
I am stuck with this problem. How can I prove the integrability for this function? I would greatly appreciate any help.
We can see that $h_c$ is supported on $[0,1]$. When you look at the definition of $h_c(x)$, the largest $n$ for which $f(nx) \neq 0$ is $1/x$. That means that $h_c(x) \leq \frac{1}{x^c}||f||_{\infty}$.
Now when integrating, we know that $\int_0^1 h_c(x) dx \leq \int_0^1 \frac{1}{x^c}dx ||f||_{\infty} = \frac{1}{1-c}||f||_{\infty}$, this works for $0<c<1$. For $c=1$ it wouldnt work as the integral diverges.