This is one integration problem I encountered during the calculation of Bayes factor between two models given data $D$
One of the model, $M_0$ assumes the data accords to multinomial distribution, with the parameter $(\theta_1, \theta_2, \dots, \theta_k)$ and $\sum_{i=1}^k\theta_i= 1$.
Also we assume Dirichlet distribution for the prior, $\mathrm{Dir}(\alpha_1, \alpha_2, \dots,\alpha_k)$.
Now we want to calculate the marginal posterior $\mathrm{P}(D|M_0)$, which is proportional to
$\int_0^1(\prod_{i=1}^k \theta_i^{n_i + \alpha_i - 1}) \mathrm{d}(\theta_1\theta_2\dots \theta_k)$
I am stuck here, how to calculate this integral, which is subject to $\sum_{i=1}^k\theta_i= 1$?