To get some macroscopic properties the partition function is useful, especially the canonical partition
functionZ(T,V)
Z(T,V) =
∑
qe−Eq
kBT,which is relevant at a constant temperatureT. For photons the sum over all microstates is:
Z(T,V) =∑j 1...
∑jsmaxe
−kB^1 T
∑smax
s=1 ~ωs(js+(^12) )
The sum in the exponent can be written as a product:
Z(T,V) =
∑j 1...
∑jsmaxs∏maxs=e−~ωs(js+^12 )
kBTThis is a sum ofjsmaxmaxterms, each term consisting ofsmaxexponential factors. It isn’t obvisious, but
this sum can also be written as:
Z(T,V) =
s∏maxs=[
e
− 2 ~kωBsT
+e
− 23 k~BωsT
+e
− 25 k~BωsT
+...]Now if the right factor is put out, the form of a geometric series (1 +^1 x+x^12 +...= 1 −^1 x) is derived:
Z(T,V) =
s∏maxs=
e~ωs
2 kBT1 −e~ωs
kBT
The free energyFis given by
F=−kBTln(Z).InsertingZleads to
F=
∑
s~ωs
2
+kBT∑
sln(
1 −e−~ωs
kBT). (33)
The first term is the ground state energy, which cannot vanish. Often it is neglected, like in the
following calculations.