Definition of temperature in physicss
Definition1 2
Let’s assume there is a system with energy $E$. When the number of microstates for $E$ is denoted as $\Omega (E) = \Omega$, then
$$ \dfrac{1}{k_{B} T} := \dfrac{d \ln ( \Omega )}{d E } $$
defines the temperature of the system as $T$, where $k_{B}$ is the Boltzmann constant.
Microstates and Macrostates
In statistical mechanics, the concepts of a system’s Macrostate and Microstate could be similar to the following example. Suppose there are four coins inside a box. After shaking the box vigorously and opening it, the heads and tails will be determined randomly. When representing heads with white and tails with dark grey, their states can be depicted as follows:
Looking only at the number of heads, there are a total of $5$ ways, from $0$ to $4$, and this is called the number of macrostates $S$. Meanwhile, if counting whether each coin is heads or tails, as known, there are $2^4=16$ ways, which is called the number of microstates $\Omega$.
Naturally, if the number of microstates $\Omega$ is large, the corresponding macrostate is more likely to be observed. In the situation above, if designating the number of heads among $n$ coins as $\Omega (k, n-k)$, the microstate number is largest when $\Omega (2,2) = 6$, hence, the state with two heads and two tails is more likely to be observed.
Derivation
The definition of temperature naturally arises through finding the macrostate of two interacting systems. Consider a closed system $X$ as below.
$X$ is divided into $A$ and $B$. Let’s call the internal energy of $A$ and $B$ as $E_{A}$ and $E_{B}$ respectively. Similar to the coin example above, imagine $A$ and $B$ as groups of specific coins, and $E_{A}$ and $E_{B}$ as the number of heads.
Assuming that all microstates have equal probability and that $A$ and $B$ have interacted enough (or sufficient time has passed) to consider the two systems in thermal equilibrium. The total energy of the system is as $E_{X} = E_{A} + E_{B}$. The number of microstates of the total system $X$ is represented by the product of the possible microstates of $A$ $\Omega (E_{A})$ and of $B$ $\Omega (E_{B})$.
$$ \begin{equation} \Omega_{X} (E_{X}) = \Omega_{A} (E_{A}) \Omega_{B} (E_{B}) \end{equation} $$
Then, it can naturally be accepted that the macrostate in thermal equilibrium is when the value of the above equation is at its largest. Actually, it is said that the number of possible microstates in a macrostate during thermal equilibrium overwhelmingly exceeds other cases. If considering the number of microstates $\Omega$ as a normal distribution, naturally, the point where taking the derivative of $(1)$ becomes $0$ signifies the maximum value.
However, in reality, the energy of particles is not continuous but quantumized. Therefore, the total energy of the system $E_{X}$ also has discrete values. But in the case of thermophysics, since the number of particles in the system being examined is extremely high, the possible values of $E_{X}$ are also enormously numerous. Hence, consider $E_{X}$, $E_{A}$, and $E_{B}$ as variables with continuous values.
Returning to finding the macrostate, let’s designate the macrostate (energy) in thermal equilibrium as $\overline{E} = \overline{E}_{A} + \overline{E}_{B}$. By taking the derivative of $(1)$ with respect to $E_{A}$ and substituting $E_{A}=\overline{E}_{A}$, it results in $0$.
$$ \left. \dfrac{d( \Omega_{A} (E_{A} ) \Omega_{B} (E_{B}) )}{dE_{A}} \right|_{E_{A}=\overline{E}_{A}} = 0 $$
Calculating the above equation yields as follows by the product rule of differentiation.
$$ \Omega_{B} (E_{B}) \left. \dfrac{d \Omega_{A} (E_{A} )}{d E_{A}} \right|_{E_{A}=\overline{E}_{A}} + \Omega_{A} (E_{A}) \left. \dfrac{d \Omega_{B} (E_{B} )}{d E_{B}} {{d E_{B} } \over {d E_{A} }} \right|_{E_{A}=\overline{E}_{A}} = 0 $$
Here, since the total energy $E_{X} = E_{A} + E_{B}$ remains a constant regardless of how energy transfers between $A$ and $B$, the following is established.
$$ d E_{A} = - d E_{B} \implies \dfrac{d E_{B}}{d E_{A} } = -1 $$
Substituting into the above equation yields the following expression.
$$ \begin{align*} && \Omega_{B} \left. \dfrac{ d \Omega_{A} }{d E_{A}}\right|_{E_{A}=\overline{E}_{A}} - \left. \Omega_{A} \dfrac{ d \Omega_{B} }{d E_{B}}\right|_{E_{B}=\overline{E}_{B}} =& 0 \\ \implies && \dfrac{1}{ \Omega_{A} } \left. \dfrac{ d \Omega_{A} }{d E_{A}}\right|_{E_{A}=\overline{E}_{A}} - \dfrac{1}{\Omega_{B} } \left. \dfrac{ d \Omega_{B} }{d E_{B}} \right|_{E_{B}=\overline{E}_{B}} =& 0 \\ \implies && \dfrac{1}{ \Omega_{A} } \left. \dfrac{ d \Omega_{A} }{d E_{A}} \right|_{E_{A}=\overline{E}_{A}} =& \dfrac{1}{\Omega_{B} } \left. \dfrac{ d \Omega_{B} }{d E_{B}} \right|_{E_{B}=\overline{E}_{B}} \\ \implies && \dfrac{ d \ln \Omega_{A} }{d E_{A}} \left(\overline{E}_{A}\right) =& \dfrac{ d \ln \Omega_{B} }{d E_{B}}\left(\overline{E}_{B}\right) \end{align*} $$
The last line is valid in accordance with logarithmic differentiation and the chain rule. Here, the above equation is a condition for thermal equilibrium, where the left-hand side is expressed solely in terms of the variables for system $A$, and the right-hand side in terms of the variables for system $B$. Since both sides of the equation in thermal equilibrium state represent the same value with each respective system’s state, defining temperature by this value would be appropriate. Hence, the temperature of $A$ and $B$ can be defined as $T_{A}$ and $T_{B}$, respectively.
$$ \begin{align*} \dfrac{1}{k_{B} T_{A} } &:= \dfrac{ d \ln \Omega _{A} }{d E_{A}} \left(\overline{E}_{A}\right) \\ \dfrac{1}{k_{B} T_{B} } &:= \dfrac{ d \ln \Omega _{B} }{d E_{B}} \left(\overline{E}_{B}\right) \end{align*} $$
■