# How to find this probability with the microcanonical ensemble?

When dealing with isolated systems we are dealing with the microcanonical ensemble. In that case, we suppose that each individual microstate has the same probability.

So if $\Omega(E)$ is the number of states of energy $E$, since each has the same probability, we must have

$$P(E) = p \Omega(E),$$

where $p$ is the individual probability. Then we have

$$\frac{1}{p} = \sum_{E}\Omega(E)$$

the total number of microstates.

Now, suppose the system is composed of two parts $A$ and $B$ separated by a totally isolating wall.

In that case, consider the process on which the wall becomes diathermal. Thus energy exchange is allowed, until equilibrium is reached.

I'd like to understand how could one find the probability $P(E)dE$ that the energy of $A$ lies between $E$ and $E+dE$ after the process.

I mean, $A$ and $B$ are not isolated. In that case, the microcanonical ensemble techniques don't work for them, just for the composite system. But the energy of the composite system doesn't change.

So what should be done in a situation like this? How this probability can be found?

When the interaction is weak, the multiplicity of the whole system is the product of the multiplicities of the components: $\Omega = \Omega_A \times \Omega_B$.
The condition for equilibrium is that $\Omega$ is at its maximum. At this maximum, an infinitesimal transfer of energy from A to B will increase $\Omega_B$ and decrease $\Omega_A$ but it does not change their product $\Omega$. This means that the fractional rates of change of the multiplicity with energy must be equal: $$\frac{1}{\Omega_A}\frac{{\rm d} \Omega_A}{{\rm d}E} = \frac{1}{\Omega_B}\frac{{\rm d} \Omega_B}{{\rm d}E}.$$