Analytic formula for integral $I_p(\theta) := \int_0^{2\pi}\cos(t)^p\cos(t-\theta)^pdt$ Let $p$ be a nonnegative integer and $\theta \in [0, \pi]$.

Question. What is an analytic formula for the integral $I_p(\theta) := \int_0^{2\pi}\cos(t)^p\cos(t-\theta)^pdt$ ?

Note. My ultimate goal is to compute $I_p(1)$, $I_p(0)$, $I_p'(0)$, and $I_p''(0)$.
My guess is everything can be succinctly expressed in terms of special functions (gamma, beta, etc.).
 A: Amazingly, I found this kind of integrals in my old (65 years old !) cookbook.
The idea is to write
$$\cos (t) \cos (t-\theta )=\frac{1}{2} (\cos (\theta )+\cos (2 t-\theta ))$$ and to use the binomial expansion when you raise it to power $p$.
$$I_p(\theta)= \int_0^{2\pi}\big[\cos(t)\,\cos(t-\theta)\big]^p\,dt=  4^{1-p}\,\pi \,J_p(\theta)$$
Now, the first results
$$\left(
\begin{array}{cc}
 p & J_p(\theta) \\
 1 & \cos (\theta ) \\
 2 & 2+\cos (2 \theta ) \\
 3 & 9 \cos (\theta )+\cos (3 \theta ) \\
 4 & 18+16 \cos (2 \theta )+\cos (4 \theta ) \\
 5 & 100 \cos (\theta )+25 \cos (3 \theta )+\cos (5 \theta ) \\
 6 & 200+225 \cos (2 \theta )+36 \cos (4 \theta )+\cos (6 \theta )\\
 7 & 1225 \cos (\theta )+441 \cos (3 \theta )+49 \cos (5 \theta )+\cos (7 \theta )
   \\
 8 &2450+ 3136 \cos (2 \theta )+784 \cos (4 \theta )+64 \cos (6 \theta )+\cos (8 \theta
   ) \\
 9 & 15876 \cos (\theta )+7056 \cos (3 \theta )+1296 \cos (5 \theta )+81 \cos (7
   \theta )+\cos (9 \theta )
\end{array}
\right)$$ The patterns (for odd and even values of $p$) seem to be quite clear.
