The question of the title is a famous mathematical puzzle and can be addressed by several approaches. In this contribution, we present an alternative solution based on the second law of thermodynamics. The method can be extended to derive a more general result involving the exponential function.

Usually, we use mathematics to solve physics problems. This brief note provides an example of the reverse: A physical law (the second law of thermodynamics) is employed to solve a mathematical puzzle (the title of this paper).

This proof may surprise and interest students, motivating them to explore thermodynamic paths to generate other algebraic inequalities, which results in an improvement in their skills in performing entropy analyses.

The proposed solution is as follows. When two bodies A and B at different temperatures are placed in contact, energy flows between them until thermal equilibrium are reached. Let us suppose that A is an incompressible solid with constant heat capacity C, initially at temperature $T 1 = π$, and B is an ideal thermal reservoir at temperature $T 2 = e$, where e is Euler's number; both temperatures measured in the same absolute temperature scale.1 We will assume that each system exchanges heat only with the other.

Once thermal equilibrium is reached, the entropy change of the solid is
$Δ S A = C ln ( T 2 T 1 ) = C ( 1 − ln π ) .$
(1)
The reservoir absorbes all the heat released by the solid
$Q B = − Q A = − Δ U A = C ( T 1 − T 2 ) = C ( π − e ) ,$
(2)
so the entropy of the reservoir changes in the amount
$Δ S B = Q B T 2 = C ( π e − 1 ) .$
(3)
Finally, from Eqs. (1) and (3), we have that the global entropy change associated with the thermalization process is
$Δ S universe = Δ S A + Δ S B = C ( π e − ln π ) .$
(4)
The key point is that, since the initial temperature of the solid is different from the reservoir's temperature, the heat transfer is irreversible and, consequently, the total entropy change must be positive. Because C > 0, Eq. (4) yields
$π e − ln π > 0 ⇒ π > ln π e ⇒ e π > π e ,$
(5)
so we conclude that $e π$ is the greater of the two numbers.2 This is known as Gelfond's constant, and it is a transcendental number whose approximate value is $e π ≃ 23.14069$. On the other hand, $π e ≃ 22.459 15$, and it is unknown whether or not it is transcendental.3
An alternative derivation involves a perfect gas in thermal equilibrium with a reservoir. If the initial pressure is $P 1 = e$ and we suddenly increase the external pressure to the constant value $P 2 = π$,4 after transients have died out, the system will reach a new equilibrium state with the bath at pressure P2 and at the initial temperature. Using the fact that the entropy change of the gas is $R ln ( P 1 / P 2 )$, where R is the gas constant, and noting that the heat exchange equals the work done on the gas, we obtain that the entropy change of the universe is
$Δ S universe = R ( π e − ln π ) ,$
(6)
from which the same conclusion is derived. It is also interesting to note that if the final pressure (or, in the previous example, the initial temperature) is some arbitrary positive value x, analogous reasoning allows us to infer the following more general inequality:
$e x ≥ x e , x ≥ 0.$
(7)
Since the results obtained are mathematical truths, and, therefore, independent of any physical considerations, it is interesting to discuss in the classroom whether the thermodynamic derivation is, in fact, a proof in the mathematical sense. We refer the readers to Refs. 5–7 to delve deeper into this issue.

Instructors interested in this approach can find thermodynamic derivations of other famous inequalities in Refs. 8–10 (inequalities between means), Ref. 11 (Jensen's inequality), or Ref. 12 (Bernoulli's inequalities and bounds for the logarithmic function).

This work was partially supported by the Agencia Nacional de Investigación e Innovación and Programa de Desarrollo de las Ciencias Básicas (Uruguay).

The authors have no conflicts to disclose.

1.
Although thermometers do not have infinite precision, using $e ≃ 2.7$ and $π ≃ 3.1$ is enough to obtain the correct relation between the exponentials in the title.
2.
A compilation of solutions, some of them very ingenious, can be found in <https://mindyourdecisions.com/blog/2013/08/05/monday-puzzle-what-is-greater-epi-or-pie/> (visited on 11/21/2023). The reader may verify that if the temperatures of the solid and the reservoir are exchanged, the following tighter result is obtained: $ln π + e / π > 2$ (the relative difference between the terms is less than 0.5%).
3.
C. A.
Pickover
,
Pickover, Wonders of Numbers
(
Oxford U. P
.,
Oxford
,
2001
).
4.
Note that, since the process is out of equilibrium, the pressure exerted on the gas is different from the gas pressure, which is possibly not even well-defined during the whole process.
5.
J. P.
Abriata
, “
Comment on a thermodynamical proof of the inequality between arithmetic and geometric mean
,”
Phys. Lett. A
71
(
4
),
309
310
(
1979
).
6.
M. A. B.
Deakin
and
G. J.
Troup
, “
The logical status of thermodynamic proofs of mathematical theorems
,”
Phys. Lett. A
83
(
6
),
239
240
(
1981
).
7.
S. S.
Sidhu
, “
On thermodynamic proofs of mathematical results
,”
Phys. Lett. A
76
(
2
),
107
108
(
1980
).
8.
E. D.
Cashwell
and
C. J.
Everett
, “
The means of order t and the laws of thermodynamics
,”
Am. Math. Mon.
74
(
3
),
271
274
(
1967
).
9.
P. T.
Landsberg
, “
A thermodynamic proof of the inequality between arithmetic and geometric means
,”
Phys. Lett. A
67
(
1
),
1
(
1978
).
10.
R. J.
Tykodi
, “
Using model systems to demonstrate instances of mathematical inequalities
,”
Am. J. Phys.
64
(
5
),
644
648
(
1996
).
11.
A. R.
Plastino
,
A.
Plastino
, and
G. H.
Miller
, “
Thermodynmic paths to Jensen's inequality
,”
Am. J. Phys.
65
(
11
),
1102
1105
(
1997
).
12.
A.
Vallejo
, “
Finding and improving bounds of real functions by thermodynamic arguments
,”
Am. J. Phys.
91
(
5
),
366
370
(
2023
).