I found this cool problem in a textbook. I googled it and used MSE's search tool to check if it has been asked before or not, but it seems that it hasn't been asked before.
Find the function $f(x)$ that the following limit defines: $$f(x) = \lim_{n\to\infty}\frac{\lfloor x \rfloor + \cdots + \lfloor x^n \rfloor}{x^n}$$
I have already solved it and I have shared my solution as an answer. Other solutions are welcome too.
Solution: We know that $x-1<\lfloor x \rfloor \leq x$, hence
$$x + \cdots + x^n - n < \lfloor x \rfloor + \cdots + \lfloor x^n \rfloor \leq x + \cdots + x^n$$
Dividing both sides by $x^n$ $$\frac{x + \cdots + x^n}{x^n} - \frac{n}{x^n} < \frac{\lfloor x \rfloor + \cdots + \lfloor x^n \rfloor}{x^n} \leq \frac{x + \cdots + x^n}{x^n}$$
Using the identity $x+\cdots+x^n = \frac{x-x^{n+1}}{1-x}$, we have
$$\frac{x}{x-1}\cdot \frac{x^n-x}{x^n} - \frac{n}{x^n} < \frac{\lfloor x \rfloor + \cdots + \lfloor x^n \rfloor}{x^n} \leq \frac{x}{x-1}\cdot \frac{x^n-x}{x^n}$$
If $|x|>1$, then $\lim_{n\to\infty}\frac{n}{x^n} = 0$. To prove it, first ssume $x>1$, we can write it as $x=1+r$ where $r>0$, hence
$$x^n=(1+r)^n > 1+nr+\frac{n(n-1)}{2}r^2$$ $$0 \leq \lim_{n\to\infty}\frac{n}{x^n} \leq \lim_{n\to\infty}\frac{n}{1+nr+\frac{n(n-1)}{2}r^2}=0$$
For the case $x<-1$, just replace $x$ with $(-x)>1$ and notice that $\lim_{n\to\infty} (-1)^n\frac{n}{(-x)^n} = 0$.
Hence, for $|x| > 1$, the squeeze theorem proves that $$\lim_{n\to\infty}\frac{\lfloor x \rfloor + \cdots + \lfloor x^n \rfloor}{x^n} = \frac{x}{x-1}$$
For $0<x<1$, $f(x)=0$ and $f(x)$ is undefined on $[-1,0] \cup \{1\}$. Q.E.D.