The textbook, "Mathematics for Physical Chemistry - Opening doors" (McQuarrie), solves this example excercise as follows:
And is the case for n =/= m which I'm troubled with, because, if I solve the integral instead of using the cycles argument, I get that:
And I can't see how this is equal...