How to evaluate $\int^\pi_0 \cos((n+1)x)(\cos x)^jdx$ for $j=0,1,...,n$ I have spent quite a time trying to calculate the integral below:
$$∫^π_0 \cos \left(\left(n+1\right)x\right)\left(\cos x\right)^jdx \text{ for } j=0,1,...,n$$
I applied many trigonometric identities, but after some iterations they got out of control.
Any hint is very well appreciated.
Note: I am trying to show it is equal to zero for all $0\leq j \leq n$ and $n\in \mathbb{N}$
 A: If we let $t=\cos x$, then
$$\int_0^{pi}\cos((n+1)x)\cos^jx \,dx=\int_{-1}^1\frac{T_{n+1}(t)t^j}{\sqrt{1-t^2}}=0 \text{ for }0\le j\le n$$
is the statement of the orthogonality of the Chebyshev polynomials $T_n(t)=\cos\left(n\cos^{-1}t\right)$, but perhaps that is what you intended to prove? In that case, recall the $y_n(x)=\cos(nx)$ is the solution to the Sturm-Liouville differential equation
$$y_n^{\prime\prime}(x)+n^2y_n(x)=0,\,\,y_n^{\prime}(0)=y_n^{\prime}(\pi)=0$$
for $m<n$, $\cos(mx)$ also satisfies
$$y_m^{\prime\prime}(x)+n^2y_m(x)=0,\,\,y_m^{\prime}(0)=y_m^{\prime}(\pi)=0$$
Multiply the first equation above by $y_m(x)$, the second by $y_n(x)$ and subtract to get
$$y_n^{\prime\prime}(x)y_m(x)-y_m^{\prime\prime}(x)y_n(x)+\left(n^2-m^2\right)y_n(x)y_m(x)=0$$
Solve for $y_n(x)y_m(x)$ and integrate:
$$\begin{align}\int_0^{\pi}\cos(nx)\cos(mx)dx & =\int_0^{\pi}y_n(x)y_m(x)dt \\ & =\frac1{n^2-m^2}\int_0^{\pi}\left(y_m^{\prime\prime}(x)y_n(x)-y_n^{\prime\prime}(x)y_m(x)\right)dt \\ & =\left.\frac1{n^2-m^2}\left(y_m^{\prime}(x)y_n(x)-y_n^{\prime}(x)y_m(x)\right)\right|_0^{\pi}=0\end{align}$$
Then let $\cos x=\frac{e^{ix}+e^{-ix}}2$ and
$$\cos^jx=\frac1{2^j}\sum_{k=0}^j{j\choose k}e^{i(2k-j)x}=\frac1{2^j}\sum_{k=0}^j{j\choose j-k}e^{i(j-2k)x}=\frac12\frac1{2^j}\sum_{k=0}^j{j\choose k}\left(e^{i(2k-j)x}+e^{-i(2k-j)x}\right)=C\cos(0x)+\sum_{k=1}^jA_k\cos(kx)$$
Then it follows immediately that
$$\int_0^{\pi}\cos((n+1)x)\cos^jx\,dx=0$$
for $0\le j\le n$
A: A simple solution by induction. All the integrals below are from $0$ to $\pi$.
Let $k\in \mathbb N$. Assume that for all $ 0 \le i < k$, it has been proven that if $n > i$, then $\int \cos nx (\cos x)^i = 0$. The base case $i=0$ is clear.
Now consider the case  $i=k$. Let $n$ be any integer such that $n>k$. Let $T_n(x)$ be the $n$-th Chebyshev polynomial. So, $T_n( \cos x) = \cos (nx)$.
Then, $x^{k-1} T_{n+1} (x) = 2 x^k T_n(x) - x^{k-1} T_{n-1} (x)$. (*)
By induction, $\int \cos ((n+1) x) \cos x^{k-1} = 0$ and $\int \cos ((n-1) x) \cos x^{k-1} = 0$.
Therefore, by (*), $ \int \cos (nx) \cos x^{k} = 0$.
Note: Using the method above, we obtain the following:


*

*$\int  \cos nx (\cos x)^n = \frac{\pi} {2 ^{n}}$

*$\int \cos nx (\cos x)^{n+2k+1} = 0$, $\forall k \ge 0$

