Solution (source code)

= Solution

The same integral works with both powers shifted:
$$
\begin{aligned}
\mathbb E[X^s(1-X)^t]&=\frac{\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)}\int_0^1x^{\alpha+s-1}(1-x)^{\beta+t-1}\,\mathrm dx\\
&=\boxed{\frac{\Gamma(\alpha+\beta)\Gamma(\alpha+s)\Gamma(\beta+t)}{\Gamma(\alpha)\Gamma(\beta)\Gamma(\alpha+\beta+s+t)}}.
\end{aligned}
$$
The assumptions $s>-\alpha$ and $t>-\beta$ say precisely that the exponents at each endpoint are greater than $-1$, ensuring <integrability> there. Values of a negative power at the endpoints themselves can be assigned arbitrarily, because those endpoints have <probability> zero. This establishes the <mixed power moments of a beta distribution> without requiring $s$ and $t$ to be <integers>.<NIST Digital Library of Mathematical Functions/5.12 Beta Function>[NIST DLMF §5.12, equation 5.12.1]{ref}