# Is the sequence $\big(f(n)-f(n+1)\big)$ convergent?

Let $$f:\mathbb{R}\to[0,+\infty)$$ be a function such that $$\int_{-‎\infty‎}^{+\infty}f(x)\,dx=1$$. My question is:

Is the sequence $$\big(f(n)-f(n+1)\big)$$ convergent?

I found that there exist some $$f$$ such that the sequence $$f(n)$$ is not convergent, but in my research I arrived at the mentioned question. I tried to make contradiction with the definition of improper integral by using the property $$f$$ "positive". but I could not achieve the goal. Any help is appreciated.

• Which hypothesis are you assuming about $f$, other than the fact that $\int_{-\infty}^\infty f(x)\,\mathrm dx=1$ and that $f(\mathbb{R})\subset[0,\infty)$? – José Carlos Santos Feb 3 at 18:41
• @José Carlos Santos, that 's it. Do you mean it happens under some extra conditions? – soodehMehboodi Feb 3 at 18:50
• I have posted an answer. – José Carlos Santos Feb 3 at 18:59
• I think that if you assume that $f$ is uniformly continuous and bounded, the answer is yes. – N. S. Feb 3 at 19:16

## 3 Answers

For each $$n\in \mathbb{N}$$ define $$f_n(x):\mathbb{R} \to [0,1]$$ as follows: $$f_n(2n) = 1$$, $$f_n(x) = 0$$ for $$|x - 2n|\geq 2^{-n}$$ and $$f$$ is linear on the intervals $$[2n - 2^{-n}, 2n]$$ and $$[2n , 2n + 2^{-n}]$$. The graph of $$f_n$$ is simply a thin triangle with height $$1$$, having base of length $$2\times 2^{-n}$$, equal edges and area $$2^{-n}$$. Define $$f(x) := \sum\limits_{n=1}^\infty f_n(x), \qquad x \in \mathbb{R}.$$ Then $$f$$ is non-negative and $$\int\limits_{\mathbb{R}} f(x) dx = \sum\limits_{n=1}^\infty \int\limits_{\mathbb{R}} f_n(x) dx = \sum\limits_{n=1}^\infty \frac{1}{2^n} = 1.$$ However, $$f(2n) - f(2n+1) = 1 \text{ and } f(2n + 1 ) - f(2n+2) = -1 \text{ for all } n\in \mathbb{N},$$ hence the sequence $$f(n) - f(n+1)$$ does not converge.

• @ Hayk Would you give an example such that $f$ is continuous? – soodehMehboodi Feb 12 at 15:15
• @soodehMehboodi, the $f$ defined above is continuous (just draw the graph of each $f_n$ to see what they actually are). With a bit more effort one may even modify $f$ to make it $C^\infty$ (infinitely differentiable), by smoothing the peaks of $f_n$s (e.g. via convolution with a properly chosen smooth function). What you cannot do, is making $f$ uniformly continuous, this was already pointed out in the comments and other answers to your original question. – Hayk Feb 12 at 16:10
• @ Hayk Firstly, sorry I thought that your example is not continuous. Also, I have worked on continuous functions and I need a continuous counter example. thanks . – soodehMehboodi Feb 12 at 17:19

Just take$$f(x)=\begin{cases}1&\text{ if }x\in[0,1]\\x^2+1&\text{ if }x\in\mathbb{N}\\0&\text{ otherwise.}\end{cases}$$Then your conditions hold, but $$\displaystyle\lim_{n\to\infty}\bigl(f(n)-f(n+1)\bigr)$$ diverges.

• @ José Carlos Santos Would you give an example such that $f$ is continuous? – soodehMehboodi Feb 12 at 15:15
• Yes, I can give such an example. – José Carlos Santos Feb 12 at 15:27

Without extra conditions the answer is no. Consider for example the function $$f(x)=\begin{cases} 2^{n} &\text{if x\in[n,n+1/2^{2n+1}] with n\in\mathbb{N},}\\ 0 &\text{otherwise.} \end{cases}$$ Then $$\lim_{n\to+\infty}\big(f(n)-f(n+1)\big)=\lim_{n\to+\infty}\big(2^n-2^{n+1}\big)=\lim_{n\to+\infty}(-2^n)=-\infty$$ and $$\int_{-‎\infty‎}^{+\infty}f(x)\,dx=\sum_{n=0}^{\infty}\frac{2^n}{2^{2n+1}} =\sum_{n=0}^{\infty}\frac{1}{2^{n+1}}=1.$$ P.S. As noted by N. S. in a comment above, if $$f$$ is uniformly continuous then the required limit exists and it is zero. See $f$ uniformly continuous and $\int_a^\infty f(x)\,dx$ converges imply $\lim_{x \to \infty} f(x) = 0$

• how about $f$ has continuous derivative? – soodehMehboodi Feb 3 at 19:33
• @soodehMehboodi That is not enough, but bounded derivative suffices. – Robert Z Feb 3 at 19:37
• @ Robert Z Would you give an example such that $f$ is continuous? – soodehMehboodi Feb 12 at 15:16