This is an old problem in a set of qualifier exams in analysis which I have not been able to solve completely; hence my decision to post it here.
The problem have us prove that if $f$ is a measurable complex function on $\mathbb{R}$ of period $T>0$ such that $\int^T_0|f(x)|\,dx <\infty$, then
- (1) $\lim_{n\rightarrow\infty}\frac{f(nx)}{n^2}=0$ almost everywhere.
- (2) As an application of (1), show that $\lim_{n\rightarrow\infty}|\cos nx|^{1/n}=1$.
Part (1) is not very complicated. I consider the series $s(x)=\sum^\infty_{n=1}\frac{|f(nx)|}{n^2}$. Then $$\frac{1}{n^2}\int^T_0|f(nx)|\,dx=\frac{1}{n^3}\int^{nT}_0|f(x)|\,dx=\frac{1}{n^2}\int^T_0|f(x)|\,dx$$ As a consequence, $\int^T_0 s(x)\,dx<\infty$. From this it follows that the series $s(x)$ converges almost everywhere and (1) follows.
Part (2) is where I am struggling, for $f_n(x)=|\cos nx|^{1/n}$ is not quite of the form $n^{-2} g(nx)$ for some periodic function.
I would appreciate any hint to finish part (2) off.
This should do the trick: \begin{align} f(x)=\left\{\begin{array}{lcd}\big(\log(|\cos x|)\big)^2 &\text{for} & x\notin \frac{\pi}{2}\mathbb{Z}\\ 0 &\text{if} & x\in \frac{\pi}{2}\mathbb{Z} \end{array} \right. \end{align} This function has period $\pi$, and is integrable since near $\pi/2$, for $|\cos x|\sim|x-\pi/2|$ as $x\rightarrow\pi/2$. I leave this details to OP.
Notice that $$n^{-2}f(nx)=\big(\log(|\cos nx|^{1/n})\big)^2$$
Comment: According to this posting, $x=\pi - 1$ is a good point, that is a point where the limit $1$ is achieved.