Suppose that some data $(y_{1},\ldots,y_{J})$ are distributed multinomially with parameters $(\theta_{1},\ldots,\theta_{J})$ and that $\theta = (\theta_{1},\ldots,\theta_{J})$ has Dirichlet prior distribution:
\begin{equation*} p(y_{1},\ldots,y_{J}|\theta_{1},\ldots,\theta_{J}) \propto \prod_{i=1}^{J}{\theta_{i}^{y_{i}}} \end{equation*}
and
\begin{equation*} p(\theta_{1},\ldots,\theta_{j}) \propto \prod_{i=1}^{J}{\theta_{i}^{\alpha_{i}-1}} \end{equation*}
such that the $\theta_{i}$ sum to unity. I want to determine the distribution of $\theta_{1},\theta_{2}|y_{1},\ldots,y_{J}$. It is clear that the posterior distribution of $\theta$ given $y$ also has a Dirichlet distribution
\begin{equation*} p(\theta_{1},\ldots,\theta_{J}|y_{1},\ldots,y_{J}) \propto \prod_{i=1}^{J}{\theta_{i}^{\alpha_{i}+y_{i}-1}}. \end{equation*}
The answer, I think, is that
\begin{equation*} p(\theta_{1},\theta_{2}|y_{1},\ldots,y_{J}) \propto \theta_{1}^{y_{1}+\alpha_{1}-1}\theta_{2}^{y_{2}+\alpha_{2}-1}\left(1-\theta_{1}-\theta_{2}\right)^{-1+\sum_{i=3}^{J}{(y_{i}+\alpha_{i})}}. \end{equation*}
I'm not clear, though, on how to obtain this result. I know that under the assumptions of the problem,
\begin{equation*} p(\theta_{1},\theta_{2},1-\theta_{1}-\theta_{2})\propto \theta_{1}^{\alpha_{1}-1}\theta_{2}^{\alpha_{2}-1}(1-\theta_{1}-\theta_{2})^{1-\alpha_{1}-\alpha_{2}}, \end{equation*}
but I haven't found how to incorporate this into my thinking. My instinct is to say that
\begin{equation*} p(\theta_{1},\theta_{2}|y_{1},\ldots,y_{J}) = \int{p(\theta_{1},\ldots,\theta_{J}|y_{1},\ldots,y_{J})\,\mathrm{d}\theta_{3}\cdots\mathrm{d}\theta_{J}}, \end{equation*}
but I'm not sure what the limits of integration should be. The $\theta_{i}$ are non-negative by assumption and sum to $1$, so the bounds need to be subsets of $[0,1]$ in every case, but it's not clear to me how to restrict them (inductively?).
Use $\int\limits_0^{1-a} x^{b-1} (1-a-x)^{c-1}\, dx= \frac{\Gamma(b)\Gamma(c)}{\Gamma(b+c) }(1-a)^{b+c-1}$ as you integrate out each term.
You start with $p(\theta_{1},\ldots,\theta_{J}\mid y_{1},\ldots,y_{J}) \propto \prod\limits_{i=1}^{J}{\theta_{i}^{\alpha_{i}+y_{i}-1}}$ subject to $\sum\limits_1^J \theta_i=1$
so it is easy enough to remove $\theta_J=1-\sum\limits_1^{J-1}\theta_i$ to give
$p(\theta_{1},\ldots,\theta_{J-1}\mid y_{1},\ldots,y_{J}) \propto \left(\prod\limits_{i=1}^{J-1}{\theta_{i}^{\alpha_{i}+y_{i}-1}}\right)\left(1-\sum\limits_1^{J-1}\theta_i\right)^{\alpha_{J}+y_{J}-1}$.
Later you want to integrate out successive $\theta_{J-k}$ with
$p(\theta_{1},\ldots,\theta_{J-k-1}\mid y_{1},\ldots,y_{J}) $ $\propto \int\limits_{\theta_{J-k}=0}^{1-\sum\limits_1^{J-k-1}\theta_i} \left(\prod\limits_{i=1}^{J-k-1}{\theta_{i}^{\alpha_{i}+y_{i}-1}}\right)\theta_{J-k}^{\alpha_{J-k}+y_{J-k}-1} \left(1-\sum\limits_1^{J-k-1}\theta_i - \theta_{J-k}\right)^{\sum_{J-k+1}^J\limits(\alpha_{i}+y_{i})-1}\, d\theta_{J-k}$ $\propto \left(\prod\limits_{i=1}^{J-k-1}{\theta_{i}^{\alpha_{i}+y_{i}-1}}\right) \left(1-\sum\limits_1^{J-k-1}\theta_i\right)^{\sum_{J-k}^J\limits(\alpha_{i}+y_{i})-1}$
until you reach
$p(\theta_{1},\theta_{2}\mid y_{1},\ldots,y_{J}) $ $\propto \left(\prod\limits_{i=1}^{2}{\theta_{i}^{\alpha_{i}+y_{i}-1}}\right) \left(1-\sum\limits_1^{2}\theta_i\right)^{\sum_{3}^J\limits(\alpha_{i}+y_{i})-1}$ which is your desired result.