<s>[INST] >Does $\{f_n\}$ converge pointwise to a function on $[0,\infty)?$ Let $g_n(x)=\sin^2(x+\frac{1}{n}),x\in (0,\infty)$
and $f_n(x)=\int _0^x g_n(t)\, dt$.

Does $\{f_n\}$ converge pointwise to a function on $[0,\infty)?$

I  try to show that $$\int_0^x \sin^2\left(t +\frac1n\right) \, dt = \frac{x}{2} - \frac{1}{4}\sin\left(2x+\frac2n\right) + \frac{1}{4} \sin \left(\frac2n\right),$$
and
$$\int_0^x \sin^2(t) \, dt = \frac{x}{2} - \frac{1}{4}\sin(2x) .$$
Hence,
$$|f_n(x) - f(x)| \leqslant \frac{1}{4}\left|\sin\left(2x+\frac2n\right) - \sin(2x) \right|+ \frac{1}{4} \left|\sin\left(\frac2n\right)\right| \leqslant \frac{1}{2n} + \frac{1}{4}\left|\sin\left(\frac2n\right)\right|$$
We have uniform convergence on $[0,\infty)$.
From this proof i can  conclude that  $\{f_n\}$  doesnot converge pointwise to a
function  $f$ on $[0,\infty)$.   so My answer is no.......IS it correct ?
 [/INST] You have correctly calculated $f_n$. Now just let $n\to\infty$:
$$f_n(x) = \frac{x}{2} - \frac{1}{4}\sin\left(2x+\frac{2}n\right) + \frac{1}{4} \sin \left(\frac2n\right)= \frac{x}2 - \frac{1}2\cos\left(x+\frac2n\right)\sin x \xrightarrow{n\to\infty} \frac{x}2 - \frac12\cos x\sin x$$
So, 
$$\lim_{n\to\infty} f_n(x) =  \frac{x}2 - \frac12\cos x\sin x = \frac{x}2 - \frac14\sin(2x) = \int_0^x \sin^2 t\,dt$$
is the poinwise limit of the sequence $(f_n)_{n=1}^\infty$.

Another way to see this is to use the Lebesgue Dominated Convergence Theorem. Functions $f_n$ are bounded by the integrable function $1$ so we can interchange the limit and the integral:
$$\lim_{n\to\infty} f_n = \lim_{n\to\infty}\int_0^x \sin^2 \left(t+\frac1n\right)\ dt =\int_0^x \lim_{n\to\infty} \sin^2 \left(t+\frac1n\right)\ dt = \int_0^x \sin^2 t \ dt$$
</s>