<s>[INST] Is there a way to simplify $\prod_{i=1}^n\cos(a^i\theta)$, where $a<1$? I recently came upon the following expression in an attempt at getting a closed-form solution for a recursive relation:
$$\prod_{i=1}^n \cos(a^i\theta)$$
where $a<1$. Is there a way to make this product into a sum or otherwise make it simpler, or approximate it? In particular for the problem I was looking at, $a$ was $\frac{3}{4}$ and $\theta$ was $\frac{\pi}{4}$. Thanks!
 [/INST] from
$$
\cos z = {{e^{\,i\,z}  + e^{\, - \,i\,z} } \over 2} = {1 \over 2}e^{\,i\,z} \left( {1 + e^{\, - \,i\,2z} } \right)
$$
we get
$$
\eqalign{
  & \ln \cos z = \ln {1 \over 2} + i\,z + \ln \left( {1 + e^{\, - \,i\,2z} } \right) =   \cr 
  &  = \ln {1 \over 2} + i\,z + \ln \left( {1 + 1 - i2z - 2z^2  + O\left( {z^3 } \right)} \right) =   \cr 
  &  = \ln {1 \over 2} + i\,z + \ln \left( {2\left( {1 - iz - z^2  + O\left( {z^3 } \right)} \right)} \right) =   \cr 
  &  = \ln {1 \over 2} + i\,z - \ln 2 - iz - {{z^2 } \over 2} + O\left( {z^3 } \right) =   \cr 
  &  =  - {{z^2 } \over 2} + O\left( {z^3 } \right) \cr} 
$$
Therefore we can say that
$$
\eqalign{
  & \ln P(x,a,n) = \ln \prod\limits_{k = 1}^n {\cos (a^{\,k} x)}  = \sum\limits_{k = 1}^n {\ln \cos (a^{\,k} x)}  =   \cr 
  &  =  - {1 \over 2}\sum\limits_{k = 1}^n {\left( {x^{\,2} a^{\,2k}  + O\left( {a^{\,3k} x^3 } \right)} \right)}  =  - {{x^{\,2} a^{\,2} } \over 2}{{1 - a^{2n} } \over {1 - a^{\,2} }} + O\left( {a^{\,3} x^3 } \right) \cr} 
$$
</s>