<s>[INST] 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.
 [/INST] 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$.
</s>