Sequence $(x_k)$ converging to a solution to $x'(t)=f(x(t))$. I haven't taken ODEs beyond those in first year calculus, so i'm kinda stuck on this practice qual problem.

Suppose $f:\mathbb{R}\to\mathbb{R}$ is bounded and Lipschitz continuous. For $k\in\mathbb{N}$, define $x_k(t):[0,1]\to\mathbb{R}$ by $x_k(0)=0$ and 
  $$ x_k(t)=x_k(n/2^k)+(t-n/2^k)f(x_k(n/2^k))$$ when $n/2^k<t\leq (n+1)/2^k$.
  Why does $x_k(t)$ uniformly converge to a solution $x(t):[0,1]\to\mathbb{R}$ of the ODE
  $$
x'(t)=f(x(t)),\quad x(0)=0?$$

I started by considering the limit for fixed $k$,
$$
\lim_{h\to 0}\frac{x_k(t+h)-x_k(t)}{h}
$$
where $n/2^k<t\leq (n+1)/2^k$.
Assuming that $h$ is small so that $n/2^k<t+h\leq (n+1)/2^k$, I plugged in and found that
$$
x_k'(t)=\lim_{h\to 0}\frac{x_k(t+h)-x_k(t)}{h}=f(x_k(n/2^k)).
$$
So I think as $k\to\infty$, the intervals $(n/2^k,(n+1)/2^k]$ get very small so $t$ gets close to $n/2^k$. The claim seems like a reasonable one, but I don't get how that fact that $f$ is Lipschitz continuous and stuff comes into play and why the $x_k$ should uniformly converge. What would be the more rigourous explanation?

Let $x$ be the unique solution of the ODE. Let $B$ and $L$ be the bound and Lipschitz constant for $f$ respectively.
Note that $x_k$ satisfies $\dot{x_k}(t) = f(x_k(\frac{n}{2^k}))$ for $t \in (\frac{n}{2^k}, \frac{n+1}{2^k})$, so we can write
\begin{eqnarray}
x_k(t)-x(t) &=& \int_0^t (\dot{x_k}(\tau)-\dot{x}(\tau)) d \tau \\
&=&\sum_{n=0}^{2^k-1} \int_{\frac{n}{2^k}}^{\frac{n+1}{2^k}} (f(x_k(\frac{n}{2^k}))-f(x(\tau))) 1_{[0,t]}(\tau)d \tau
\end{eqnarray}
Note the presence of the term $1_{[0,t]}(\tau)$ to 'cut' the integration off at $t$. Now we can estimate the difference:
\begin{eqnarray}
\|x_k(t)-x(t)\| &=& \| \sum_{n=0}^{2^k-1} \int_{\frac{n}{2^k}}^{\frac{n+1}{2^k}} (f(x_k(\frac{n}{2^k}))-f(x(\tau))) 1_{[0,t]}(\tau)d \tau \| \\
&\le& \sum_{n=0}^{2^k-1} \int_{\frac{n}{2^k}}^{\frac{n+1}{2^k}} \| f(x_k(\frac{n}{2^k}))-f(x(\tau)) \| 1_{[0,t]}(\tau) d \tau \\
&\le& \sum_{n=0}^{2^k-1} \int_{\frac{n}{2^k}}^{\frac{n+1}{2^k}} L\| x_k(\frac{n}{2^k})-x(\tau) \| 1_{[0,t]}(\tau) d \tau \\
&\le& \sum_{n=0}^{2^k-1} \int_{\frac{n}{2^k}}^{\frac{n+1}{2^k}} L (\| x_k(\frac{n}{2^k})-x_k(\tau) \| +\| x_k(\tau)-x(\tau) \|) 1_{[0,t]}(\tau) d \tau \\
&\le& \sum_{n=0}^{2^k-1} \int_{\frac{n}{2^k}}^{\frac{n+1}{2^k}} L ((\tau-\frac{n}{2^k})B +\| x_k(\tau)-x(\tau) \|) 1_{[0,t]}(\tau) d \tau \\
&\le& \sum_{n=0}^{2^k-1} \int_{\frac{n}{2^k}}^{\frac{n+1}{2^k}} L (\tau-\frac{n}{2^k})B d \tau + L \int_0^t \| x_k(\tau)-x(\tau) \|)  d \tau \\
&=& \sum_{n=0}^{2^k-1} L \frac{1}{2}(\frac{1}{2^k})^2B + L \int_0^t \| x_k(\tau)-x(\tau) \|)  d \tau \\
&=& \frac{1}{2}L B \frac{1}{2^k} + L \int_0^t \| x_k(\tau)-x(\tau) \|)  d \tau \\
\end{eqnarray}
Use the Bellman Gronwall lemma to get $\|x_k(t)-x(t)\| \le \frac{1}{2}L B \frac{1}{2^k} e^{Lt}     $, or $\|x_k-x\|_\infty \le \frac{1}{2}L B \frac{1}{2^k} e^{L}$.
Not that it matters here, but the above estimate works for $\mathbb{R}^n$.
