# Separate the m-steps in EM algorithm for each density

I would like to use EM algorithm to estimate the parameter of my mixture model. I understand the EM algorithm quite well. I have two different densities (copula family) these two densities are totally different from each other. At M step we maximize the following expression.

For me, I maximize the last equation separately for each density. That is, I did not take the sum of the densities. I just maximize them separately. I did that to get the log-likelihood for each density separate from the other one. Also, that because when we take the derivative of each density with respect to its parameter(s), the derivative of the other density will goes to zero. So from that, I think I can separate them.

Then I can easily sum them to get the overall log-likelihood of my mixture model.

I did that in R language and my code was more than perfect. My question is: Do what I did is correct, or I must take the sum of the function?

Think about it it this way: Consider two functions $f(x)$ and $g(y)$. The sum $f(x) + g(y)$ maximal for a point $(x',y')$ if and only if $f(x')$ and $g(y')$ are maximal.
Therefore, in your case, it is sufficient to maximize each term separately, if your model parameters appear in different terms of the sum. From what I can tell $\pi_i$ and $\theta_i$ are your model parameters. They are separated, thus you can maximize them separately.