Hence, it suffices to show this on a dense subclass of L2(R), so without loss of generality, we may assume that f is a step function. Moreover, by linearity of the problem, we may assume without loss of generality that f=χ[a,b] for some 0≤a<b≤2π. Then by direct calculation,
∫abcos(nt)dt=nsin(nb)−sin(na)n→∞0,
so f converges to 0 everywhere. For the second claim, observe first that
which is essentially an uniform integrability condition. Observe that (∗) holds for any f∈L2(R). Let ε>0, and let R>0 be so large so that ∥∥fχB(0,R)c∥∥L2<ε. By absolute continuity, there exists δ>0 such that if m(E)<δ, then ∥fχE∥L2<ε. Since fn→0 on B(0,R), Egorov's theorem gives E⊆B(0,R) such that fn→0 uniformly on B(0,R)∖E and so that m(E)<δ. In particular, for n large, we have ∣fn∣≤2Rε on B(0,R)∖E. Hence, applying (∗) to fχE and fχB(0,R)c, we get