Is $\operatorname{sinc} x$ the only one? I don't know if this is a very simple question with a very difficult answer, but:
Is $y = \dfrac{\sin x}{x}$ the only function such that
$$\int_{-\infty}^{\infty} f(x) dx =\int_{-\infty}^{\infty} f^2(x) dx \text{ ?}$$
This is to say, if we start with the integral equation  
$$\int_{-\infty}^{\infty} f(x) dx =\int_{-\infty}^{\infty} f^2(x) dx \text{ ?}$$
would we only find $f(x) = \dfrac{\sin x}{x}$, or we can expect other solutions?
Maybe I should have made this clear, but I'm talking about $f(x) \neq 0$ and $f(x)$ continuous in $\mathbb{R}$.
 A: Note that
$$
\int_{-\infty}^\infty\frac{1}{1+x^2}\mathrm{d}x=\pi
$$
and
$$
\int_{-\infty}^\infty\frac{1}{(1+x^2)^2}\mathrm{d}x=\frac{\pi}{2}
$$
However, if we scale this up, we get
$$
\int_{-\infty}^\infty\frac{2}{1+x^2}\mathrm{d}x=2\pi
$$
and
$$
\int_{-\infty}^\infty\frac{4}{(1+x^2)^2}\mathrm{d}x=2\pi
$$
This can be done for any function so that $f$ and $f^2$ are integrable and $\int_{-\infty}^\infty f(x)\:\mathrm{d}x\not=0$.
A: Not by far.
In fact, take any nonnegative continuous $g$ such that $\int g^2 > \int g$. Then select some $x_0$ such that $0<g(x_0)<1$ and consider the functions
$$ f_a(x) = \begin{cases}g(x) & x\in(-\infty,x_0] \\ g(x_0) & x\in(x_0,x_0+a] \\ g(x-a) & x \in (x_0+a,\infty) \end{cases}$$
for all $a>0$. As you increase $a$, both of $\int f_a^2$ and $\int f_a$ will increase in proportion to $a$, but $\int f_a$ will increase faster by a factor of $1/g(x_0)$. Since $f_0=g$, at some $a$ you will find $\int f_a^2=\int f_a$.
Alternatively, take the same $g$ and let $b=\frac{\int g}{\int g^2}$ Then $f(x)=bg(x)$ will also satisfy $\int f=\int f^2$.
A: Take any $f$  where both integrals exist. Define
$$  A = \int_{-\infty}^{\infty} f(x) dx,   $$ then
$$  B = \int_{-\infty}^{\infty} f^2(x) dx.   $$
Now, define
$$  g(x) = \frac{A}{B} \;  f(x).   $$
Then
$$  \int_{-\infty}^{\infty} g(x) dx = \int_{-\infty}^{\infty} g^2(x) dx =   \frac{A^2}{B}.  $$
