# The behavior of a density function at infinity

Give $f$ the density function of a random variable. Does it follow that $$\lim_{x\rightarrow \pm\infty}xf(x)=0?$$

I really appreciate it if someone can give me a clue.

-
@DilipSarwate I know if the limit exists, then it has to be 0. But how does it follow that the limit must exist? –  henryforever14 May 26 '12 at 1:38
OK, I guess I was wrong. –  Dilip Sarwate May 26 '12 at 1:44

## 1 Answer

It does not follow that $\lim_{x\to\infty}f(x)=0$, though counterexamples are perhaps somewhat unnatural.

For $x>0$, let $f(x)$ have a triangular "bump" of height say $1$ and base $\frac{2}{2^n}$ at every positive integer $n$, and let $f(x)=0$ elsewhere. So the curve $y=f(x)$ climbs in a straight line from $(n-\frac{1}{2^n},0)$ to $(n,1)$, then falls in a straight line to $(n+\frac{1}{2^n},0)$.

Then $\int_{-\infty}^\infty f(x)\,dx=1$, and $f(x)$ is non-negative. Note that $xf(x)$ is very large when $x$ is a large positive integer.

This example can be "smoothed out" in various ways. The behaviour of $xf(x)$ at integers can be assigned essentially freely.

-
The triangle "bump" function is very clever example! –  Squirtle May 26 '12 at 4:07