Carnot analyzed an engine operating between two reservoirs. Through a peculiar mode of reasoning, he found the correct optimum shaft work performed during a cyclic change of state of the engine. Clausius justified Carnot's result by enunciating two laws of thermodynamics, and introducing the concept of entropy as a ratio of heat and temperature of a thermodynamic equilibrium state. By appropriate algebraic manipulations, in this paper we express Carnot's optimum shaft work in terms of available energies or exergies of the end states of the reservoirs, and Clausius' entropy in terms of energy and available energy. Next, we consider the optimum shaft work performed during a cyclic change of state of an engine operating between a reservoir, and a system with fixed-amounts of constituents, and fixed-volume but variable temperature. We express the optimum shaft work in terms of the available energies of the end states, and Clausius' entropy in terms of energy and available energy. Formally, the entropy expression is identical to that found for the Carnot engine except for the difference in end states. Finally, we consider the optimum shaft work performed during a cyclic change of state of an engine operating between system A initially in any state A1 (thermodynamic equilibrium or not) and reservoir R. We call this optimum generalized available energy with respect to R, and use it together with energy to define an entropy of any state A1. Again we observe that the expression for entropy is formally identical to the two given earlier except for the difference in end states.