How to simplify trigonometric functions with having higher multiples of $x$ if the function is complex? $$ \int \frac{(\cos 9x + \cos6x)}{2 \cos 5x - 1} dx $$
I know that it simplifies to $ \cos x + \cos 4x $ but I have no idea how to do that. I tried expanding $\cos 9x $ and $\cos 6x$ by using the formulas for $\cos 3x$ and $\cos 2x$. There is nothing i could think to simplify the $\cos 5x$ in the denominator

How to proceed while simplifying larger multiples to lower.

Is the any other way than simplifying the expression to calculate the integral?
 A: Using Euler formula: $\cos x = 1/2 \times (e^{ix}+e^{-ix})$
$\cos 9x + \cos 6x = 1/2\times (e^{9ix}+e^{-9ix}+e^{6ix}+e^{-6ix}) \\
= 1/2 \times  (e^{6ix}+e^{4ix}+e^{9ix}+e^{ix}+e^{-4ix}+e^{-6ix}+e^{-ix}+e^{-9ix}-e^{ix}-e^{-ix}-e^{4ix}-e^{-4ix} )\\= 1/2 \times (e^{5ix}+e^{-5ix}-1)(e^{ix}+e^{-ix}+e^{4ix}+e^{-4ix}) = (2\cos 5x-1)(\cos x + \cos 4x)$
A: Using the "sums-to-products" formula
$$\cos(A+B)+\cos(A-B)=2\cos A\cos B$$
we have
$$\eqalign{
  \cos9x+\cos6x
  &=\cos(5x+4x)+\cos(5x-4x)-\cos x\cr
  &\qquad\qquad\qquad+\cos(5x+x)+\cos(5x-x)-\cos4x\cr
  &=2\cos5x\cos4x-\cos4x+2\cos5x\cos x-\cos x\cr
  &=(2\cos5x-1)(\cos x+\cos4x)\ .\cr}$$
A: If your simplification is correct then best option is to simplify down to $\cos x $ and $\sin x $.
$\cos 9x = \cos (3 \times (3x)) \; \& \cos 6x = \cos(3 \times (2x)) .$
And $\cos 5x = \cos (2x+3x) .$  
A: $$cos(9x)+cos(6x)$$
$$=cos(10x-x)+ cos(5x+x) $$
$$=cos(x) cos(10x) + sin(10x) sin(x) + cos(5x)cos(x) - sin(x)sin(5x)$$
$$=cos(x)[2cos^2 (5x) - 1+cos(5x) ]+ sin(x) [2sin(5x)cos(5x) - sin(5x)]$$
$$=cos(x)(2cos(5x)-1)(cos(5x)+1) +sin(x)(sin(5x)(2cos(5x)-1)$$
The denominator cancels and you should be able to take it from here.
