I'm stuck in this problem:
Let $\lambda \in(0,1),$ and $a, b \in \mathbf{R},$ and $h: \mathbf{R} \rightarrow \mathbf{R}$ be the periodic extension of the function $$ h(x)=\left\{\begin{array}{ll} a & \text { if } 0 \leq x<\lambda \\ b & \text { if } \lambda \leq x<1 \end{array}\right. $$ and define $g_{n}:[0,1] \rightarrow \mathbf{R}$ by $g_{n}(x)=h(n x) .$ For each $\varphi(x) \in C^{1}[0,1],$ prove the convergence of $$ \lim _{n \rightarrow \infty} \int_{0}^{1} g_{n}(x) \varphi(x) d x $$ I don't even know where to start.
Let $A=\int_0^{1} h(t)dt$. The required limit is $\phi(1) A-\int_0^{1} x\phi'(x)dx$. First integrate by parts: $\int g_n(x)\phi(x) dx=G_n(x)\phi (x)dx|_0^{1}-\int_0^{1} G_n(x) \phi '(x)dx$ where $G_n(x)=\int_0^{x} g_n(x)dx =\frac 1n \int_0^{nx} h(t)dt$. Next check that $G_n(x) \to x A$ for each $x$ and that $\frac 1n \int_0^{n} h(t)dt$ is uniformly bounded. By DCT we see that the limit is $\lim G_n(1)\phi (1)-\int_0^{1} x \phi '(x)dx$. But $G_n(1)=\frac 1n\int_0^{n} h(t)dt=A$ for each $n$