I have to determine the convergence of the following product (here $p,q\in\Bbb R$). $$ \prod\limits_{n=1}^{\infty}\left(1+\frac{x^n}{n^p}\right)\cos\frac{x^n}{n^q} $$
Denote $a_n=\left(1+\frac{x^n}{n^p}\right)\cos\frac{x^n}{n^q}$. If $|x|<1$, then it's easy to see that this product is convergent.
The main problem is how to deal with the case $|x|\geq 1$. Let's first consider case $x=1$. Then, $$ a_n=\left(1+\frac{1}{n^p}\right)\cos\frac{1}{n^q} $$
If $p$ and $q$ are positive, then the product is convergent iff $\min\{p,2q\}>1$ (it can be shown using standard approaches; $\ln a_n=\frac{1}{n^p}+o\left(\frac{1}{n^p}\right)-\frac{1}{2n^{2q}}+o\left(\frac{1}{n^{2q}}\right)$ when $n\to\infty$). However, it's not clear what's happening if $q<0$ because of the unpredictable behaviour of $\cos\frac{1}{n^q}$ if $q<0$. Similar problem appears if $|x|>1$ (behaviour of $\cos\frac{x^n}{n^q}$ if $n\to\infty$).
I think that in both cases the product is divergent, but I don't know how to prove that. So, how we should deal with this cases?
Remark. If $x=\pm 1$ and $-q\in\Bbb N$, then it's known that fractional part $\{\frac{n^{-q}}{2\pi}\}$ is equidistributed on $[0,1)$ (due to Weyl's equidistribution criterion), so $\cos n^{-q}$ changes sign infinitely many times, so $\lim\limits_{n\to\infty}a_n\neq 1$. Hence, the product is divergent. I wonder if this approach can be extended.