# I reasoned that if $T_2 > T_1$ then $E_1>E_2$. Obviously this can't be right, what is the flaw in my logic?

We have an entropy function and I've shown that for this function $$T_1(E_1)=T_2(E_2)$$. Further, the fact that the entropy function is concave is stated. There are two systems in contact and only energy can flow freely. Now I have to show that on the way to equilibrium there is never an energy flow to the system with the higher temperature. We define $$T^{-1}=\beta=\frac{\partial S}{\partial E}.$$ Now I've reasoned this:

Assume $$T_2>T_1$$. If so, then $$\beta_2<\beta_1$$. Then, $$\frac{\partial S_2}{\partial E_2}<\frac{\partial S_1}{\partial E_1}$$. Since S is concave, $$\frac{\partial^2 S}{\partial E^2}> 0$$. Thus, $$E_1>E_2$$.

This can only be true is there are more particles or more volume in 1. We haven't said anything about volume or amount of particles, so surely this cannot be right?

1. A concave function actually has a negative second derivative, $$\frac{\partial^2 S}{\partial E^2} < 0$$. (I can remember that definition precisely because it's so contrary to my intuition.)
2. You're right, the argument only works if volumes, particle numbers etc. are identical for both systems. Only then can you think of $$S$$ as if it were a one-dimensional function and conclude
$$\frac{\partial S(E_2, V, N)}{\partial E_2} < \frac{\partial S(E_1, V, N)}{\partial E_1} \quad\Rightarrow\quad E_2 > E_1.$$
Otherwise you'd have to know something about the mixed derivatives $$\frac{\partial^2 S}{\partial V \partial E}$$ and $$\frac{\partial^2 S}{\partial N \partial E}$$ in addition to $$\frac{\partial^2 S}{\partial E^2}$$.