TITLE: What can we get from the square integrability of the derivative?
QUESTION [5 upvotes]: Let $f$ be a continuously differentiable function on $[1, +\infty]$.
Question: Is it true that $\int_1^{+\infty} (f')^2dx < +\infty$ implies $\int_1^{+\infty} (\frac f x)^2 dx< +\infty$?
This is the integral version of the question in this post: If a positive series converge in square sum, will its average series converge in square sum?.
I am interested in this question because it seems rather simple and concrete. I think there should be some techniques to deal with such kind of problems. However, I am not able to prove or give a counterexample of the claim.
What I have got: (1) The claim holds when $f$ is a power function. (2) The claim fails if 'square integrability' of $f'$ and $\frac f x$ is replaced by 'absolute integrability', since $f$ can be chosen to be a constant $1$.

REPLY [5 votes]: We have an inequality similar to Hardy's inequality:
$$
\boxed{\left\|\frac{f(x)}{x}\right\|_{L^2[1,\infty)} ≤ f(1) + 2 \left\|f'\right\|_{L^2[1,\infty)}}
$$
Proof: First remark that
$$
∫_1^\infty \left|\frac{f(x)}{x}\right|^2\mathrm d x = \left\|\frac{1}{x} \left(f(1)+ \int_1^x f'\right)\right\|_{L^2[1,\infty)}^2
\\
≤ \left(\left\|\frac{f(1)}{x}\right\|_{L^2[1,\infty)} + \left\|\frac{1}{x} \int_1^x f'\right\|_{L^2[1,\infty)}\right)^2 
$$
and the first integral is easily bounded since
$$
\left\|\frac{f(1)}{x}\right\|_{L^2[1,\infty)} = f(1) \left(\int_1^\infty x^{-2}\,\mathrm d x\right)^{1/2} = f(1)
$$
To bound the second integral, we can do the same strategy as for the classical Hardy's inequality and use first a change of variable $t= sx$ to get
$$
\left\|\frac{1}{x} \int_1^x f'(t)\,\mathrm d t\right\|_{L^2[1,\infty)}
 = \left\|\int_{1/x}^1 f'(sx)\,\mathrm d s\right\|_{L^2[1,\infty)}
\\
= \left\|\int_0^1 \mathbf{1}_{\{s>1/x\}} f'(sx)\,\mathrm d s\right\|_{L^2_x[1,\infty)}
\\
≤ \int_0^1 \left\| \mathbf{1}_{\{sx>1\}} f'(sx)\right\|_{L^2_x[1,\infty)} \,\mathrm d s
$$
and then a second change of variable giving
$$
\int_0^1 \left\| \mathbf{1}_{\{sx>1\}} f'(sx)\right\|_{L^2_x[1,\infty)} \,\mathrm d s = \int_0^1 \left(\int_1^\infty |\mathbf{1}_{\{sx>1\}} f'(sx)|^2\,\mathrm d x\right)^{1/2} \,\mathrm d s
\\
= \int_0^1 \left(\int_{s}^\infty |\mathbf{1}_{\{y>1\}} f'(y)|^2\,\,\mathrm d y\right)^{1/2} s^{-1/2}\,\mathrm d s
\\
= \int_0^1 \left(\int_{1}^\infty |f'(y)|^2\,\,\mathrm d y\right)^{1/2} s^{-1/2}\,\mathrm d s = 2 \|f'\|_{L^2[1,\infty)}
$$
Therefore
$$
∫_1^\infty \left|\frac{f(x)}{x}\right|^2\mathrm d x ≤ \left(f(1) + 2 \left\|f'\right\|_{L^2[1,\infty)}\right)^2 
$$