Sorry, small mistake there
fofofo..f(x) r times is x/(1+rxn)1/n
So, fofofo..f(x) n times is x/(1+nxn)1/n
Hence xn-2 g(x) = xn-1/(1+nxn)1/n = 1/n2 n2xn-1/(1+nxn)1/n
Now if 1+nx
n = t, then the integ is

dt/t
1/n = (1-1/n) t(1-1/n)
So, the answer is 1/n2 (1-1/n) (1+nxn )(1-1/n)