For any real number $x$ we define its decimal expansion as $N\cdot x_1x_2x_2\cdots$ where $N=\lfloor x\rfloor$ and $$x_i=\left\lfloor 10^i \left(x- \left(N+\sum_{j=1}^{i-1}\frac{x_j}{10^j}\right) \right)\right\rfloor.$$
Now I have two questions regarding this definition:
Why will each $x_k$ be a digit between $0$ and $9$? That is clear in the case of $x_1$ since $x-N$ being the fractional part of $x$ will be in $[0,1)$ and so $10(x-N)\in[0,10)$. In the case of $x_2$ it is not so clear. Intuitively, if from the fractional part we subtract one tenth's of the "first digit decimal point" so we must getting something like $0.0x_2x_3\cdots$ and hence multiplying by $100$ (and taking floor) is the correct thing to do, to recover $x_2$. However I cannot seem to make this idea rigorous.
Why can't the decimal expansion end in a string of $9's$? I think if we presumed that it did then, after some $k$ the difference between $x$ and $N.x_1\cdots x_k$ would be zero. That will be a contradiction because clearly each $x_i$ is unique. But how to justify that such a difference ultimately becomes zero?
Update: The answers posted below both use induction to prove (1). Is it correct to do it without induction as follows: Suppose $i\ge 3$ (the cases $i=1,2$ being similar). Now, $$10^{i-1}\left(x-\left(N+\sum_{j=1}^{i-2}\frac{x_j}{10^j}\right)\right)<1+x_{i-1}$$ by definition of the floor function. Hence $10^{i}(x-(N+\sum_{j=1}^{i-1}\frac{x_j}{10^j}))<10$ and so $x_i\le 9$. Similarly, since $$10^{i-1} \left(x- \left(N+\sum_{j=1}^{i-2}\frac{x_j}{10^j} \right)\right)\ge x_{i-1}$$ so $10^{i}\left(x-\left(N+\sum_{j=1}^{i-1}\frac{x_j}{10^j}\right)\right)\ge 0$ following which $x_i\ge 0$.
Thank you.
(Just to clarify bounty will be given to the best posted answer, even if above is correct)
$$ \newcommand{\bb}[1]{\left( #1 \right)} \newcommand{\f}[1]{\left\lfloor #1 \right\rfloor} $$ Write $x_0 := N$. Note that your expression becomes the following: $$ x_i = \f{10^i\bb{x - \sum_{j=0}^{i-1}\frac{x_j}{10^j}}} $$
For (1), we can make use of the following lemma:
Proof. We prove by induction. The case is clear for $k = 0$, as by definition $x_0 = \f{x}$. Now suppose $\sum_{i=0}^k \frac{x_i}{10^i} = \frac{\f{10^kx}}{10^k}$. Then: \begin{align*} \sum_{i=0}^{k+1} \frac{x_i}{10^i} &= \frac{\f{10^kx}}{10^k} + \frac{x_{k+1}}{10^{k+1}} \\ &= \frac{\f{10^kx}}{10^k} + \frac{1}{10^{k+1}}\f{10^{k+1}\bb{x - \sum_{j=0}^{k}\frac{x_j}{10^j}}} \\ &= \frac{\f{10^kx}}{10^k} + \frac{1}{10^{k+1}}\f{10^{k+1}x - 10^{k+1}\frac{\f{10^kx}}{10^k}} \\ &= \frac{\f{10^kx}}{10^k} + \frac{1}{10^{k+1}}\f{10^{k+1}x - \underbrace{10\f{10^kx}}_\text{integer}} \\ &= \frac{\f{10^kx}}{10^k} + \frac{1}{10^{k+1}}\bb{\f{10^{k+1}x} - 10\f{10^kx}} \\ &= \frac{\f{10^kx}}{10^k} + \frac{\f{10^{k+1}x}}{10^{k+1}} - \frac{\f{10^kx}}{10^k} \\ &= \frac{\f{10^{k+1}x}}{10^{k+1}} \end{align*} Now, it's simple to prove that $0 \leq x_i \leq 9$. We observe that: \begin{align*} x_i = \f{10^ix - 10^i\frac{\f{10^{i-1}x}}{10^{i-1}}} = \f{10^ix - 10\f{10^{i-1}x}} = \f{10\bb{10^{i-1}x - \f{10^{i-1}x}}} \end{align*} We know that for any integer $n$, $0 \leq n - \f{n} < 1$. Thus: \begin{align*} 0 \leq 10^{i-1}x - \f{10^{i-1}x} < 1 &\implies 0 \leq 10\bb{10^{i-1}x - \f{10^{i-1}x}} < 10 \\ &\implies 0 \leq \f{10\bb{10^{i-1}x - \f{10^{i-1}x}}} \leq 9 \end{align*} So $0 \leq x_i \leq 9$.
For (2), we shall show that there is no $M \in \mathbb{Z}^+$ such that for $i > M$, $x_i = 9$. Suppose such an $M \geq 1$ exists, and suppose $x_{M} = n$. We observe that for $M' > M$: \begin{align*} 10^{M}\bb{x - \sum_{j=0}^{M-1} \frac{x_j}{10^j}} - (n + 1) &= 10^{M}\bb{x - \sum_{j=0}^{M-1} \frac{x_j}{10^j}} - 1 - n \\ &\geq^* 10^{M}\bb{\sum_{j=0}^{M'}\frac{x_j}{10^j} - \sum_{j=0}^{M-1} \frac{x_j}{10^j}} - 1 - n \\ &= 10^M\sum_{j=M}^{M'} \frac{x_j}{10^j} - 1 - n\\ &= 10^M\sum_{j=M+1}^{M'} \frac{x_j}{10^j} - 1 \\ &= 10^M\sum_{j=M+1}^{M'} \frac{9}{10^j} - 1 \\ &= 10^M\frac{\frac{9}{10^{M+1}}\bb{1 - \frac{1}{10^{M' - M}}}}{1 - \frac{1}{10}} - 1\\ &= - \frac{1}{10^{M' - M}} \end{align*} We can let $M' \to +\infty$, and we have that $10^{M}\bb{x - \sum_{j=1}^{M-1} \frac{x_j}{10^j}} - (n + 1) \geq 0$. Thus: $$ \f{10^{M}\bb{x - \sum_{j=0}^{M-1} \frac{x_j}{10^j}} - (n + 1)} \geq 0 \implies x_M \geq n + 1 $$ which contradicts that $x_M = n$. Note that the starred inequality can be easily proven as follows: $$ x - \sum_{i=0}^{M'} \frac{x_i}{10^i} = x - \frac{\f{10^{M'}x}}{10^{M'}} \geq x - \frac{10^{M'}x}{10^{M'}} = 0 $$