# Example that $\int |f(x)| dx=\infty$ but $\int |f(x)|^2 dx <\infty$

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)$.

-
It is not the case that $\int |f(x)|\,dx < \infty \implies \int |f(x)|^2\,dx < \infty$. Consider $f(x) = \frac1{\sqrt x}$ on $(0,1)$. –  kahen Nov 1 '12 at 14:24
@kahen Yes, you are right. But I am interested in those $f$ which are bounded on $\mathbb{R}$. Maybe I should state that in the problem. Thank you for the good point. –  Patrick Li Nov 2 '12 at 0:03

$$f(x)=\frac1{\sqrt{1+x^2}}{}$$

-

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$.

-

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$$

-
The OP was looking for $f$ to be absolutely continuous on $\Bbb R$. –  Cameron Buie Nov 1 '12 at 13:13
Oh, that what happens when you start answering before finishing reading the question :( –  Dennis Gulko Nov 1 '12 at 13:14

How about: $$f(x) = \left\{ \begin{array}{ccc} \frac{1}{|x|} && |x| > 1 \\ 1 && |x| \leq 1 \end{array} \right.$$

-
What about when $|x|=1$? You'll want to fix this so you can get absolute continuity on $\Bbb R$. –  Cameron Buie Nov 1 '12 at 13:17
@CameronBuie: In that case, it should be 1 -- which does make it continuous. (I'd edit to change one of the bounds to be a non-strict inequality, but I don't have the rep to propose a single-character edit.) –  ruakh Nov 1 '12 at 14:14
@CameronBuie, fixed - you guys are nit-picking today :) –  nbubis Nov 1 '12 at 14:20
Still not continuous at $x=-1$. Sorry to nitpick. :S –  Cameron Buie Nov 1 '12 at 14:31
@nbubis: You should learn to use the cases environment instead of array for functions like that. f(x) = \begin{cases} \frac1{|x|} & |x|>1 \\ 1 & |x| \leq 1\end{cases}. –  kahen Nov 1 '12 at 14:35

Let $$f(x)=\begin{cases}\frac1{|x|} & |x|\geq 1\\1 & |x|<1.\end{cases}$$

-

The most noticeable one I think is the sinc function $$\mathrm{sinc}(x)=\frac{\sin(\pi x)}{\pi x}$$

-
@kahen That's why $\int |\mathrm{sinc}(x)|dx=\infty$ –  chaohuang Nov 2 '12 at 2:09

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.

-