Studying some probability theory and I came across this question. Show that if $Y$ is a non-negative random variable, and $p>0$, $$E(Y^p)=\int_{0}^{\infty}px^{p-1}P(Y\geq x)dx$$ I'm a bit stuck on this question: I know that by Markov's inequality, $\frac{E(Y^p)}{y^p}\geq P(Y>y)$ since $Y=\lvert Y\rvert$ here. Also, $y^p=\int_{0}^y px^{p-1}dx$ and I believe these two facts can be used to solve the problem, but I'm not sure how exactly.
Could anyone give me some help, point me in the right direction?