# Products of trigonometric functions with increasing frequencies

I am looking at weighted $L_2$ norms of a class of Littlewood polynomials, related to Walsh and Rademacher functions which made me look for pseudo-closed forms or computationally efficient expressions for $$F_{b_0\cdots b_m}(x):=\prod_{i=0}^m \text{sc}_{b_i}(2^i x)^2$$ where $\{b_i\}$ are binary digits and
\begin{align*}\text{sc}_j(x)=\begin{cases}\sin(x) &\text{ if }\ j=1, \\\\ \cos(x)& \text{ if } \ j=0 \end{cases}\end{align*}

I am looking for a form best suitable for (numerical) integration over a finite interval $[0,a]$ where I will probably have to put in a weight function as well. It is not difficult to use computer algebra to simplify/expand the product when the number of terms is small but I cannot deduce a general form from the expressions that I obtain, say with Mathematica. It is interesting to know if there are answers to similar problems where the exponential $2^i$ growth in the frequencies is replaced by another such as linear or polynomial.

My tries: when the product is entirely composed of cosines, there is a simple closed form that can be obtained for example by using the exponential functions and geometric sum. Also it might be easy to derive algorithmically efficient expressions for the Fourier transform of $F_{b_0\cdots b_m}(x)$ in terms of sums of Dirac delta functions and the Walsh function of Paley order $(b_0\cdots b_m)_2$ but I am not entirely sure they would help me with a definite integral over an arbitrary interval. I have played unsuccesfully with Chebyshev polynomials as well.

This problem is related to our recent work (Eq. ) which is about preserving quantum coherence but I doubt that there is much of a "physics insight" to it.

$2 \sin x \cos x = \sin 2 x,$ so immediately $\prod_{i=k}^n \cos (2^i x) = \frac1{2^{n-k}} \frac{\sin(2^{n+1} x)}{\sin 2^k x}.$ This will simplify away all of the cosines, and some of the sines from your formula. Unfortunately, I don't know anything similar for the product of sines, but just expanding the thing in a fourier series (perhaps after the above simplification) seems quite reasonable.