Does there exist a function $f$ such that... Is there a function $f:[0, 1]→[0,∞)$ satisfying: $\int^1_0f(x) \ dx=1$,$\int^1_0x f(x) \ dx=\frac{1}{π}$, and $\int^1_0x^2f(x) \ dx=\frac{1}{π^2}$ ?
Can I multiply $f$ by some function (maybe $x$ shifted) to show this is not true?
 A: $\frac 1 {\pi}= \int_0^{1} xf(x)\, dx= \int_0^{1} (x\sqrt {f(x)}) \sqrt {f(x)})\, dx \leq \sqrt {\int_0^{1}x^{2}f(x)\, dx} \sqrt {\int_0^{1}f(x)\, dx} =\frac 1 {\pi}$ by Cauchy-Schwarz inequality. Hence the equality holds in Cauchy-Schwarz inequality. Applying the condition for equality in Cauchy-Schwarz inequlity we see that $x\sqrt {f(x)}=a\sqrt {f(x)}$ for some constant $a \geq 0$ which is a contradiction (because this gives $f=0$ except at one point and $\int_0^{1}f(x)\, dx=1$). Hence there is no such function.
Alternatively, you can verify directly from the given conditions that $\int_0^{1}[f(x)-\int_0^{1} xf(x)\, dx ]^{2}\, dx=0$ which implies that $f$ is a constant. The first condition implies that the constant is $1$ but then the other two conditions do not hold.  
A: Your $f$ is the pdf of a zero-variance variable, so you need $f(x)=\delta(x-1/\pi)$, which technically isn't a function.
A: Just to complement. By Jensen's inequality: if $f$ is not a constant, then, 
$\frac{1}{\pi^2}=E(X^2)>(E(X))^2=\frac{1}{\pi^2}$, where strict inequality holds since $g\,:\,\mathbb{R}\rightarrow \mathbb{R}$, $g(x)=x^2$ is strictly convex. This yields a contradiction. 
Of course there is no constant $f$ fulfilling the conditions. 
