Is there a continuous positive function (f>0) whose integral over [1,∞) converges but whose limit is not zero? [duplicate]
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?
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)$.