TITLE: Hardy's Inequality: Problems $3.14$ and $3.15$ in Rudin's RCA
QUESTION [13 upvotes]: In Problem $3.14$, we prove (a) Hardy's inequality, (b) the condition for equality, and I shall talk about (c), (d) below. Problem $3.15$ is the discrete case of Hardy's inequality. I have asked three related questions in a single post itself, since all of them are related to Hardy's inequality, and none should be too involved.
There are some existing posts on MSE related to these topics, so I shall link them right away and point out that my question is not a duplicate: Post 1, Post 2, Post 3, Post 4.

For the sake of mentioning it, Hardy's inequality is: For $p\in (1,\infty)$, $f\in L^p((0,\infty))$ relative to the Lebesgue measure, and $$F(x) = \frac{1}{x}\int_0^x f(t)\ dt\quad (0 < x < \infty)$$ we have $$\|F\|_p \le \frac{p}{p-1} \|f\|_p$$

Question 1: This is Problem $3.14(c)$ in Rudin's book.

Prove that the constant $p/(p-1)$ cannot be replaced by a smaller one.

In one of the linked posts, there is some discussion on how this is the best constant, but I was unable to follow it. My sense is that it suffices to find a counterexample, i.e. for every constant $\beta$ smaller than $p/(p-1)$, we need a function $f_\beta\in L^p((0,\infty))$ which does not satisfy the required inequality. Why are we complicating things? If I'm thinking right, could someone help me find a counterexample?
Question 2: This appears as Problem $3.14(d)$ of Rudin's book. The author is trying to emphasize that the inequality is not for $p = 1$.

If $f > 0$ and $f\in L^1$, prove that $F\notin L^1$.

I found an example, $f(x) = e^{-x}$. Then $F(x) = \frac{1-e^{-x}}{x}$. $F$'s integral diverges, since the integral of $1/x$ diverges (use limit comparison test for integrals). However, as @David C. Ullrich pointed out, this is not enough.
Question 3: This is Problem $3.15$ in the same book and is the discrete case of Hardy's inequality.

Suppose $\{a_n\}$ is a sequence of positive numbers. Prove that $$\sum_{N=1}^\infty \left(\frac{1}{N} \sum_{n=1}^N a_n \right)^p \le \left(\frac{p}{p-1} \right)^p \sum_{n=1}^\infty a_n^p$$ if $1 < p < \infty$. If $a_n\ge a_{n+1}$, the result can be made to follow from Hardy's inequality. This special case implies the general one.

I took $f = \sum_{n=1}^\infty a_n \mathbf{1}_{[n,n+1]}$. Then $f\in L^p$ only if $\sum_{n=1}^\infty a^p_n < \infty$. If $f\notin L^p$, the inequality is trivial. So let's take $f\in L^p$. Now using Hardy's inequality, we have $\|F\|_p \le \frac{p}{p-1} \|f\|_p$. What is $F$? $$F(x) = \frac{1}{x}\int_0^x \sum_{n=1}^\infty a_n\mathbf{1}_{[n,n+1]}(t)\ dt = \frac{1}{x}\left(\sum_{n=1}^{\lfloor x\rfloor} a_n + (x - \lfloor x\rfloor)a_{\lfloor x\rfloor + 1} \right)$$
How do I proceed?

P.S. I have already solved Problems $3.14(a)$ and $3.14(b)$, i.e. proving Hardy's inequality and showing that equality holds iff $f = 0$ a.e.

REPLY [2 votes]: People seem to be misinterpreting Q2. It says


If $f > 0$ and $f\in L^1$, prove that $F\notin L^1$.


You can't do that by giving an example. Luckily it's
trivial:
Since $f>0$ some elementary measure theory(see below) shows that there exists a bounded set $E$ with $m(E)>0$ and a $\delta>0$ so $f\ge\delta$ on $E$. Hence if $x>\sup E$ we have $$F(x)=\frac1x\int_0^x f
\ge\frac1x\int_E\delta=\frac{\delta m(E)}{x},$$so $F\notin L^1$.
Below
(edit) If $f(x)>0$ there exists $n\in\Bbb N$ with $f(x)>1/n$; hence $$(0,\infty)=\bigcup_{n=1}^\infty I_n,$$ where $$I_n=\{x:f(x)>1/n\}.$$So countable additivity shows there exists $n_0$ with $$m(I_{n_0})>0.$$
Again, $$I_{n_0}=\bigcup_{k=1}^\infty(I_{n_0}\cap(0,k)),$$so we can let $E=I_{n_0}\cap(0,k)$ for a suitable $k$; any choice of $k$ gives a bounded set on which $f>\delta>0$, and if $k$ is large enough then $m(E)>0$.