# Limits of integration for marginal posterior distribution

Suppose $X_{i}|\theta_{i} \sim$ $f_{1}(\theta_{i},t_{i})$ , $\theta_{i}|\alpha,\beta \sim$ $f_{2}(\alpha,\beta)$. And again $\alpha \sim f_{3}$ and $\beta \sim f_{4}$. Now we are given a bunch of $X_{i}$'s and their corresponding $t_{i}$'s, let $n$ be the number of samples given. Using hierarchical bayesian model we can write down the joint posterior distribution of $(\theta, \alpha, \beta)$ given $X$. Now when I try to find the marginal posterior distribution of $(\alpha, \beta)$ given $X$, we will have to integrate the joint posterior distribution with respect to $\theta_{i}$'s here $i=1,2,....,n$. I am really confused what the limits of integration would be ?

$$\begin{split} P[\{\theta_i\}_{i=1}^n,\alpha,\beta|X] & = \frac{\prod_{i=1}^n(P[X_i|\theta_i]P[\theta_i|\alpha,\beta])P[\alpha]P[\beta]}{P[X]}\\ \end{split}$$ Then integrating out $\{\theta_i\}_{i=1}^n$, we get: $$\begin{split} P[\alpha,\beta|X] & = \int \dots \int P[\{\theta_i\}_{i=1}^n,\alpha,\beta|X] d\theta_1 \dots d\theta_n\\ & = \frac{ \int \dots \int\prod_{i=1}^n(P[X_i|\theta_i]P[\theta_i|\alpha,\beta])P[\alpha]P[\beta]d\theta_1 \dots d\theta_n}{P[X]}\\ & = \frac{ \prod_{i=1}^n(\int P[X_i|\theta_i]P[\theta_i|\alpha,\beta] d\theta_i)P[\alpha]P[\beta]}{P[X]}\\ \end{split}$$
The limits of integration are whatever the support of the posterior of each $\theta_i$ is.