Here is the problem definition:

s and m are independent variables, and both have a multinomial distribution with given parameters and respectively:

Dirichlet priors are defined for and with parameters and respectively:

I need to solve this integral over and values to integrate them out:

Can anybody please help me solving this integration?

Dirichlet distribution is conjugate for Multinomial and easy to find the result for one parameter:

However, with two parameters I could not solve the integration. If anybody has got even a small idea, I would be very grateful. It is really crucial for my research. And if you have an idea, if it is possible to separate the integral in two parts, and calculate two integrals separately, can you please let me know, so I can solve two integrals separately.

Thank you very much in advance.