# How do I turn this integral into a summation?

$$\int_{0}^\infty \frac{t^{x-1}}{e^t-1}dx = \sum_{t=1}^\infty f(t,x)$$

According to the definition of reimann sums, $$f(t,x) = \frac{t^{x-1}}{e^t-1}$$ But if I try this, the values that come out of the summation are completely different than they should be. How do I turn the integral into a summation? It works for the gamma function, hence

$$\int_{0}^\infty e^{-t}*t^{x-1}dt = \sum_{t=1}^\infty e^{-t}*t^{x-1}$$

But if it works for the gamma function, it should work for my integral too. How do you find the $f(t,x)$ that will satisfy my first equation?

$$\frac1{e^t - 1} = e^{-t} \frac1{1 - e^{-t}} = e^{-t} \sum_{n=0}^{\infty} e^{-nt}$$
and plug it in. Since the integrand is $\ge 0$ we may use the Lebesgue monotone convergence theorem to swap the integral and sum. Now do a change of variables and you are down to the equation you mentioned at the end.