# Do integrable functions vanish at infinity? [duplicate]

If $f$ is a real-valued function that is integrable over $\mathbb{R}$, does it imply that

$$f(x) \to 0 \text{ as } |x| \to \infty?$$

When I consider, for simplicity, positive function $f$ which is integrable, it seems to me that the finiteness of the "the area under the curve" over the whole line implies that $f$ must decay eventually. But is it true for general integrable functions?

• No. Standard example: think of a row of triangles with area $2^{-k}$ and a fixed height. Actually, you can find strictly positive functions such that $\int_{\mathbb{R}} f < \infty$ which don't vanish at infinity. – AlohaSine Feb 7 '17 at 2:20
• @MathematicsStudent1122 It is good example, maybe you should post it as an answer. – Hua Feb 7 '17 at 2:24
• @Hua Sure, feel free. It's not like I invented it or anything. – AlohaSine Feb 7 '17 at 2:27
• @yumiko: If the limit exists, then it must be zero. Can you see that? Hence the counterexamples given are all those for which the limit doesn't exist. – Teresa Lisbon Feb 7 '17 at 2:29
• Suppose the limit were something else, without loss of generality positive. Then by using an epsilon delta argument, after some point, the value will always be larger than some positive quantity. Now, can you see why the integral of this part is infinite? – Teresa Lisbon Feb 7 '17 at 3:05

HINT Consider the function $f:\mathbb R\to\mathbb R$ which is zero for negative numbers, and for each natural number $n$, $f(x)=n$ for $x\in\left[n,n+\frac{1}{n^3}\right]$ and $f(x)=0$ for $x\in\left(n+\frac{1}{n^3},n+1\right)$.

You need some stronger conditions on $f$ than just measurability.

• (+1) In fact, by using bump functions, one can construct a real analytic function that is integrable and does not vanish at infinity. – Mark Viola Feb 7 '17 at 3:11
• @Dr.MV Interesting. My idea was just to construct a function that was easy to define, and requires very little analysis to see that it provides a counterexample. – Aweygan Feb 7 '17 at 4:35
• Yes and I've up voted your solution. I was simply giving a little more information that might be useful. – Mark Viola Feb 7 '17 at 4:37
• @Dr.MV I would be interested to see an example, but I doubt this question will receive enough future attention to make posting such an answer worthwhile. – Aweygan Feb 7 '17 at 4:42

Here is a beautiful counter-example:

$$\int_{\mathbb R}\sin(x^2)\ dx=\sqrt{\frac\pi2}$$

Other more extreme examples

$$\int_{\mathbb R}x\sin(2^{|x|})\ dx$$

These rely on the Dirichlet test for convergence of a series/integral.

• unless by integrable they mean Lebesgue integrable. – spaceisdarkgreen Feb 7 '17 at 2:46
• Neither the Riemann nor Lebesgue integrals of $\sin(x^2)$ exist. However, $\int_0^\infty \sin(x^2)\,dx$ exists as an improper Riemann integral. – Mark Viola Feb 7 '17 at 3:09
• @Dr.MV Do you mind explaining a bit more? Isn't the improper Riemann integral the Lebesgue integral for $sin(x^2)$ ? – Hua Feb 7 '17 at 3:52
• @Hua The Lebesgue integral $\int_0^\infty \sin(x^2)\,dx$ does not exist (See this). The Riemann integral $\int_0^\infty \sin(x^2)\,dx$ also fails to exist since Riemann integration is restricted to bounded intervals. However, $\lim_{L\to\infty}\int_0^L \sin(x^2)\,dx$ does exist, which is the improper Riemann integral. – Mark Viola Feb 7 '17 at 4:02
• @RRL Interestingly, the OP writes about "area under the curve," which sounds as if the interpretation might just be that of an improper Riemann integral. I would add a tag for Lebesgue, but it is ambiguous. Would the OP please provide clarification? – Mark Viola Feb 7 '17 at 4:20

There are already good answers, I only wanted to make it more visual. Observe that

\begin{align} \infty &< \sum_{k=0}^{\infty} k\ \cdot\ \ \ 2^{-k}\ \ =\hspace{10pt}2 < \infty \\ \infty &< \sum_{k=0}^{\infty} k\cdot(-2)^{-k} =-\frac{2}{9} < \infty \end{align}

(it's easy enough to do by hand, but if you want, here and here are links to WolframAlpha).

Thus, we can use:

$$f(x) = \sum_{k = 0}^{\infty}k\cdot(-1)^k \cdot \max(0,1-2^k\cdot|x-k|)$$

Below are diagrams for $|f|$ and $f$: I hope this helps $\ddot\smile$

• :-/ I honestly posted this first, but for some reason, it got converted into a comment for being trivial. Does anyone know why? – Simply Beautiful Art Feb 7 '17 at 2:34
• @SimplyBeautifulArt No, your answer is till there to me. – Hua Feb 7 '17 at 2:36
• No, I tried posting basically your answer (quite a few minutes before you and I), but it got converted into a comment, which I deleted, and then provided a longer answer. Just wondering, since it was really weird. – Simply Beautiful Art Feb 7 '17 at 2:36
• What does Frullani have to do with the Fresnel integrals? – Mark Viola Feb 7 '17 at 3:07
• @Dr.MV Sorry got the name and link wrong. Now fixed. – Adhvaitha Feb 7 '17 at 4:10