It is known that,
tan(7x)=tan(2x+5x)
tan7x=tan2x+tan5x1−tan2xtan5x
tan7x−tan7xtan2xtan5x=tan2x+tan5x
tan2xtan5xtan7x=tan7x−tan2x−tan5x
Integrating both sides,
∫(tan2xtan5xtan7x)dx=∫(tan7x−tan2x−tan5x)dx
∫(tan2xtan5xtan7x)dx=17log|sec7x|−12log|sec2x|−15log|sec5x|+c