Two Hardy's inequalities
Before you could think "Oh, no! Another inequality and the same bunch of s**t!", I'm gonna explain why my latest threads deal with this kind of topic (and seem all equal). 
I'd like to open this new thread with a quotation from G. H. Hardy's presidential address at London Mathematical Society (November 8th 1928):
How true!
Inequalities are powerful tools which enable mathematicians to handle the most different kinds of problems in pure and applied Mathematics.
Though some important inequalities are easy to prove in one dimension and can show how to use density theorems e.g. in $L^p$, they're omitted from the syllabi of elementary courses.
During his university life, a typical Math student usually meets six inequalities, namely Cauchy-Schwarz, Hölder, Minkowski, AM-GM, Jensen, Bessel; in higher courses, sometimes isoperimetric inequality in the plane (via Poincaré-Wirtinger inequality), Sobolev and Clarkson's inequalities are proved.
Sometimes also the characterization of the equality case is intentionally omitted, even if knowing what kind of functions verifies an inequality with equal sign is very important in some applications (e.g. in the proof of plane isoperimetric inequality via Poincaré-Wirtinger inequality).
So I tried to draw the attenction of you guys on these subjects with my last threads.
I hope my efforts will be appreciated (at least by some of you).
***
Problem:
Let $p \in ]1,+oo[$.
1. Prove that Hardy's inequality with derivatives:
(*) $\quad \int_0^(+oo) |u(x)|^p/x^p" d"x<= c*\int_0^(+oo) |u'(x)|^p" d"x$
holds for all $u \in C_c(]0,+oo[) \cap C_(pw)^1([0,+oo[)$* with constant $c>= (p/(p-1))^p$.
2. Using (*) and a density argument, prove that the classical Hardy's inequality:
(**) $\quad \int_0^(+oo) |1/x \int_0^x f(t)" d"t|^p " d"x<= c*\int_0^(+oo) |f(x)|^p" d"x$
holds for all $f \in L^p(]0,+oo[)$ with constants chosen as in (*).
3. Prove that $C=(p/(p-1))^p$ is the best constant in (**) and (*): in order to do this, find a family $\{f_epsilon\}_(epsilon >0) \subseteq L^p(]0,+oo[)$ s.t. the ratios:
$\quad c_epsilon:=(\int_0^(+oo) |1/x \int_0^x f_epsilon(t)" d"t|^p " d"x)/(\int_0^(+oo) |f_epsilon(x)|^p" d"x)$
increase when $epsilon to 0^+$ and satisfy $lim_(epsilon \to 0^+) c_epsilon=C$.
Moreover show that equality in (*) and (**) is possible iff, respectively, $u=0$ and $f=0$ a.e in $]0,+oo[$.**
__________
* Here $C_(pw)^1([0,+oo[)$ denotes the class of functions $u$ which are piecewise of class $C^1$ in $[0,+oo[$, meaning that:
For all $[a,b] \subset [0,+oo[$, there exists a finite number of points $a=x_0
Moreover, note that the support of $u$ is compact in $]0,+oo[$, therefore $u=0$ in a small right neighbourhood of $0$.
** This means that the variational problems:
$max_(u \in C_c(]0,+oo[), u!=0) (\int_0^(+oo) |u(x)|^p/x^p" d"x)/(\int_0^(+oo) |u'(x)|^p" d"x) \quad$ and $max_(f in L^p(]0,+oo[), f!=0) (\int_0^(+oo) |1/x \int_0^x f(t)" d"t|^p " d"x)/(\int_0^(+oo) |f(x)|^p" d"x)$
don't have any solution even if we can find maximizing sequences (see Hint 3.).

I'd like to open this new thread with a quotation from G. H. Hardy's presidential address at London Mathematical Society (November 8th 1928):
All analysts spend half their time hunting through the literature for inequalities which they want to use and cannot prove.
How true!

Inequalities are powerful tools which enable mathematicians to handle the most different kinds of problems in pure and applied Mathematics.
Though some important inequalities are easy to prove in one dimension and can show how to use density theorems e.g. in $L^p$, they're omitted from the syllabi of elementary courses.
During his university life, a typical Math student usually meets six inequalities, namely Cauchy-Schwarz, Hölder, Minkowski, AM-GM, Jensen, Bessel; in higher courses, sometimes isoperimetric inequality in the plane (via Poincaré-Wirtinger inequality), Sobolev and Clarkson's inequalities are proved.
Sometimes also the characterization of the equality case is intentionally omitted, even if knowing what kind of functions verifies an inequality with equal sign is very important in some applications (e.g. in the proof of plane isoperimetric inequality via Poincaré-Wirtinger inequality).
So I tried to draw the attenction of you guys on these subjects with my last threads.
I hope my efforts will be appreciated (at least by some of you).

***
Problem:
Let $p \in ]1,+oo[$.
1. Prove that Hardy's inequality with derivatives:
(*) $\quad \int_0^(+oo) |u(x)|^p/x^p" d"x<= c*\int_0^(+oo) |u'(x)|^p" d"x$
holds for all $u \in C_c(]0,+oo[) \cap C_(pw)^1([0,+oo[)$* with constant $c>= (p/(p-1))^p$.
2. Using (*) and a density argument, prove that the classical Hardy's inequality:
(**) $\quad \int_0^(+oo) |1/x \int_0^x f(t)" d"t|^p " d"x<= c*\int_0^(+oo) |f(x)|^p" d"x$
holds for all $f \in L^p(]0,+oo[)$ with constants chosen as in (*).
3. Prove that $C=(p/(p-1))^p$ is the best constant in (**) and (*): in order to do this, find a family $\{f_epsilon\}_(epsilon >0) \subseteq L^p(]0,+oo[)$ s.t. the ratios:
$\quad c_epsilon:=(\int_0^(+oo) |1/x \int_0^x f_epsilon(t)" d"t|^p " d"x)/(\int_0^(+oo) |f_epsilon(x)|^p" d"x)$
increase when $epsilon to 0^+$ and satisfy $lim_(epsilon \to 0^+) c_epsilon=C$.
Moreover show that equality in (*) and (**) is possible iff, respectively, $u=0$ and $f=0$ a.e in $]0,+oo[$.**
__________
* Here $C_(pw)^1([0,+oo[)$ denotes the class of functions $u$ which are piecewise of class $C^1$ in $[0,+oo[$, meaning that:
For all $[a,b] \subset [0,+oo[$, there exists a finite number of points $a=x_0
Moreover, note that the support of $u$ is compact in $]0,+oo[$, therefore $u=0$ in a small right neighbourhood of $0$.
** This means that the variational problems:
$max_(u \in C_c(]0,+oo[), u!=0) (\int_0^(+oo) |u(x)|^p/x^p" d"x)/(\int_0^(+oo) |u'(x)|^p" d"x) \quad$ and $max_(f in L^p(]0,+oo[), f!=0) (\int_0^(+oo) |1/x \int_0^x f(t)" d"t|^p " d"x)/(\int_0^(+oo) |f(x)|^p" d"x)$
don't have any solution even if we can find maximizing sequences (see Hint 3.).
Risposte
"Gugo82":
Let $p \in ]1,+oo[$.
1. Prove that Hardy's inequality with derivatives:
(*) $\quad \int_0^(+oo) |u(x)|^p/x^p" d"x<= c*\int_0^(+oo) |u'(x)|^p" d"x$
holds for all $u \in C_c(]0,+oo[) \cap C_(pw)^1([0,+oo[)$* with constant $c>= (p/(p-1))^p$.
This part was already solved by Thomas (thanks a lot for sharing your efforts!).
"Gugo82":
2. Using (*) and a density argument, prove that the classical Hardy's inequality:
(**) $\quad \int_0^(+oo) |1/x \int_0^x f(t)" d"t|^p " d"x<= c*\int_0^(+oo) |f(x)|^p" d"x$
holds for all $f \in L^p(]0,+oo[)$ with constants chosen as in (*).
Since $C_c^1(]0,+oo[) \subseteq C_c(]0,+oo[)\cap C_(pw)^1([0,+oo[)$, inequality (*) holds in particular if $u$ is of class $C_c^1$ in $]0,+oo[$; putting $v=u'$, inequality (*) reads:
(a) $\quad \int_0^(+oo)|1/x \int_0^x v(t)" d"t|^p" d"x<= c*\int_0^(+oo)v(x)" d"x \quad$ (with $c>=(p/(p-1))^p$)
and it holds for a subclass of $C_c(]0,+oo[)$ (in fact, not all functions of class $C_c$ are derivatives of function of class $C_c^1$; e.g. if $v>=0$ is in $C_c(]0,+oo[)$ and $>0$ at least in a point $x_0 \in ]0,+oo[$, then none of its primitives is of class $C_c^1(]0,+oo[)$, for they haven't compact support in $]0,+oo[$).
Neverthless (a) is a good start point, because it leads to the following question: Does (a) actually hold for all $v\in C_c(]0,+oo[)$?
This is a question of remarkable interest: in fact, if (a) holds for all functions of class $C_c$, then we can prove (**) with a simple density argument. In what follows we give a positive answer.
Following the previous argument, we suppose $v>=0$ and put $V(x):=1/x\int_0^xv(t)" d"t$; obviously $V\in C^1([0,+oo])$, $"supp" V \subseteq [a,+oo[$ with $a>0$, $V(0)=0$ and $V$ vanishes at infinity, for $|\int_0^(+oo)v(t)" d"t|<+oo$. Inequality (a) then reads:
$\int_0^(+oo) V^p(x)" d"x<= c*\int_0^(+oo) v(x)" d"x$.
An integration by parts of the l.h.s. yelds:
$\int_0^(+oo) V^p(x)" d"x=[xV^p(x)]_0^(+oo)-p\int_0^(+oo)xV^(p-1)(x)V'(x)" d"x$
$\quad \quad =[1/x^(p-1) \int_0^x v(t)" d"t]_0^(+oo)-p\int_0^(+oo) -p\int_0^(+oo)xV^(p-1)(x)V'(x)" d"x$
$\quad \quad =-p\int_0^(+oo)xV^(p-1)(x)V'(x)" d"x \quad$;
but $V'(x)=1/x(v(x)-V(x))$ hence:
$\int_0^(+oo) V^p(x)" d"x=p\int_0^(+oo)V^(p-1)(x)[-xV'(x)]" d"x$
$\quad \quad =p\{ \int_0^(+oo) V^p(x)" d"x-\int_0^(+oo) V^(p-1)(x)v(x)" d"x\} =>$
$=> (p-1)/p \int_0^(+oo)V^p(x)" d"x=\int_0^(+oo) V^(p-1)(x)v(x)" d"x \quad$.
Now $v in L^p(]0,+oo[)$ because it's continuous with compact support and $V^(p-1) \in L^(p')(]0,+oo[)$ (here $p'=p/(p-1)$ is the conjugate exponent of $p$), for:
$V^((p-1)p')(x)=V^p(x)=1/x^p \{\int_0^x v(t)" d"t\}^p$
is dominated in $]0,+oo[$ by a suitable summable function (e.g. $phi(x)=\{(0, ", if " 0
$(p-1)/p \int_0^(+oo)V^p(x)" d"x <= ||V^((p-1)p')||_(p')*||v||_p=\{\int_0^(+oo) V^p(x)" d"x\}^((p-1)/p)*\{\int_0^(+oo) v^p(x)" d"x\}^p =>$
$=> \int_0^(+oo) V^p(x)" d"x<=(p/(p-1))^p\int_0^(+oo)v^p(x)" d"x \quad$.
The last inequality implies that (a) holds for all $c>=(p/(p-1))^p$ and for all $v\in C_c(]0,+oo[)$.
Finally, since $C_c(]0,+oo[)$ is dense in $L^p(]0,+oo[)$, a standard density argument allows us to infer (**) from (a), which was our claim.
"Thomas":
we osberve that if $f_1$ and $f_2$ are two functions whose supports have only an intersection of null measure and the inequality holds for them, then it's automatically satisfied for $f_1+f_2$, simply adding the equations... from this propriety it's evident that we can consider $u>=0$, dividing the funtion into its positive and negative part... (ok the function may become discontinuous this way, so we have to be careful, considering weak derivatives when necessary, but I leave this problem in a second time, I don't remember how precisely integration by parts works... the subsequent procedure has some problems when deriving the modulus this is the reason for the discussion...)
Yes, the absolute value can actually give some problems.
To avoid problems, it suffices to take $u\in W^(1,p)([0,+oo[)$, but few (or maybe none) of the "young" mathematicians know what $W^(1,p)$ means.
Since I'd like young students solve the problem in an essentially elementary way (i.e. with some Calculus and little notions of Measure Theory), I required strong differentiability assumptions on $u$; nevertheless I wasn't able to see that "$u \in C_c^1$" could cause problems with the absolute value...
Perhaps, we can skip these problems requiring $u \in C_c ([0,+oo[)\cap C_(pw)^1([0,+oo[)$, where $C_(pw)^1([0,+oo[)$ is the set of functions which are piecewise of class $C^1$ in $[0,+oo[$?
With this hypothesis, it seems to me that the problem can be still solved with elementary Calculus, can't it?
Otherwise, we have to take $u\in W^(1,p)([0,+oo[)$.
1)
we osberve that if $f_1$ and $f_2$ are two functions whose supports have only an intersection of null measure and the inequality holds for them, then it's automatically satisfied for $f_1+f_2$, simply adding the equations... from this propriety it's evident that we can consider $u>=0$, dividing the funtion into its positive and negative part... (ok the function may become discontinuous this way, so we have to be careful, considering weak derivatives when necessary, but I leave this problem in a second time, I don't remember how precisely integration by parts works... the subsequent procedure has some problems when deriving the modulus this is the reason for the discussion...)
Anyway: integration by parts (domain : $RR^+$):
$int u^p/x^p=int u^p D(x^(1-p)/(1-p))=-1/(1-p) int D(u^p)x^(1-p)=-p/(1-p)int u^(p-1)u'x^(1-p)$
holder.. let $q$ and $p$ be dual exponents:
$int u^p/x^p<=-p/(1-p)[int u^((p-1)q)/(x^((p-1)q))]^(1/q) int[|u'|^p]^(1/p)$
It holds by definition $(p-1)q=p$, so
$int u^p/x^p<=-p/(1-p)[int u^(p)/x^(p)]^(1/q) int[|u'|^p]^(1/p)$
it's magic
, multipling by $int u^(p)/x^(p)]^(-1/q)$ and eleving all to $p$ the inequality is obtained....
now I stop here... plan to finish in a few months
... I'm too behind with the exams!
@Wizard: may I ask you what you study? I had in mind you were a matematician
we osberve that if $f_1$ and $f_2$ are two functions whose supports have only an intersection of null measure and the inequality holds for them, then it's automatically satisfied for $f_1+f_2$, simply adding the equations... from this propriety it's evident that we can consider $u>=0$, dividing the funtion into its positive and negative part... (ok the function may become discontinuous this way, so we have to be careful, considering weak derivatives when necessary, but I leave this problem in a second time, I don't remember how precisely integration by parts works... the subsequent procedure has some problems when deriving the modulus this is the reason for the discussion...)
Anyway: integration by parts (domain : $RR^+$):
$int u^p/x^p=int u^p D(x^(1-p)/(1-p))=-1/(1-p) int D(u^p)x^(1-p)=-p/(1-p)int u^(p-1)u'x^(1-p)$
holder.. let $q$ and $p$ be dual exponents:
$int u^p/x^p<=-p/(1-p)[int u^((p-1)q)/(x^((p-1)q))]^(1/q) int[|u'|^p]^(1/p)$
It holds by definition $(p-1)q=p$, so
$int u^p/x^p<=-p/(1-p)[int u^(p)/x^(p)]^(1/q) int[|u'|^p]^(1/p)$
it's magic

now I stop here... plan to finish in a few months

@Wizard: may I ask you what you study? I had in mind you were a matematician

Thanks a lot to you both!
@WiZaRd: To understand problems like this you only need some basic notions from Measure Theory and Functional Analysis; perhaps, just what's in the syllabus of Elementi di Teoria della Misura (held by prof. Biacino).
@dissonance: Oh, c'mon... You've already studied Functional Analysis and Measure Theory, haven't you?!?
You got all the tools to try to solve problems like this.
Let's say that the problem is "almost the same" of Ex. 14 in Rudin, Real and Complex Analysis, chapter 3 (maybe dissonance has already noted it...): I just changed the point of view...
@WiZaRd: To understand problems like this you only need some basic notions from Measure Theory and Functional Analysis; perhaps, just what's in the syllabus of Elementi di Teoria della Misura (held by prof. Biacino).
@dissonance: Oh, c'mon... You've already studied Functional Analysis and Measure Theory, haven't you?!?

You got all the tools to try to solve problems like this.
Let's say that the problem is "almost the same" of Ex. 14 in Rudin, Real and Complex Analysis, chapter 3 (maybe dissonance has already noted it...): I just changed the point of view...
"WiZaRd":
I do not understand anything, but I like those topics.
The same holds for me! Excellent work you're doing here, please keep going.
I do not understand anything, but I like those topics.
Thanks so much for your great work.
Thanks so much for your great work.