# Entropy of two subsystems exchanging energy

I consider two subsystems with the number of microstates $\Gamma_1(U_1)$ and $\Gamma_2(U_2)$ and their energies $U_1$ and $U_2$ respectively. The subsystems can exchange energy so that the total energy of the system is $U=U_1+U_2$. It is also given that $\ln \Gamma (U) = S(U)/k_\mathrm{B}$

Now we have the entropies given by $S_1(U_1) = -a_1 (U_1 - U_1^{0})^{2}$ and $S_2(U_2) = -a_2(U_2-U_2^{0})^{2}$ with $a_1 > 0$, $a_2 >0$. And I want to calculate the entropy of the system $S(U)$.

My idea:

\begin{align*} S(U) = k_\mathrm{B} \left( S_1 (U_1) + S_2 (U_2) \right) = k_\mathrm{B} \left(-a_1 (U_1 - U_1^{0})^{2}+ -a_2(U_2-U_2^{0})^{2}\right) \end{align*}

Is it that easy?

At equilibrium the two subsystems will adjust their energies to maximize the total entropy of the system \begin{align} S = -a_1 (U_1 - U_1^{0})^{2}-a_2(U_2-U_2^{0})^{2} \end{align} We have that \begin{align*} dS = -2a_1 (U_1 - U_1^{0})dU_1-2a_2(U_2-U_2^{0})dU_2 \end{align*} Taking into account that the total energy of the system remains constant ($U=U_1+U_2$) we have $dU_1=-dU_2$. At thermodynamic equilibrium we have $dS=0$ and we get
\begin{align*} a_1 (U_1 - U_1^{0})=a_2(U_2-U_2^{0}) \end{align*} Inserting $U_2=U-U_1$ in the above equation we get \begin{align*} U_1-U_1^{0}=\frac{a_2}{a_1+a_2}\left( U-(U_2^{0}+U_1^{0}) \right) \end{align*} and \begin{align*} U_2-U_2^{0}=\frac{a_1}{a_1+a_2}\left( U-(U_2^{0}+U_1^{0}) \right) \end{align*} Plugging these eqs into the initial eq we have the entropy at equilibrium \begin{align} S = -\frac{a_1a_2}{a_1+a_2}\left( U-(U_2^{0}+U_1^{0}) \right)^2 \end{align} This is the correct (equilibium) entropy of the system.
• I have calculated it with the same result, thank you very much... In our exercise we also need to show later that the entropy is extensive, therefore we can not use the extensivity of the entropy. Therefore I calculated the entropy around the maximum of $U_1$ and it was the same after a few steps. Thanks again !! – Leviathan May 24 '17 at 12:46