I was solving a physics problem and I encountered to find the sum the function $xe^{-kx}$ where for all positive values of $x$ (i.e. from 0 to infinity) Is there any way to do that?
I speculate that the sum will be equal to the integral of function with same limits. If it is true, can you please give me an idea of how does it relate to integrals. If I am right its not the Riemann sum form because that involves multiplication with "${\rm d}x$"


It should be $$\int_0^{\infty}xe^{-kx}dx=-\left.\frac{x}{k}e^{-kx}\right]_0^{\infty}+\frac{1}{k}\int_{0}^{\infty}e^{-kx}dx=\frac{1}{k^2}$$ which can be seen by integration by parts and De L´Hospital´s rule.