Noticing that tan(5x) = tan(3x+2x) we use the tan compound angle formula to find tan(5x) = (tan(2x)+tan(3x))/(1-tan(2x)tan(3x)) and thus tan(5x)tan(3x)tan(2x) = tan(5x)-tan(3x)-tan(2x). From then we can integrate the parts of the sum individually as normal. Remembering that if F(x) = integral of f(x) dx then the integral of f(ax) dx = 1/a F(ax)