11

Is there a continuous positive function whose integral over $(0,\infty)$ converges but whose limit is not zero?

closest I could think of is the Riemann or tent functions. but they are defined as $0$ in an endless number of points. I am looking for a function that is greater than $0$

does that even exists?

Arturo Magidin
  • 420,020
YNWA
  • 529

1 Answers1

23

Yes, there is such a function:

Consider the function $f$ with domain $[0,\infty)$ whose graph coincides with the non-negative $x$-axis except around the positive integers. At a positive integer $n$, the graph of $f$ is a "spike" (an inverted V shape) of height one and width $1/2^{n-1}$, centered around $n$. These are your "tent" functions.

Now, following Jose27's comment, take $g(x)=f(x)+e^{-x}$.

Then $\limsup\limits_{x\rightarrow\infty}\ g(x)=1$, because of the spikes, while $\liminf\limits_{x\rightarrow\infty}\ g(x)=0$; thus $\lim\limits_{x\rightarrow\infty} g(x)$ does not exist.

Also:

$$ \int_0^\infty e^{-x}\,dx= 1 $$ and $$ \int_0^\infty f(x)\, dx =\sum_{n=1}^\infty {1\over 2^n }=1. $$ Thus, the integral $\int_0^\infty g(x)\,dx$ converges to 2.

Finally, note that $g$ is continuous and $g(x)=e^{-x}+f(x)\ge e^{-x}>0$ on $[0,\infty)$.

David Mitra
  • 76,633
  • oh my god! thats it...thanks to everybody...your the best! – YNWA Jan 26 '12 at 18:27
  • 1
    Best example ever. – Dr Richard Clare Aug 24 '17 at 02:31
  • 2
    Great example: just what I was looking for. This shows that there do in fact exist continuous probability density functions do not tend to 0 as x tends to + (or -) infinity . – Adam Rubinson Mar 26 '20 at 00:03
  • @AdamRubinson Worth noting though that while the probability density does not tend to $0$, the complement of the cumulative density function does. In other words, $\lim_{x\to\infty}P(X\geq x)=0$. I think. – nog642 Sep 01 '23 at 07:58
  • @nog642 $\lim\limits_{x\to\infty}P(X\geq x)=0$ is true for all distributions on (a subset of) the real numbers. – Henry Jul 24 '25 at 14:53