Weak-* convergence in $L^\infty$ of a certain sequence of functions Let $a < b$, $0 < \lambda < 1$, $U = (0,1) \subset \mathbb{R}$, and consider the sequence of functions
$$ f_k(x) = \begin{cases} a & \mbox{if } \frac{j}{k} \leq x \leq \frac{j+\lambda}{k}, \quad j = 0,1, \dots, k-1,\\ b & \mbox{otherwise}. \end{cases} $$
I'd like to show that $f_k \overset{*}{\rightharpoonup} f := \lambda a + (1-\lambda)b$ in $L^\infty(U)$. Of course, to this purpose one should prove that for each $g \in L^1(U)$ it holds
$$\int_U f_k g \, dx \to \int_U fg \,dx \quad \mbox{as } k \to \infty.$$
Clearly,
$$\int_U f_k g \, dx = (a - b) \sum_{j=0}^{k-1} \int_{j/k}^{(j+\lambda)/k} g(x) \, dx + b \int_0^1 g(x) \,dx,$$
so that to conclude it suffices to prove $\lim_{k\to \infty}\sum_{j=0}^{k-1} \int_{j/k}^{(j+\lambda)/k} g(x) \, dx = \lambda \int_0^1 g(x)\,dx$, which is intuitively quite evident (take $g = \mbox{const.}$, for instance).
We have of course
$$\sum_{j=0}^{k-1} \int_{j/k}^{(j+\lambda)/k} g(x) \, dx = \sum_{j=0}^{k-1} \int_0^1 \chi_{\left(\frac{j}{k},\frac{j+\lambda}{k}\right)}(x) g(x) \, dx,$$
but now I'm stuck. I do not understand what the trick is to conclude convergence. The dominated (monotone) convergence theorem cannot be applied, because $\{f_k\}$ does not have a pointwise a.e. limit (neither it is monotone). I tried to make changes of variables but this brings $j$ and/or $k$ in the argument of the integrand and I do not clearly see how to pass to the limit, although I guess that the missing point should be something really elementary that I am not able to see right now. So, how to finish the proof?
 A: Here's a trick: If $g$ is continuous you have $\int_0^1 f_kg\to\int_0^1fg$. Next note that your sequence $f_k$ is bounded in $L^\infty$ and that the continuous functions are dense in $L^1$, so if $g\in L^1$ you have for any $\epsilon>0$ a continuous $\tilde g$ with $\|g-\tilde g\|_1≤\epsilon$, whence:
$$\left|\int (f_k -f)g\ \right| ≤\left|\int (f_k -f ) \tilde g\ \right| + \|f_k-f\|_\infty\cdot\|g-\tilde g\|_1$$
The first term on the right goes to $0$ since $\tilde g$ is continuous. The second term is smaller than $\sup_{k}\|f_k-f\|_\infty\cdot \epsilon$, here the first part is some constant and the $\epsilon$ is arbitrary.
So why does $\int f_k g\to \int f g$ for continuous $g$? Note that $[0,1]$ is compact so any continuous $g$ is uniformly continuous. So for an arbitrary $\epsilon>0$ you have a $\delta$ with $|g(x)-g(y)|≤\epsilon$ for any $|x-y|<\delta$. In particular if you take $k>\frac1\delta$ you have that
$$\int_{j/k}^{(j+\lambda)/k}g(x)dx = \frac{\lambda}{k}\,[g(j/k)+\epsilon\, \tau_j]$$
where $\tau_j$ is some number of modulus $≤1$. If you sum up all these $j$ you get a Riemann sum:
$$\lambda\frac1k\sum_{j} g(j/k) + \epsilon\,\lambda\frac1k\sum_j \tau_j$$
the first sum goes to $\lambda \int_0^1 g$ as $k\to \infty$, the second is bounded by $\epsilon\lambda$, where $\epsilon$ is arbitrary.
