Show that $\int_{0}^{n^{-1/3}} \frac{\sin(x)}{1+\cos(nx) \cos(x)}\ dx =O(n^{2/3})$. I want to show that $\int_{0}^{n^{-1/3}} \frac{\sin(x)}{1+\cos(nx) \cos(x)}\ dx =O(n^{2/3})$. So, we need to prove
$$ \exists M>0, \ \exists N \in \mathbb{N} \ s.t. \ \forall n \geq N, 
\int_{0}^{n^{-1/3}} \frac{\sin(x)}{n^{2/3}(1+\cos(nx) \cos(x))}\ dx \leq M.
$$
My idea was to try to show $ \frac{\sin(x)}{1+\cos(nx) \cos(x)} = O(n)$.
We note that $ \cos(x)>0 $ over $[0,n^{-1/3}] $. So 
$$
\frac{\sin(x)}{n(1+\cos(nx) \cos(x))} \leq \frac{\sin(x)}{n(1- \cos(x))}.
$$
Writing the Maclaurin's expansion of $ \sin(x) $ and $ \cos(x) $, we have
$$
\frac{\sin(x)}{n(1+\cos(nx) \cos(x))} \leq \frac{1}{nx} \cdot \frac{1-x^2/3! +O(x^4)}{1-x^2/4! +O(x^4)}.
$$
I got stuck at this point, so any help is really appreciated.
 A: We can safely replace $\sin(x)$ with $x$, and the main issue is just to show that $\cos(nx)\cos(x)$ cannot be too often too close to $-1$ on the interval $(0,n^{-1/3})$. The initial zeros of $\cos(nx)\cos(x)$ occur at a distance equal to $\frac{\pi}{n}$ from each other, hence $\frac{\pi}{n}$ is the approximate location of the first point such that $\cos(nx)\cos(x)\approx -1$ and we have approximately $\frac{1}{\pi} n^{2/3}$ troubling points in $(0,n^{-1/3})$. On the other hand, if $\cos(x)\cos(nx)$ attains a local minimum we have
$$ -\sin(x)\cos(nx)-n\cos(x)\sin(nx) = 0 $$
hence $1+\cos(x)\cos(nx)\approx\frac{C}{n^2}$. In such a case $\left(1+\cos(x)\cos(nx)\right)^{-1}$ is large , but we can still bound the original integral through
$$ O\left(\frac{1}{n}\right)+\sum_{k=1}^{\frac{1}{\pi}n^{2/3}}\int_{\frac{\pi k}{n}-\frac{\pi}{2n}}^{\frac{\pi k}{n}+\frac{\pi}{2n}}x\cdot\frac{n^2}{C}\,dx =O\left(\frac{1}{n}\right)+\sum_{k=1}^{\frac{1}{\pi}n^{2/3}}\frac{k\pi^2}{C}=O\left(n^{\color{red}{4}/3}\right).$$
This is a crude bound, since $\frac{1}{1+\cos(x)\cos(nx)}$ is as large as $\frac{n^2}{C}$ only at the very first problematic point. At the second problematic point we have a contribution $\approx\frac{n^2}{9C}$, at the third one $\approx\frac{n^2}{25 C}$ and so on. Keeping this into account, we have that the original integral is $\color{red}{O(\log n)}$.

This might be is useful also for proving that
$$ \lim_{n\to +\infty}\int_{0}^{\pi/2}\frac{\sin x}{1+\cos(nx)\cos(x)}\,dx = \frac{\pi}{2} $$
as numerical experiments suggest. This can be shown in the following informal manner: for a fixed $m$, the limit $\lim_{n\to +\infty}\int_{0}^{\pi/2}\sin(x)\cos^m(x)\cos^m(nx)\,dx$ equals zero if $m$ is odd and $\binom{m}{m/2}\frac{1}{(m+1)2^m}$ if $m$ is even, due to the Fourier cosine series of $\cos(nx)^m$ and the Riemann-Lebesgue lemma. In particular
$$ \lim_{n\to +\infty}\int_{0}^{\pi/2}\sum_{m\geq 0}\sin(x)(-1)^m\cos^m(x)\cos^m(nx)\,dx $$
equals
$$ \sum_{m\geq 0}\lim_{n\to +\infty}\int_{0}^{\pi/2}\sin(x)(-1)^m\cos^m(x)\cos^m(nx)\,dx =\sum_{k\geq 0}\frac{\binom{2k}{k}}{(2k+1)4^k}=\left.\frac{\arcsin x}{x}\right|_{x=1}=\frac{\pi}{2}$$
but in order to justify $\lim\int\sum=\sum\lim\int$ we need to invoke the dominated convergence theorem twice. One of these times it is pratical to exploit what we have already studied about the behaviour of the integrand function in a neighbourhood of the problematic points for which $\cos(x)\cos(nx)\approx -1$.
A: Update. This solution is wrong!
This is not an answer, just a long comment.
@JackD'Aurizio First, some questions I will be happy if you can explain more:


*

*How you get $ 1+\cos(x)\cos(nx)\approx\frac{C}{n^2} $?

*As you showed $\int_{0}^{\pi/2}\frac{\sin x}{1+\cos(nx)\cos(x)}\,dx =O(1)$, so how is it possible on the smaller interval $ [0,n^{-1/3}] $ we get 
$$ \int_{0}^{n^{-1/3}} \frac{\sin(x)}{1+\cos(nx) \cos(x)}\ dx =\color{red}{O(\log n)} ?$$ I guess there should be $ a \in [0,1] $ such that the integral equals $ O(n^{-a}) $ since numerically the values of the integral are decreasing.


As you mentioned, we don't have any issues on the intervals 
$$ [0,\frac{\pi}{2n}],[\frac{3\pi}{2n},\frac{5\pi}{2n}], \ldots, [\frac{(4k-1)\pi}{2n},\frac{(4k+1)\pi}{2n}]
$$
since $ \cos(nx) $ is non-negative and $ \frac{\sin(x)}{1+\cos(nx) \cos(x)} \leq x $.
For the other intervals, I've got an idea, so please let me know if you see any mistakes. Since $\cos(x) \cos(nx) \neq -1$ using Maclaurin's expansion we get
$$
\frac{\sin(x)}{1+\cos(nx) \cos(x)}=\frac{x}{2}+(\frac{1}{24}+\frac{1}{8}n^2)x^3 + (\frac{1}{240}-\frac{1}{48}n^2+\frac{1}{48}n^4)x^5+O(x^7). 
$$
Since $\frac{\pi}{n}$ is the approximate location of the first local maximum in the first interval, namely $[\frac{\pi}{2n},\frac{3\pi}{2n}]$, we get 
$$
\frac{\sin(x)}{1+\cos(nx) \cos(x)} \approx \frac{\pi}{2n}+(\frac{1}{24}+\frac{1}{8}n^2) ({\frac{\pi}{n}})^3 + (\frac{1}{240}-\frac{1}{48}n^2+\frac{1}{48}n^4)({\frac{\pi}{n}})^5 \approx \frac{c}{n}.
$$
At the second local maximum, we have a contribution $\approx \frac{c}{3n}$ and so on.
Do you think this argument works?
