TITLE: Oscillatory integral with absolute value
QUESTION [8 upvotes]: Suppose $f:[0,1]\to[0,+\infty)$ is a continuous function. Are there general conditions under which the following limit exists?
$$\lim_{n\rightarrow \infty} \int_0^1 |\cos(nf(x))|dx$$
Obviously if $f$ is a constant that is not an integer multiple of $\pi$ the limit does not exist. Does the limit exist if $f'(x)\neq 0$ for all $x \in [0,1]$? If so, what if we drop differentiability and only require $f$  not be locally constant?
When $f$ is not differentiable, can one still show
$$\liminf_{n \rightarrow \infty} \int_0^1 |\cos(nf(x))|dx >0$$
under suitable conditions on $f$?

REPLY [3 votes]: We can generalize and perhaps gain some insight. I'll start with a generalization of the Riemann Lebesgue lemma (GRLL):
GRLL: Suppose $g$ is continuous and periodic on $\mathbb R,$ with period $p>0.$ Let $f$ be continuous on $[a,b].$ Then
$$\lim_{n\to \infty} \int_a^b g(nx)f(x)\,dx = \frac{\int_0^p g(x)\,dx }{p}\cdot\int_a^b f(x)\,dx.$$
This is not too hard to prove; I'll omit the proof for now.
Corollary: Assume in addition that $f\in C^1[a,b]$ and $f'$ is nonzero in $[a,b].$ Then
$$\tag 1 \lim_{n\to \infty}\int_a^b g(nf(x))\,dx = \frac{(b-a)}{p}\int_0^p g.$$
Proof: On the left side of $(1),$ let $x=f^{-1}(y).$ We get
$$\tag 2 \int_a^b g(nf(x))\,dx = \int_{f^{-1}(a)}^{f^{-1}(b)} g(ny)\frac{1}{f'(f^{-1}(y))}\,dy.$$
Apply GRLL to the right side of $(2)$ to get
$$\tag 3\frac{\int_0^p g(x)\,dx }{p}\int_{f^{-1}(a)}^{f^{-1}(b)}\frac{1}{f'(f^{-1}(y))}\,dy.$$
Now let $y=f^{-1}(z)$ to see $(3)$ equals the right side of $(1).$ The proof of the Corollary is complete.
Let's compare this result with Alex Ravsky's, where we have $g(y)=|\cos y|$ and $a=0,b=1.$ Here $g$ has period $\pi.$ The Corollary gives
$$\frac{1-0}{\pi}\int_0^\pi |\cos x|\,dx =  \frac{1}{\pi}\cdot 2 = \frac{2}{\pi}$$
for the answer, which agrees with Ravsky.
I believe we can extend these results further: Again suppose $f\in C^1$ but this time we assume only $m(\{x\in [a,b]: f'(x)=0\})=0.$ Then we get the same answer:
$$ \lim_{n\to \infty}\int_a^b g(nf(x))\,dx = \frac{(b-a)}{p}\int_0^p g.$$
I'll leave this unproven at the moment as time is slipping by.