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$?
Proposition. Let $f:[0,1]\to\Bbb R$ be a continuously differentiable function such that $f’(x)\ne 0$ for each $x\in [0,1]$. Then $\lim_{n\rightarrow \infty} \int_0^1 |\cos(nf(x))|dx=\tfrac {2}\pi.$
Proof. Since $f’$ is a continuous function on a compact set $[0,1]$, it is uniformly continuous and $\ell=\inf \{|f’(x)|:x\in [0,1]\}>0$. Fix any $\varepsilon>0$. Since $f’(x)$ is uniformly continuous, there exists a natural number $N$ such that $|f’(y)-f’(x)|\le \varepsilon$ for any $x,y\in [0,1]$ such that $|y-x|\le\tfrac \pi{N\ell}$.
Let $n\ge N$ be any natural number. Put $X_n=\left\{x\in [0,1]:nf(x)\in \tfrac \pi2+\pi\Bbb Z \right\}$. Since $\ell>0$, $f$ is strictly monotonic, so the set $X_n$ is finite. Let $x_1<x_2<\dots<x_m$ be an enumeration of $X_n$. Put $x_0=0$ and $x_{m+1}=1$. Then $x_{i+1}-x_i\le\tfrac \pi{n\ell}$ for each $i=0,\dots m$. Put $I_i=\int_{x_i}^{x_{i+1}} |\cos(nf(x))|dx$.
Then $I=\int_0^1 |\cos(nf(x))|dx=\sum_{i=0}^m I_i$. Clearly, $|I_0|, |I_m|\le \tfrac \pi{n\ell}$. Let $i$ be any integer from $1$ to $m-1$. By Lagrange’s theorem there exists $z\in (x_i, x_{i+1})$ such that $\tfrac {f(x_{i+1})-f(x_i)} {x_{i+1}-x_i}=f’(c)$. For each $y\in [x_i, x_{i+1}]$ put $g(y)=f(y)-f(x_i)-(y-x_i)f’(c).$ It is easy to check that $g(x_i)=0$ and for each $y$ $$|g’(y)|=|f’(y)-f’(c)|\le\varepsilon.$$ By Lagrange’s theorem, there exists $z\in (x_i, y)$ such that
$$|g(y)|=|g(y)-g(x_i)|=|g’(z)|(y-x_i) \le \varepsilon\frac \pi{n\ell}.$$ Again by Lagrange’s theorem, there exists $d$ between $f(y)$ and $(f(x_i)+(y-x_i)f’(c))$ such that
$$|\cos (nf(y))-\cos n(f(x_i)+(y-x_i)f’(c))|=n|\sin nd|| f(y)- f(x_i)-(y-x_i)f’(c)|\le n |g(y)|\le \varepsilon\frac \pi{\ell}.$$
We have $|I_i- I_i’|\le I_i’’$, where $I’_i=\int_{x_i}^{x_{i+1}} |\cos n(f(x_i)+(y-x_i)f’(c))| dy $ and $$I_i’’=\int_{x_i}^{x_{i+1}} |\cos (nf(y))-\cos n(f(x_i)+(y-x_i)f’(c))| dy\le \int_{x_i}^{x_{i+1}} \varepsilon\frac \pi{\ell} dy\le (x_{i+1}-x_i) \varepsilon\frac \pi{\ell}.$$
Let us calculate $I’_i$. We see that $h(y)=f(x_i)+(y-x_i)f’(c)$ is a linear function such that $h(x_i)=f(x_i)$ and $$h(x_{i+1})= f(x_i)+(x_{i+1}-x_i)\tfrac {f(x_{i+1})-f(x_i)} {x_{i+1}-x_i}=f(x_{i+1})=f(x_i)\pm \frac {\pi}n,$$
by the construction of the sequence $(x_j)$. Since the primitive of $\cos n h(y)$ is $\frac 1{n f’(c)}\sin n h(y)$, we have
$$I’_i=\int_{x_i}^{x_{i+1}} |\cos n h(y)| dy=\left|\int_{x_i}^{x_{i+1}} \cos n h(y) dy \right|= \left|\frac 1{n f’(c)}\sin n h(y){\Huge|}_{x_i}^{x_{i+1}}\right|=\left|\frac 2{n f’(c)}\right|=\frac {2(x_{i+1}-x_i)} {\pi}.$$
We have $$\left|\sum_{i=1}^{m-1} I_i-\sum_{i=1}^{m-1} I’_i\right|\le \sum_{i=1}^{m-1} \left| I_i- I’_i\right|\le \sum_{i=1}^{m-1} I’’_i\le \sum_{i=1}^{m-1} (x_{i+1}-x_i) \varepsilon\frac \pi{\ell}=(x_{m}-x_1) \varepsilon\frac \pi{\ell}\le \varepsilon\frac \pi{\ell} .$$
But $$\sum_{i=1}^{m-1} I’_i=\sum_{i=1}^{m-1} \frac {2(x_{i+1}-x_i)} {\pi}=\frac {2(x_{m}-x_1)}{\pi}$$
Since $\varepsilon$ can be chosen arbitrarily small, and $\left| \frac {2(x_{m}-x_1)}{\pi}-\frac 2{\pi}\right|\le \frac 2{\pi}\cdot \frac\pi{n\ell}=\frac 2{n\ell},$ the proposition follows. $\square$