Integral yielding part of a harmonic series Why is this true?
$$\int_0^\infty x \frac{M}{c} e^{(\frac{-x}{c})} (1-e^{\frac{-x}{c}})^{M-1} \,dx = c \sum_{k=1}^M \frac{1}{k}.$$
I already tried substituting $u = \frac{-x}{c}$. Thus, $du = \frac{-dx}{c}$ and $-c(du) = dx$. Then, the integral becomes (after cancellation) $\int_0^\infty c u M e^u (1-e^u)^{M-1}\,du$.
I looked at integral-table.com, and this wasn't there, and I tried wolfram integrator and it told me this was a "hypergeometric integral".
Thanks,
 A: Careful, the substitution changes the limits of integration.  It needs to be the integral going over negative real numbers.
You could just expand $(1-e^u)^{M-1}$ in $$\int_0^{-\infty} c u M e^u (1-e^u)^{M-1}\,du$$ to get 
$$cM \int_0^{-\infty} u \sum_{n=0}^{M-1} \binom{M-1}{n} (-1)^n e^{(n+1)u}du.$$  Rearrange the integral and sum to find 
$$cM \sum_{n=0}^{M-1} \binom{M-1}{n} (-1)^n  \int_0^{-\infty}  u e^{(n+1)u}du.$$  The anti-derivative of $xe^{rx}$ is $\frac{x}{r}e^{rx}-\frac{1}{r^2}e^{rx}$. 
Can you solve it from here?
A: if you substitute $t=1-e^{-x/c}$ your integral becomes
$I_M=-c\int_0^1\log(1-t)Mt^{M-1}dt=-c\int_0^1\log(1-t)(t^M)'dt$. Hence $I_M-I_{M-1}=-c\int_0^1\log(1-t)(t^{M-1}(t-1))'dt=c\int_0^1 t^{M-1} dt$ (by per partes) $=c/M$. So you only need to compute $I_1$, which is $c$. 
(there should be a nicer solution)
A: Suppose that $X_1,\ldots,X_M$ are independent exponential random variables with mean $c$, so that their pdf and cdf are given by $f(x)=c^{-1}e^{-x/c}$ and $F(x)=1-e^{-x/c}$, $x \geq 0$, respectively. Let $Y_M=\max \{X_1,\ldots,X_M\}$. Then, $Y_M$ has cdf $F_M (x) = F(x)^M$ and hence pdf $f_M (x) = M F(x)^{M-1} f(x)$. Thus, the expectation of $Y_M$ is given by
$$
{\rm E}[Y_M ] = \int_0^\infty  {xMF(x)^{M - 1} f(x)dx}  = \int_0^\infty  {x\frac{M}{c}e^{ - x/c} (1 - e^{ - x/c} )^{M-1}dx}. 
$$
So you want to know why
$$
{\rm E}[Y_M] = c\sum\limits_{k = 1}^M {\frac{1}{k}}.
$$
Now, $Y_M$ is equal in distribution to $E_1 + \cdots + E_M$ where the $E_k$ are independent exponentials and $E_k$ has mean $c/k$; for this fact, see James Martin's answer to this MathOverflow question (where $c=1$). The result is thus established.
EDIT: As an additional reference, see Example 4.22 on p. 157 in the book Probability, stochastic processes, and queueing theory by Randolph Nelson.
EDIT: It is interesting to note that
$$
\int_0^\infty  {x\frac{M}{c}e^{ - x/c} (1 - e^{ - x/c} )^{M - 1} dx}  = c\int_0^1 { - \log (1 - x^{1/M} )dx} .
$$
This follows by using a change of variable $x \mapsto x/c$ and then $x \mapsto (1-e^{-x})^M$.
So, this gives the following integral representation for the $M$-th harmonic number $H_M := \sum\nolimits_{k = 1}^M {\frac{1}{k}}$:
$$
H_M = \int_0^1 { - \log (1 - x^{1/M} )dx}. 
$$
Finally, it is both interesting and useful to note note
$$
H_M  = \int_0^1 {\frac{{1 - x^M }}{{1 - x}}dx}  = \sum\limits_{k = 1}^M {( - 1)^{k - 1} \frac{1}{k}{M \choose k}}, 
$$
see Harmonic number.
With the above notation, the right-hand side corresponds to
$$
{\rm E}[Y_M] = \int_0^\infty  {{\rm P}(Y_M  > x)dx}  = \int_0^\infty  {[1 - F_M (x)]dx} .
$$
