Suppose $$f(x)=\sum_{k=0}^\infty (-1)^k x^{2k} \int_0^1 p(\xi_{2k})\int_0^{\xi_{2k}}q(\xi_{2k-1})\cdots\int_0^{\xi_3}p(\xi_2)\int_0^{\xi_2}q(\xi_1) d\xi_1 \;d\xi_2\cdots d\xi_{2k-1}\;d\xi_{2k},$$ where $p,q\in C^\infty([0,1],[0,1])$. Is it possible to write $f(x)$ as an integral/ infinite sum of cosine functions in $x$?
Note that if $p=q$, then we know $$f(x)=\cos[\left(\int_0^1 p(\xi)d\xi\right)x].$$