Uniform convergence of a sequence of functions which is integral of another sequence I was going through some questions on pointwise and uniform convergence. Got stuck in one of those which says:
Let $g_n(x) = \sin^2(x+\frac{1}{n})$ be defined on $[0,\infty).$
and $f_n(x) = \int_0^xg_n(t)\,dt.$
I am supposed to discuss about its uniform-convergence of $(f_n).$
The terms are really looking complicated to try it by the definition. Should I first show that $(g_n)$ is uniformly convergent? How am I supposed to do even that?
Help, please.
 A: You have
$$\begin{aligned}g_n(x)&=\sin^2\left(x + \frac{1}{n}\right) = \frac{1}{2}\left(1- \cos\left(2(x + \frac{1}{n})\right)\right)\\
&=\frac{1}{2}\left(1 - \cos 2x \cos\frac{1}{n} + \sin 2x \sin \frac{1}{n}\right).
\end{aligned}$$
Therefore
$$f_n(x)= \frac{1}{2}\left(x - \frac{1}{2}\cos\frac{1}{n}\sin 2x-\frac{1}{2}\sin\frac{1}{n}\left(\cos 2x -1\right)\right).$$
From there, you can prove that $\{f_n\}$ converges uniformly to 
$$f(x) = \frac{x}{2} - \frac{1}{4} \sin 2x$$
as
$$\begin{aligned}\left\vert f_n(x) - f(x) \right\vert &= \frac{1}{4}\left\vert \left(1 - \cos\frac{1}{n} \right)\sin 2x + \sin\frac{1}{n}\left(\cos 2x -1\right)\right\vert\\
&\le \frac{1}{4}\left(\left\vert \left(1 - \cos\frac{1}{n} \right)\sin 2x\right\vert + \left\vert\sin\frac{1}{n}\left(\cos 2x -1\right)\right\vert\right)\\
&\le \frac{1}{4}\left(\left\vert 1 - \cos\frac{1}{n} \right\vert + 2\left\vert\sin\frac{1}{n}\right\vert\right)\\
\end{aligned}$$
and the RHS of above inequality converges to zero independently of $x$.
A: This doesn't have much to do with trig identities, etc. We have a bounded continuous function $h$ on $[0,\infty)$ (for example $h(t)=\sin^2(t)),$ and we define 
$$f_n(x) = \int_{0}^{x} h(t+1/n)\,dt = \int_{1/n}^{x+1/n} h(s)\,ds.$$
Suppose $N\le m < n.$ Then
$$\tag 1 f_m(x) - f_n(x) = \int_{1/n}^{1/m} h(s)\,ds - \int_{x+1/n}^{x+1/m} h(s)\,ds.$$
Let $M$ be the bound on $|h|.$ Then $(1)$ is dominated in absolute value by $2M(1/m-1/n)\le 2M/N.$ This shows $f_n$ is uniformly Cauchy on $[0,\infty),$ hence is uniformly convergent there.
