How to find a non-Gaussian function f(x) that satisfies the following condition: $\lim_{X \to \infty} \int_0^Xf(x)^2 > 2(\lim_{X \to \infty}\int_0^Xf(x))^2$
 A: Since you just need one example, consider
$$f(t):=e^{-4t}\qquad(t\geq0)\ .$$
Then
$$f(x):=\int_0^x f^2(t)\>dt={1\over8}\bigl(1-e^{-8x}\bigr)$$
and
$$g(x):=2\left(\int_0^x f(t)\>dt\right)^2={1\over 8}\left(1-e^{-4x}\right)^2\ .$$
It follows that
$${f(x)\over g(x)}=\coth(2x)>1\qquad(x>0)\ .$$
A: I assume that $X>0$. Consider
$f(x) = \left\{
  \begin{array}{lr}
    0 & :x &= &0\\
    1 & :x &\in &(\frac{1}{n+1},\frac{1}{n}], \text{n odd},n\geq N\\
    -1 & :x &\in &(\frac{1}{n+1},\frac{1}{n}], \text{n even},n\geq N\\
0&:x&>&\frac{1}{N}  \end{array}
\right.
$
for some fixed $N\in\mathbb{N}$ to be determined. Since $f$ has countably many discontinuities, it is integrable. We need only consider the case $X\in(0,\frac{1}{N}]$. In this case, $\text{LHS}=X$. If $X\in (\frac{1}{n+1},\frac{1}{n}]$ where $n\geq N$, then a crude approximation gives
\begin{align}\left|\int_0^X f(x)dx\right|&\leq \max\left(\left|\int_0^{\frac{1}{n+1}} f(x)dx\right|,\left|\int_0^{\frac{1}{n}} f(x)dx\right|\right)
\\&\leq \frac{1}{n}-\frac{1}{n+1}\\&=\frac{1}{n}\frac{1}{n+1}
\\ &\leq \frac{X^2}{1-X}\end{align}
So $\text{RHS}\leq\frac{2X^4}{(1-X)^2}$, and you can verify that $X>\frac{2X^4}{(1-X)^2}$ for all small enough $X>0$ (or equivalently, large enough $N$). In fact, $N=1$ works, but it's a bit harder to show.
