Probability density $f(x)$ when $x \to \infty$ There is this following statement which I need to evaluate to be true or false: 

Let $f(x) $, $f:\mathbb{R} \rightarrow \mathbb{R_+} $ be a continuous probability density function. Then $\lim_{x\to\infty} f(x) = 0 $. 

I understand this is true, because since $ \lim_{x\to\infty} F_X(x) = 1  $ it's necessary that: $$\lim_{x\to\infty}  f(x) = \lim_{x\to\infty}  \frac{dF_X}{dx} = 0 $$
A friend of mine has proposed an counterxample: you have a triangle with area $1/2$ and height $1$ and, after every unity in $x$ axis, you have another triangle, with area $1/2^n$. Since the height is fixed in $1$, we can say it is a probability density function. It is also continuous, except for a countable set of numbers in which it is not continuous (that is, when $\lim_{x\to a^-} f(x) = 0 $ and $\lim_{x\to a^+} f(x) = 1 $). He says in this case $f$ doens't necessarily tend to $0$ as $x\to \infty$. 
Still, in my point of view, I can say that $\lim_{x\to\infty} f(x) = 0 $ except for a countable set of elements. To me, it's just an example that $\lim_{x\to\infty} f(x) = 0 $, except for a countable set of elements. Does it make sense? Who is right? 
Thank you!
 A: Your proof is wrong, because, in general, $\lim_{x \to \infty}h(x) = 1$ does not imply  $\lim_{x \to \infty}h'(x) = 0$ . See here.
And indeed, the statement is false. The intuition of your friend is on the right track. Here's a continuous (and smooth) example:
We have a set of random variables $(X_1,X_2, X_3 \cdots)$, where each $X_k$ follows a normal density with mean $\mu=k$ and stardard deviation $2^{-k}/\sqrt{2 \pi}$, so that
$$f_{X_k}(x) =2^k \exp \left({- (x-k )^2  2^{2k}\pi } \right) $$
Let $f_X(x)$ be a mixing of such normal rvs, weighted by exponentially decreasing factors:
$$f_X(x) = \sum_{k=1}^{\infty} \frac{1}{2^{k}}  f_{X_k}(x)=  \sum_{k=1}^{\infty}  \exp \left({- (x-k )^2  2^{2k}\pi } \right)$$
This is a valid continuous density: it corresponds to picking randomly one of $(X_1,X_2, X_3 \cdots)$, with the probability of picking $X_k$ being $1/2^{k}$.
But $f_X(n) > 1$ for any positive integer $n$. Hence its limit cannot be zero.

A: I'm not sure that "the limit is zero except for a countable set of points" makes any sense.  It just says that the limit is not zero, and your friend is right.
Furthermore, it's not in fact true that "the limit is zero except for a countable set of points".  To make this clear, let's write your friend's construction a bit more precisely.  The graph of $f$ consists of


*

*a triangle with base the interval $[0,1]$ and height $1$ occurring at $x=0$;

*a triangle with base $[1,1\frac12]$ and height $1$ occurring at $x=1$;

*a triangle with base $[2,2\frac14]$ and height $1$ occurring at $x=2$;

*a triangle with base $[3,3\frac18]$ and height $1$ occurring at $x=3$;

*and so on, with $f(x)=0$ for all $x$ outside these triangles.


Then the total area under the graph is $1$ as stated.  Moreover, $f(x)$ is at least $\frac12$, and therefore does not tend to zero, for all $x$ in
$$[0,\tfrac12]\cup [1,1\tfrac14]\cup [2,2\tfrac18]\cup\cdots\ ,$$
and this is not countable.
Note also that if the lack of continuity bothers you, you can construct an example where the peaks of the triangles are at $\frac12,\,1\!\frac14,\,2\frac18,\,3\frac1{16}$ and so on, and this will have similar properties.
