Defining temperature of an isolated system Suppose I have an isolated box and it has got two compartments inside it. The wall separating the two is free to exchange energy (any form) between the two. When the system comes in equilibrium, its Entropy is maximized with respect to energy exchanges. So $\frac{\partial S}{\partial E}$ is $zero$ for the whole isolated system. But for the two subsystems, sum of $\frac{\partial S}{\partial E}$ is $zero$. So from this we can define $Temperature$ of each system to be $\frac{\partial S}{\partial E}$.
The question is that can I say that that the temperature of whole isolated system is also equal to the temperature of its sub systems? Since $\frac{\partial S}{\partial E}$ is zero for whole isolated system can be can we even define system of isolated system or we can talk of temperature of its subsystems only?
 A: When you calculate the entropy maximisation for the two components of your isolated system, you have to do it subject to the constraint that $E_\text{total}$ is constant, where $E_\text{total}=E_A+E_B$. This is because the system is isolated, so its total energy doesn't change as energy flows between the two subsystems.
However, if you want to know the temperature of the whole system, you need to calculate ${\partial S}/{\partial E_\text{total}}$. Clearly you can't hold $E_\text{total}$ constant here, because it doesn't make sense to differentiate by a constant. This is because for temperature to be meaningful, the system has to interact with another external system. (For example: the thermometer you're using to measure its temperature.) So when we talk about the temperature of an isolated system, we have to imagine that $E_\text{total}$ can change, even though physically it can't In other words, we're actually talking about the temperature it would have if it were to become temporarily non-isolated.
For these reasons, it's not true that ${\partial S}/{\partial E_\text{total}}$ is zero for an isolated system. In fact we have ${\partial S}/{\partial E_\text{total}}={\partial S}/{\partial E_A}={\partial S}/{\partial E_B},$ as you would expect.
