Bounded function on $\mathbb R$ Is it true that if $0< f(x)$ is a continuously differentiable function on $\mathbb R$ with $\int_{-\infty}^{\infty}|f(x)|^{2}dx<\infty$ then $|f(x)|$ must be bounded above on $\mathbb R$?
 A: No: take $\phi>0$ a smooth function with compact support (say contained in $[-1/2,1/2]$) and $\phi(0)=1$. Then define $f(x)=\sum_{n=0}^{+\infty}b_n\phi\left(\frac{x+n}{a_n}\right)$. We choose $a_n$ and $b_n$ in order to make $f\in L^2$ and unbounded. We choose $a_n>1$ in order to make the support of $\phi_n\colon x\mapsto \phi\left(\frac{x+n}{a_n}\right)$ disjoint. This gives 
$$\int_{\Bbb R}|f(x)|^2dx=\sum_{n\geq 0}b_n^2\int_{-1/2}^{1/2}\phi(x/a_n)^2dx=\sum_{n\geq 0}b_n^2a_n\int_{-1/(2a_n)}^{1/(2a_n)}\phi(t)^2dt.$$
So, as $\int_{\Bbb R}\phi^2(t)dt$ is finite, we need $\sum_{n\geq 0}b_n^2a_n<\infty$ and $\{b_n\}$ unbounded. Take $b_n:=n$ and $a_n=\frac{2^{—n}}{n^2}$. 
The only "problem" is that this $f$ is not positive: add $\frac 1{1+x^2}$ to get what we want.
A: First, think of a step function $f(x)$ which is equal to $2^n$ on intervals $[n - 8^{-n};n + 8^{-n}]$ with $n > 0$ integers, and zero elsewhere. Clearly the function $f$ is not bounded but it's $L^2$ average comes down to 
$$
2\sum_{n > 0} 4^n \cdot 8^{-n} < \infty
$$
Now to construct a continuous differentiable counterexample just take a $C^{\infty}$ approximation to the above step function. Since you make no requirements on the derivative we can find an arbitrarily good $C^\infty$ approximation to the step function above.
