I'm currently studying posterior distribution with likelihood $y|\theta \sim B(n,\theta)$ and mixture of prior distribution $\theta \sim \pi Beta(\alpha_1, \beta_1) + (1-\pi)Beta(\alpha_2, \beta_2)$. The posterior distribution is as follows:
$$ \begin{aligned} p(\theta|y) & \propto \theta^y (1-\theta)^{n-y} \{\pi\frac{\Gamma(\alpha_1 + \beta_1)}{\Gamma(\alpha_1)\Gamma(\beta_1)}\theta^{\alpha_1 -1}(1-\theta)^{\beta_1 - 1} + (1-\pi)\frac{\Gamma(\alpha_2 + \beta_2)}{\Gamma(\alpha_2)\Gamma(\beta_2)}\theta^{\alpha_2 -1}(1-\theta)^{\beta_2 - 1}\} \\ & = \pi\frac{\Gamma(\alpha_1 + \beta_1)}{\Gamma(\alpha_1)\Gamma(\beta_1)}\theta^{y + \alpha_1 -1}(1-\theta)^{n-y +\beta_1 - 1} + (1-\pi)\frac{\Gamma(\alpha_2 + \beta_2)}{\Gamma(\alpha_2)\Gamma(\beta_2)}\theta^{y + \alpha_2 -1}(1-\theta)^{n-y + \beta_2 - 1} \\ \end{aligned} $$
Now, I have to show $p(\theta|y)$ is another mixed beta distribution; that is, $$p(\theta|y) \propto w*Beta(y+\alpha_1, n -y + \beta_1) + (1-w)*Beta(y+\alpha_2, n - y + \beta_2)$$ But, I'm currently stuck to here. How can I induce this formula from the above relationship? Thank you.