1911 definition of the “inequality of Clausius” by American thermodynamics professor George Goodenough. [6]
In inequalities, the Clausius inequality, or "inequality of Clausius", refers to the argument that when a body is taken from an initial state, e.g. state one, to a final state, e.g. state two, and then back again to its initial state, the entropy S added to the body S1 will not equal the entropy removed from the body S2. In other words, S1 and S2 will be not be equal and will thus be unequal:

$S_2 \ne S_1 \,$

hence an "inequality", of the form < or >, will be found in the mathematical expression for the change in internal energy (or its equivalent potential) of the system. This is a state function way of saying that caloric particles do not exist in the sense that some of the heat Q of expansion, less the heat of contraction, was converted into internal molecular work, in an irreversible manner. There are different ways of expressing this concisely. American thermodynamicist George Goodenough's 1911 expression of the Clausius inequality is:

$S_2 - S_1 > \int_{T_1}^{T_2} \frac{dQ}{T} \,$

In modern terms, the Clausius inequality often defined as: [1]

$\oint \frac{dQ}{T} \leq 0$

where the circle integral $\oint \$ symbol means that the integration is done over the surface of the working substance over the entire cycle, dQ is an inexact differential amount of heat, often signified as đQ or δQ, added to the body of substance, T is the absolute temperature of the surface of the substance, the value of the integral equal zero for a reversible or ideal cycle, and is less than zero for an irreversible cycle. [2] The equation is named after German physicist Rudolf Clausius. The term "Clausius inequality" essentially is a mathematical synonym for the verbal version of the second law of thermodynamics. A full reading of the Clausius' textbook The Mechanical Theory of Heat is required to fully-understand the definition of the logic of the inequality as developed and utilized by Clausius.

Etymology
The expression, according to the 1875 views of Clausius, is a mathematical way of stating that the sum of uncompensated transformations in a cyclical process must always be positive; and is thus an amendment of the proof of the second main principle (second law) for variations of the body that are irreversible. [3]

At the turn of the 20th century the expression “Clausius’ theorem” was common. One definitive 1904 version of Clausius’ theorem, from Irish mathematician William Orr, was: “if a body or system of bodies undergoes any irreversible cycle of operations in which, in addition to interchanges of heat which may take place between different parts of the system, it receives heat from (or gives heat to) any external bodies, then for the cycle (using the symbols H for heat and θ for temperature)", the quantity:

is negative, where “δH denotes the small quantity of heat absorbed by any small portion of the system when at the absolute temperature θ, whether this heat be supplied by conduction or by radiation, and whether by external bodies or by any other part of the system, the double sign of the integration being used to indicate that the integration is to be performed over the whole mass as throughout the cycle.”
 Generic model of the basic heat cycle (or Carnot cycle).

Simple proof
The simplified proof of the Clausius inequality goes something like this. First, according to Carnot’s theorem: [9]

“The motive power [or work] of heat is independent of the agents [working substance] employed to realize it; its quantity is fixed solely by the temperature differences of the bodies [hot body and cold body] between which is effected, finally, the transfer of caloric [heat].”

as enunciated in 1824 by French physicist Sadi Carnot, the efficiency, symbol eta η, of the Carnot engine ηc, or perfect idealized engine, will always be greater than or equal to the efficiency of any other type of heat engine ηh, as expressed by the following inequality:

$\eta_c \ge \eta_h \,$

The Carnot efficiency (ηc) is the efficiency of an engine where caloric is hypothetically conserved; a real heat engine efficiency (ηh) is one where part of the heat is irreversibly converted into internal work according to the principle of the mechanical equivalent of heat. This equality sign is the start of the derivation of the Clausius inequality and thus the second law. [5] In short, what this inequality says is that no engine operating between two heat reservoirs, i.e. hot body and cold body, can be more efficient than a Carnot engine operating between the same reservoirs, and by corollary the work output of any and all heat engines is a function of the difference in the temperatures between the hot body T1 and cold body T2:

$W = T_1 - T_2 \,$

We can then call the efficiency η, of a given heat engine to produce work output, i.e. how efficient the engine is, by ratio of its work output to heat input:

$\eta = \frac{W_{out}}{Q_{in}}$

or, through a bit of simple derivation, this idealized efficiency, can be written in terms of temperature: [10]

$\eta = \frac{T_1 - T_2}{T_1} \,$

and this will be the maximal possible efficiency that a heat engine can have. Carnot's efficiency inequality can then be rewritten as such, when comparing the efficiency an ideal engine (right side of equation) with say the efficiency of actual measured heat engine, say gas-engine or air-engine (right side of equation):

$\frac{T_1 - T_2}{T_1} \ge \frac{Q_1 - Q_2}{Q_1} \,$

Note: the details of this last step, in the derivation, need to be studied further and tracked down. In any event, this can be solved, through simple algebra, to show that:

$\frac{Q_1}{T_1} \le \frac{Q_2}{T_2} \,$
or:
$0 \le \frac{Q_2}{T_2} - \frac{Q_1}{T_1} \,$

Similarly, in the notation of Lebanese-born Danish physical chemist John Avery: [13]

$dS = \frac{dq}{T_2} - \frac{dq}{T_1} > 0 \,$

Or form the original formulation in Clausius' 1854 theorem of the equivalence of transformations, the quantity:

$\frac{Q}{T_2} - \frac{Q}{T_1} \,$

is called the "double transformation" and will always have a positive. To exemplify, supposed one unit of heat Q = 1 flows into the working body, at a temperature of T1 = 300K, causing an expansion, then flows out of the working body, at a temperature of T2 = 200K, then the equivalence value of the double transformation will be:

$\frac{1}{200} - \frac{1}{300} \,$

or 0.0017 units of transformation content change, i.e. entropy change in modern parlance. Hence, we conclude with the view that in all natural processes are irreversible, and thus show an entropy increase in the working substance. [8]

To give some comparison, in the original 1703 phlogiston model of heat, proposed by German chemist Georg Stahl, heat was considered to be a type of matter called "phlogiston", symbol ϕ (phi), which left bodies when burned, but could be restored to the original substance by supplying a replacement phlogiston from any material containing it, whereby, in this model the transformation change four this double transformation would be of the form:

$\frac{\phi}{T_2} - \frac{\phi}{T_1} \,$

The central issue with this theory is that experiments were soon showing that heat seemed to be weightless and this view was in fact proved in a 1786 experiment conducted by French chemist Antoine Lavoisier, wherein he let phosphorus burn in air in a closed flask, and measured no appreciable change in weight, thus proving that "matter of heat is weightless". In replacement of Stahl's "phlogiston", Lavoisier proposed the "caloric", a weightless fluid-like particle of the composition of heat that was (a) indestructible, (b) actuated a repulsive force between the atoms of bodies, (c) created a defining volume based on the number of caloric particles in a given body, and (d) could be added or removed by contact with other bodies of higher or lower temperature or by combustion.

 Left: the 1856 version of the Clausius inequality tattooed in 2010 on the arm of newly graduated philosophy student named Ivanka. [11] Right: a circa 1900 version of the Clausius inequality tattooed (or inked) in 2008 on the hand of a man, who views the total image as follows “the hand represents the capacity of the human mind to analyze and understand natural phenomena [such as] the power and imperative of irreversibility.” [12]
Rigorous proof
The actual full "proof" of the so-called Clausius inequality, or Clausius theorem, as it is some times called, is a bit illusive, being that there are five different versions of this inequality formulation, spread among three different articles.To summarize the situation, (a) the proof is hidden in the footnotes and verbiage of at least three different memoirs (1854, 1856, and 1865), (b) the sign or rather direction of the inequality differs between the two main versions, which is based on Clausius' differing assignment of the + or – signs associated with the respective heat flows (into or out of the working body) in the respective manuscripts (1854 and 1865), (c) in the early stage of development he toyed with the notion of what a variable N (as well as – N) that he called the equivalence-value of all uncompensated transformations, and (d) the unified proof seems to have been rewritten, reworked, or regrouped to a certain unified extent in the second edition of his textbook, his chapter ten "On Non-Reversible Processes", in particular.

Originally, the general outline of the proof, not in terms of inequalities, but rather equals signs, i.e. reversible processes, was given by Clausius in his 1854 fourth memoir "On a Modified Form of the Second Fundamental Theorem in the Mechanical Theory of Heat". He referred back to this, in retrospect, in an asterisk footnote in his 1865 ninth memoir "On Several Convenient Forms of the Fundamental Equations of the Mechanical Theory of Heat", where he stated the integral of the differential units of entropy (dQ/T) entering or leaving the body over the cyclical process is greater than equal. In the text of the ninth memoir, however, he uses a different sign convention, in which he states that the integral of the differential units of entropy (dQ/T) entering or leaving the body over the cyclical process is less than or equal to zero. This situation is summarized below:

 Formulation Date Notes $\int \frac{dQ}{T} = N \,$ 1854 Where "the integral extends over all the quantities of heat received by several bodies"; where N is the mathematical summation of all the equivalence-values involved in the process, i.e. the sum of the total number of positive transformations and negative transformations. $\int \frac{dQ}{T} = 0 \,$ 1854 Holds for a "reversible process, however complicated it may be, such that the transformations which occur must exactly cancel each other, so that their algebraic sum is zero." $\int \frac{dQ}{T} = - N \,$ 1856 Where "Q signifies the heat imparted to the changeable body during a cyclical process, and dQ an element of of the same, whereby any heat withdrawn from the body is to be considered as an imparted negative quantity of heat. The integral is extended over the whole quantity Q"; and where "N denotes the equivalence-value of all uncompensated transformations* involved in a cyclical process"; where "N = 0 denotes a cyclical process that can be reversed" and where N > 0 denotes a cyclical process that is not reversible, i.e. those in which uncompensated transformations necessarily arise" (to note: Clausius does not use the famed inequality sign at this point, but instead introduced the inequality verbally by stating that that for irreversible processes "the magnitude of N has consequently a determinable and necessarily positive value." $\int \frac{dQ}{T} = 0 \,$ 1862 Where "dQ is an element of heat given up by a body to any reservoir of heat during its own changes (heat which it may absorb from a reservoir being here reckoned as negative)"; this expression holding for "every reversible cyclical process". 1862 Where "dQ is an element of heat given up by a body to any reservoir of heat during its own changes (heat which it may absorb from a reservoir being here reckoned as negative)"; this expression holding for "every cyclical process which is in any way possible". 1865 Based on the assignment that "a thermal element given up by a changing body to a reservoir of heat is reckoned as positive, and element withdrawn from a reservoir of heat is reckoned negative"; and that this form is convenient in "certain general theoretical considerations", for cyclical processes where the changes occur in a non-reversible manner. 1865 Based on the assignment that "a quantity of heat absorbed by a changing body is positive, and a quantity of heat given off by it is negative", for cyclical processes where the changes occur in a non-reversible manner. $\int \frac{dQ}{T} = 0 \,$ 1875 $N = - \int \frac{dQ}{T} \,$ 1875 1875 1875

Notice, specifically, the asterisk mark* used by Clausius in the 1856 version, which he cites to the following lengthy footnote, which also has an extended end bracketed sub-footnote [] within it:

* One species of uncompensated transformations requires further remark. The sources from which the changing matter derives heat must have higher temperatures than itself; and, on the other hand, those from which it derives negative quantities of heat, or which deprive it of heat, must have lower temperatures than itself. Therefore whenever heat is interchanged between the changing body and any source whatever, heat passes immediately from the body at a higher to the one at a lower temperature, and thus an uncompensated transformation occurs which is greater the greater the difference between the temperatures. In determining such uncompensated transformations, not only must the changes in the condition of the variable matter be taken into consideration, but also the temperatures of the sources of heatwhich are employed; and these uncompensated transformations will be included in N or not, according to the signification which is attached to the temperature occurring in equation (II). If thereby the temperature of the source of heat belonging to dQ is understood, the above changes will be included in N. If, however, agreeably to the above definition, and to our intention throughout this memoir, the temperature of the changing matter is understood, then the above transformations are excluded from N.

One more remark must be added concerning the minus sign prefixed to N, which did not appear in the same equation in my former memoir. This difference arises from the different application of the terms negative and positive with respect to quantities of heat. Before, a quantity of heat received by the changeable body was considered as negative because it was lost by the source of heat; now, however, it is considered as positive. Hereby every element of heat embraced by the integral, and consequently the integral itself, changes its sign; and hence, to preserve the correctness of the equation, the sign on the other side must be changed.

[The reason why, in different investigations, I have changed the significations of positive and negative quantities of heat, is that the points of view from which the processes in question are regarded, differ according to the nature of the investigations. In purely theoretical investigations on the transformations between heat and work, and on the other transformations connected therewith, it is convenient to consider heat generated by work as positive, and heat converted into work as negative. Now the heat generated by work during any cyclical process must be imparted to some body serving as a reservoir or as a source of heat, and the heat converted into work must be withdrawn from one of these bodies. Quantities of heat will receive appropriate signs in theoretical investigation, therefore, when the heat gained by a reservoir is calculated as positive, and that which it loses as negative. There are investigations, however, in which it is not necessary to take into special consideration the reservoirs or sources which receive the heat that is generated, or furnish the heat that is consumed by work, the condition of the variable body being the chief object of research. In such cases it is customary to regard the heat received by the changing body as positive, and the heat which it loses as negative; to deviate from this custom, for the sake of consistency, would be attended with many inconveniences. Researches on the interior processes in a steam-engine are of the latter kind, and accordingly I have deemed it advisable to adopt the customary choice of signs.—1864]

This 1864 date is a bit difficult to track down, possibly referring to experimental work done by Clausius, but generally seems to refer to his 1865 ninth memoir.

References
1. Perrot, Pierre. (1998). A to Z of Thermodynamics. Oxford University Press.
2. (a) Dincer, Ibrahim, Rosen, Marc A. (2007). Exergy (section 1.3.7.: The Clausius inequality, pgs. 10-12). Elsevier.
(b) Cengel, Yunus A., and Turner, Robert A. (2004). Fundamentals of Thermal-Fluid Sciences (pg. 274). McGraw-Hill.
3. Clausius, Rudolf. (1879). The Mechanical Theory of Heat (ch. 10: On Non-Reversible Processes, pgs. 213-34). London: Macmillan & Co.
4. (a) Orr, William McFadden. (1904). “On Clausius’ Theorem for Irreversible Cycles, and on the Increase of Entropy” (section: Clausius’ Theorem: an Enunciation, pg. 519), Philosophical Magazine, Vol. 8, pgs. 509-27. Taylor & Francis.
(b) William McFadden Orr – Wikipedia.
5. Adkins, Clement J. (1983). Equilibrium Thermodynamics (section 5.1: Clausius’ theorem, pgs. 68-71). Cambridge University Press.
6. Goodenough, George A. (1911). Principles of Thermodynamics (Inequality of Clausius, pg. 63). 1916, 2nd ed. New York: Henry Holt & Co.
7. Clausius, Rudolf. (1865). The Mechanical Theory of Heat: with its Applications to the Steam Engine and to Physical Properties of Bodies (Clausius inequality, pgs. 125-30, 329). John van Voorst.
8. Ubbelohde, Alfred René. (1947). Time and Thermodynamics (pgs. 36-40, 80). Oxford University Press.
9. Carnot, Sadi. (1824). “Reflections on the Motive Power of Fire and on Machines Fitted to Develop that Power.” (pg. 20). Paris: Chez Bachelier, Libraire, Quai Des Augustins, No. 55.
10. Lewis, Gilbert N. and Randall, Merle. (1923). Thermodynamics and the Free Energy of Chemical Substances (pgs. 129-31). McGraw-Hill.
11. (a) The equation shown uses a modern variation of German physicist Carl Neumann 1875 notation for the inexact differential, of little Greek delta δ.
(b) Equation on arm was taken from the mathematical descriptions section of the Wikipedia on second law of thermodynamics article, as was added by American chemical engineer Libb Thims on 18 Sep 2006.
(c) Zimmer, Carl. (2010). “Graduating into Entropy”, Discover Magazine Blog, May 02.
(d) The Second law of Thermodynamics (05 Apr 2010) – GeekyTattoo.com.
12. (a) Irreversibility (photo by Marco Fantoni; March, 2008) - Flickr.
(b) Irreversibility – Flickr (Italian → English).
13. Avery, John. (2003). Information Theory and Evolution (pg. 74). World Scientific.