Second law versus variation principles
  The field-dependent equilibrium thermodynamics is derived with two methods: either by using the potential formalism either by the statistical method. Therefore, Pontrjagin's extremum principle of control theory is applied to an extended ensemble average. This approach allows to derive the grand partition function of thermodynamics as a result of a control problem with the Hamilton energy. Furthermore, the maximum entropy principle follows and the second law in a modified form. The derivation can predict second law violations if cycles with irreversibilities in varying potential fields are included into consideration. This conclusion is supported indirectly by experimental data from literature. The upper maximum gain efficiency of a cycle with a known polymer solution as dielectrics was estimated to less than 1 promille per cycle. Note added in proof 28th October 2003: Comparing this preprint work with an analogous ferrofluidic system discrepancies are is found which show that the concrete model proposed here in section 4 is insufficient to settle the question. A way to solve the problem is proposed. 
W.D. Bauer