# Show that the following function is continuous

Let $$f : \mathbb{R} \rightarrow \mathbb{R}$$ be a function which takes a convergent sequence and gives us a convergent sequence.

Show that $$f$$ is continuous.

So I saw a proof for this but I don't get it.

proof

We show that for all convergent sequences $$a_n$$ with limit $$a$$ it holds that $$\lim_{ n \rightarrow \infty } f(a_n) = f(a)$$. Let $$a_n$$ be convergent with limit $$a$$. define $$b_n :=a_{\frac{n}{2}}$$ if $$n$$ even and $$b_n := a$$ if $$n$$ odd.

Now the unclear part

The following first equation is unclear:

And the last part with "it follows that" is unclear:

$$\lim_{ n \rightarrow \infty } f(b_n) = \lim_{ n \rightarrow \infty } f(b_{2n+1} ) = \lim_{ n \rightarrow \infty } f(a) = f(a)$$. It follow that $$\lim_{ n \rightarrow \infty } f(a_n) = a.$$

• Please also identify the source in which you found the proof you still need to share with us. – jordan_glen Jan 19 at 19:24

The sequence $$\bigl(f(b_{2n+1})\bigr)_{n\in\mathbb N}$$ is a subsequence of the sequence $$\bigl(f(b_n)\bigr)_{n\in\mathbb N}$$ and therefore, since the limit $$\lim_{n\in\mathbb N}f(b_n)$$ exists, you have$$\lim_{n\in\mathbb N}f(b_n)=\lim_{n\in\mathbb N}f(b_{2n+1}).$$So, the limit $$\lim_{n\in\mathbb N}f(b_{2n})$$ also exists, but $$b_{2n}=a_n$$ and therefore $$\lim_{n\to\infty}f(a_n)$$ exists (and it is equal to $$f(a)$$).

This proof centers on the Theorem:

If $$\{s_n\}\to s$$ is a convergent sequence then for any sub sequence $$\{s_{k_i}\}$$, $$\{s_{k_i}\}$$ is a convergent sequence that converges to $$s$$.

So in this case you have:

$$\{a_k\} \to a$$ (given)

$$\{a_k\} = \{b_2k\} \subset \{b_n\}$$ (by the way we defined $$\{b_n\}$$.

$$b_{2k+1} = a$$ (by definition)

$$\{b_{2k+1}\} \subset \{b_n\}$$.

It's easy to show $$\{b_n\} \to a$$ . And we know $$\{a_k\} = \{b_{2k}\} \to a$$. And $$\{a\} = \{b_{2k+1}\} \to a$$.

....

Now we are told that since $$\{a_k\}=\{b_{2k}\}, \{a\}=\{b_{2k+1}\}, \{b_n\}$$ all converge then

$$\{f(a_k)\}=\{f(b_{2k})\}, \{f(a)\} = \{f(b_{2k+1})\},$$ and $$\{f(b_n)\}$$ all converge.

But $$\{f(a_k)\} = \{f(b_{2k})\}\subset \{f(b_n)\}$$, and $$\{f(a)\} = \{f(b_{2k+1})\}\subset \{f(b_n)\}$$, so they must all converge to the same value.

So $$\lim_{k\to \infty} f(a_k) =$$

$$\lim_{k\to \infty}f(b_{2k}) =$$ (because $$a_k = b_{2k}$$)

$$\lim_{n\to \infty}f(b_n) =$$ (because $$\{f(b_{2k})\}\subset \{f(b_n)\}$$)

$$\lim_{k\to \infty}f(b_{2k+1})=$$ (because $$\{f(b_{2k+1})\}\subset \{f(b_n)\}$$)

$$\lim_{k\to \infty}f(a)$$ (because $$b_{2k+1} =a$$)

$$= f(a)$$ (because $$\{f(a)\}$$ is a constant sequence)

And that's that.

For any $$\{a_k\} \to a$$ we have proven that $$\{f(a_k)\} \to f(a)$$ and that is the definition of continuous.

=====

: If $$a_n \to a$$ and $$b_{2k}= a_k$$ and $$b_{2k+1} = a$$ then $$b_n \to a$$.

Pf: Let $$\epsilon > 0$$. There is an $$N$$ so that if $$n > N$$ then $$|a_n - a| < \epsilon$$. So there is an $$M = 2N$$ where if $$n > M$$ then

if $$n$$ is even then $$\frac n2 > N$$ and $$|b_n - a|=|a_{\frac n2} - a| < \epsilon$$

or if $$n$$ is odd then $$|b_n - a| = |a-a| = 0 < \epsilon$$.

So $$b_n \to a$$.

Well the first equality of the first equation holds because the limit of a sequence (assuming it exists) is equal to the limit of any of its subsequence.

As for the "it follows that" part, You apply the same argument with $$b_{2n}$$ instead of $$b_{2n+1}$$. (I believed you have made a typo in the last equality btw).