Construct a sequence of continuous functions which converges pointwise to $\lfloor x \rfloor$

Suppose $f(x)=\lfloor x \rfloor$ for $x \geq 0$. Define a sequence of functions $(f_n(x))_{n \geq 1}$ where

$f_n(x) = \left\{ \begin{array}{lr} x^n & : x \in [0,1)\\ (x-1)^n+1 & : x \in [1,2)\\ (x-2)^n+2 & : x \in [2,3)\\ \vdots \\ \end{array} \right.$

Questions:

$1)$ Is $f_n(x)$ continuous for all $x \geq 0$?

$2)$ Does the function $f_n(x)$ converge pointwise to $\lfloor x \rfloor$?

If yes to both questions above, can we write $f_n(x)$ in a single function instead of piece-wise function?

My guess: Yes to both questions. But I am unable to express $f_n(x)$ in a single function.

• Piecewise functions are functions; $f_n$ is already expressed as a "single function". – Daniel Hast Dec 4 '14 at 3:54
• Perhaps a formula as $f_n(x)=(x-\lfloor x \rfloor)^n+\lfloor x \rfloor$ ? – Kelenner Dec 4 '14 at 7:38
• Kelenner is correct. I would recommend you go back and use this definition to make the answer to (1) and (2) simpler. Given $0 \leq (x−⌊x⌋)<1$, show that $(x−⌊x⌋)^n$ must converge to $0$. Although the fractional part function is not defined, you can further simplify $f_n(x)$ to ${x}^n+⌊x⌋$. – Display name Apr 19 '17 at 22:36
• Can't unedit previous comment, I meant ${\{x}\}^n+⌊x⌋$ – Display name Apr 19 '17 at 22:42

Note that $(x-k)^n + k \rightarrow k$ for $x \in [k,k+1)$, since $0 \leq (x-k) < 1$.