Simplifying a probability equation? We have a r.v $X$, its density function is $f$ and distribution is $F$, Can we simplify the expression$$\int_0^{\infty}kx^{k-1}[1-F(x)]dx$$
Here's what I did: We do the product inside, and do integral by part, we have:
$$\int_0^{\infty}kx^{k-1}[1-F(x)]dx = \int_0^{\infty}kx^{k-1}dx-\int_0^{\infty}kx^{k-1}F(x)dx$$
For the last part, we do integral by part. \
We denote:$u=F(x)$; $du=f(x)$; $dv=kx^{k-1}$; $v=x^k$\
We have:\
$$\int_0^{\infty}kx^{k-1}F(x)dx=x^kF(x)-\int_0^{\infty}x^kf(x)dx$$
For the last part, we have:
$$\int_0^{\infty}x^kf(x)dx=x^kF(x)-\int_0^{\infty}F(x)kx^{k-1}dx$$
Putting them together, we have:
$$\int_0^{\infty}kx^{k-1}F(x)dx=x^kF(x)-x^kF(x)+\int_0^{\infty}F(x)kx^{k-1}dx$$
And that gives us $0=0$ which is meaningless. I 'm strucking here, That's kind of the only way I can think of, please show me how I can do this problem, any help is appreciated! 
 A: Here's an alternative procedure for obtaining the same result as in Rayna Grayson's answer
\begin{align}
\int_0^\infty kx^{k-1}(1-F(x))dx&= \int_0^\infty kx^{k-1}\int_x^\infty f(y)dydx\\
&= \int_0^\infty\int_0^y kx^{k-1}dxf(y)dy\\
&=\int_0^\infty y^k f(y)dy\ ,
\end{align}
which works as long as $\ kx^{k-1}f(y)\ $ is absolutely Lebesgue integrable over the set $\ \left\{\left.(x,y)\in\mathbb{R}^2\,\right|\,0\le x\le y\right\}\ $.
A: First, note that splitting the integral into $\int_0^{\infty}kx^{k-1}\ dx-\int_0^{\infty}kx^{k-1}F(x)\ dx$ is not valid, because the resulting integrals are both undefined (they approach $\infty$). However the original integral can still converge (if $(1-F(x))$ vanishes faster than $1/x^k$ as $x\rightarrow\infty$). 
Because of this, it is helpful to think of $(1-F(x))$ as a single unit instead of breaking it up. If we do integration by parts on the original integral, we get
$$\int_0^{\infty}kx^{k-1}(1-F(x))\ dx = \left.x^k(1-F(x))\right|_0^\infty-\int_0^\infty x^k(-f(x))\ dx$$
$$=\left.x^k(1-F(x))\right|_0^\infty + \int_0^\infty x^k f(x)\ dx$$
Each of the two resulting terms requires consideration. For the first term:
$$\left.x^k(1-F(x))\right|_0^\infty = \lim_{x\rightarrow\infty} x^k(1-F(x)) - 0^k(1-F(0))$$
$$= \lim_{x\rightarrow\infty} x^k(1-F(x))$$
If $(1-F(x))$ vanishes faster than $1/x^k$, then this term will be $0$. Otherwise the entire integral will be undefined as stated above.
Second term: if the random variable X is constrained to be nonnegative, then the second term is the $k^{th}$ moment of $f$, $\mu_k$. This exists precisely when the first term exists, so we are good.
In summary, the integral is equal to $\int_0^\infty x^k f(x)\ dx$ if $(1-F(x))$ vanishes faster than $1/x^k$, and is undefined otherwise. In addition, if $X$ is nonnegative, then the integral equals $\mu_k$.

Note: in general, applying integration by parts twice does nothing, because the second application will undo the first one:
$$\int u \ dv = uv-\int v\ du = uv -(uv-\int u\ dv)=\int u\ dv$$
so we just get the original expression back. 
