A variational principle is devised which optimizes the characteristic funct
ion at thermodynamical equilibrium. The Bloch equation is used as a constra
int to define the equilibrium state, and the trial quantities are an unnorm
alized density operator and a Lagrangian multiplier matrix which is akin to
an observable. The conditions of stationarity yield for the latter a Bloch
-like equation with an imaginary time running backwards. General conditions
for the trial spaces are given that warrant the preservation of thermodyna
mic relations. The connection with the standard minimum principle for therm
odynamic potentials is discussed. We apply our variational principle to the
derivation of equations which are tailored for (i) the consistent evaluati
on of fluctuations and correlations and (ii) the restoration through projec
tion of broken symmetries. When the trial spaces are chosen to be of the in
dependent-quasi-particle type, we obtain an extension of the Hartree-Fock-B
ogoliubov theory which optimizes the characteristic function. The expansion
of the latter in powers of its sources yields for the fluctuations and cor
relations compact formulae in which the RPA kernel emerges variationally. V
ariational expressions for thermodynamic quantities or characteristic funct
ions are also obtained with projected trial states, whether an invariance s
ymmetry is broken or not. In particular, the projection on even or odd part
icle number is worked out for a pairing Hamiltonian, which leads to new equ
ations replacing the BCS ones. Qualitative differences between even and odd
systems, depending on the temperature T, the level density and the strengt
h of the pairing force, are investigated analytically and numerically. When
the single-particle level spacing is small compared to the BCS gap Delta a
t zero temperature, pairing correlations are effective, for both even and o
dd projected cases, at all temperatures below the BCS critical temperature
T-x. There exists a crossover temperature T, such that odd-even effects dis
appear for T such that T-x < T < T-c. Below T-x, the free-energy difference
between odd and even systems decreases quasi-linearly with T. The low temp
erature entropy for odd systems has the Sackur-Tetrode form. When the level
spacing is comparable with Delta, pairing in odd systems is predicted to t
ake place only between two critical temperatures, thus exhibiting a reentra
nce effect. (C) 1999 Elsevier Science B.V. All rights reserved.