Example where $\int |f(x)| dx$ is infinite and $\int |f(x)|^2 dx$ is finite I read in a book that the condition $\int |f(x)|^2 dx <\infty$ is less restrictive than $\int |f(x)| dx <\infty$. That means whenever $\int |f(x)| dx$ is finite, $\int |f(x)|^2 dx$ is also finite, right? 
My understanding is that $|f(x)|$ may have a thick tail to make the integral blow up, but $|f(x)|^2$ may decay quickly enough to have a finite integral. Can someone give me an example that $\int |f(x)| dx=\infty$ but $\int |f(x)|^2 dx <\infty$. Suppose $f(x)$ is an absolutely continous function and bounded on $(-\infty, \infty)$. 
 A: For example take $f(x)=1/\lfloor x\rfloor$. Then 
$$\int_1^\infty|f(x)|dx=\sum_{n=1}^\infty \frac1n=\infty$$
But
$$\int_1^\infty|f(x)|^2dx=\sum_{n=1}^\infty \frac1{n^2}=\frac{\pi^2}{6}<\infty$$
A: How about:
$$f(x) = \left\{ \begin{array}{ccc}
\frac{1}{|x|} && |x| > 1  \\
1 && |x| \leq 1   \end{array} \right.$$
A: Let $$f(x)=\begin{cases}\frac1{|x|} & |x|\geq 1\\1 & |x|<1.\end{cases}$$
A: $$f(x)=\frac1{\sqrt{1+x^2}}{}$$
A: You can think of the harmonic series:
$$\sum_{n \geq 1} \frac{1}{n}=\infty$$
but 
$$ \sum_{n\geq 1}\frac{1}{n^2}<\infty$$.
Therefore you can choose
$$f(x) = \sum_{n \geq 1} \frac{1}{n} \chi_{[n,n+1)}$$
where $\chi_X$ is the characteristic function of the set $X$.
A: The most noticeable one I think is the sinc function $$\mathrm{sinc}(x)=\frac{\sin(\pi x)}{\pi x}$$
A: Firstly, i'm presuming you mean an integral over all space?
The first answer that comes to mind, for a continuous function is going to be annoying simple;
$$ \int_{-\infty}^{\infty} x dx = 0 $$
while
$$ \int_{-\infty}^{\infty} x^2 dx = 0 $$
So any odd function will always satisfy $\int f(x) dx < \infty$, but not necessarily $\int f^2(x) dx < \infty$. That's a whole class of functions that always fit one of the conditions but not always the other.
