Let $a_n$ be a sequence. we define $f:(0,\infty) \rightarrow \mathbb R$ by the following rule: if $n-1<x <n$, then $f(x)=a_n$. Prove that $\lim \limits_{x \to \infty} f(x)=L $ if and only if $\lim \limits_{n \to \infty} a_n=L $.

Solution Attempt: I thought about the two definitions of the limit and I tried to find a way to get from one to other.

  • $\lim \limits_{x \to \infty} f(x)=L :$ for any $\epsilon>0$ there is such $x_0$ s.t. for each $x>x_0$ :$|f(x)-L|\lt \epsilon.$

  • $\lim \limits_{n \to \infty} a_n=L $: for any $\epsilon>0$ there is such $N$ s.t. for each $n>N$ :$|a_n-L|\lt \epsilon.$

and by the information we are given I got that for:

$0<x<1$, $f(x)=a_1$

$1<x<2$, $f(x)=a_2$

and so on...

In order to grasp an intuition to the proof I imagined how the function $f$ would look like if there is no limit for the sequences, and what I reached is that the function would be a discontinuous function that has constant values and at some points it has jump discontinuity. the only way that this function might converge is when $a_n$ converges to some limit. it makes sense after all, but how do I prove this mathematically? Im not sure how to use the statements above in order to bring this intuition into formal form. I'd like your help.

It's worth mentioning also that I thought about Heine's theorem that links between limit of a function and limit of a sequence.

  • $\begingroup$ @RoryDaulton yes. thanks for noticing. $\endgroup$ Dec 26, 2015 at 12:55

1 Answer 1


Assume $\lim_{x \to \infty} f(x) = L$. Let $\varepsilon > 0$. Now there exists a positive integer $M$ such that $$ x > M \implies |f(x) - L| < \varepsilon\,. $$ Now if $n > M+1$, for any $x_n \in (n-1,n)$ we have $f(x_n) = a_n$ and $x_n > M$. Thus $$ |a_n - L| = |f(x_n) - L| < \varepsilon\,. $$ Thus $\lim_{n \to \infty} a_n = L$.

Now assume $\lim_{n \to \infty} a_n = L$ and let $\varepsilon > 0$. Now there exists a positive integer $M$ such that $$ n > M \implies |a_n - L|  < \varepsilon\,, $$ Now if $x > M$ we must have $f(x) = a_m$ for some $m \geq M+1$. Thus $$ x > M \implies |f(x) - L| = |a_m - L|  < \varepsilon\,, $$ since $m \geq M+1 > M$.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .