This is an exercise of K.L. Chung's book. 

> 
> Suppose $\{a\_n\}$ is an arbitrary enumeration of all rationals,$b\_n\ge 0,$ and $\displaystyle \sum\_{n=1}^\infty b\_n$ converges to a finite number. Let $$f(x)=\sum\_{n: a\_n\le x}b\_n.$$
>  show that $f(-\infty)\triangleq\lim\_{x\to -\infty}f(x)=0$ and $f(\infty)\triangleq\lim\_{x\to \infty}f(x)=\sum\_{n=1}^\infty b\_n$.
> 
> 
> 

---

It's intuitive that $f(-\infty)=0$ and $f(\infty)=\sum\limits\_{n=1}^\infty b\_n$, since as $x$ becomes smaller, fewer terms of $\{b\_n\}$ are included in the summation, and vice versa. However, I'm not so sure how to prove it rigorously. I list what I tried below, and would appreciate it if someone can take a look and point out any flaws or a better proof.

---

Suppose $\displaystyle \sum\_{n=1}^\infty b\_n=c.$ So $\forall \epsilon>0, \exists N$ s.t. $\forall K\ge N$ we have $\displaystyle \sum\_{n=1}^K b\_n>c-\epsilon.$ Now consider $A\triangleq\{a\_1, a\_2, ..., a\_N\}$, and let $a\_{\max}=\max A.$ Then $\forall x>a\_{\max}$, $f(x)\ge \displaystyle \sum\_{n=1}^N b\_n$, and hence $|f(x)-c|<\epsilon,$ since $f$ is clearly monotonically increasing. This shows $f(x)\to c$, as $x\to \infty.$

Similarly, let $a\_{\min}=\min A.$ Then $\forall x<a\_{\min},$ it follows that $f(x)\le \displaystyle \sum\_{n=N+1}^{\infty} b\_n<\epsilon$. Since $f(x)\ge 0$ obviously, this implies that $\displaystyle \lim\_{x\to-\infty} f(x)=0.$

---

Are the arguments above correct? Are there flaws or better proofs?