# $E[X^k]$ and $E[(XY)^k]$

Let $$X$$ and $$Y$$ be two independent uniformly distributed random variables on $$[0, 1]$$. Show that $$E[X^k] = \frac{1}{k+1}$$ and $$E[(XY)^k] = \frac{1}{(k+1)^2}$$.

For the first part, I used $$M_{X}(t) = \frac{e^t-1}{t} = 1+t\left( \frac{1}{2}\right)+\frac{t^2}{2!}\left( \frac{1}{3}\right)++\frac{t^3}{3!}\left( \frac{1}{4}\right)+...$$ and compared this to $$M_{X}(t) = E[e^{tX}] = 1+tE[X]+\frac{t^2}{2!}E[X^2]+...$$. How valid is it to compare two sums like this? Is there another approach (which is maybe better)?

For the second part, it just got me thinking: is $$(XY)^k = X^kY^k$$ for $$X, Y$$ independent only?

You definitely can compare this way at least if they converge in some neighbor of $$0$$ - for example, if they are equal, then $$n$$-th derivatives at $$0$$ are also equal, and this derivatives are exactly coefficients multiplied by the same constant.
For the second part - $$(XY)^k = X^k Y^k$$ for any $$X$$, $$Y$$ (as multiplication is commutative), but $$\mathbb{E}[XY] = \mathbb{E}[X] \cdot \mathbb{E}[Y]$$ doesn't hold in general if $$X$$ and $$Y$$ are not independent.