Is there any trick to finding $\int_0^\pi [4 \cos (6x) + \cos(7x)] \cos(nx) dx$?

I am trying to find $$\int_0^\pi [4 \cos (6x) + \cos(7x)] \cos(nx) dx.$$ for $n \ge 8$. If the integral went from $-\pi$ to $\pi$, the integral would be zero by orthogonality. But alas it starts at $0$.

Is there any way to evaluate this quickly, and avoid doing product - to -sum formulas?


Solution 1:

$$2\int_0^\pi [4\cos(6x)+\cos(7x)]\cos(nx)\, dx = \int_{-\pi}^\pi [4\cos(6x)+\cos(7x)]\cos(nx)\, dx =0$$ by exploiting that $\cos$ is even and orthogonality as you mentioned.