This is a question from the book, Understanding Non-Equilibrium Thermodynamics by Lebon and Jou.
Show that the work performed by an engine during an irreversible cycle operating between two thermal reservoirs at temperatures $T_{1}$ and $T_{2} < T_{1}$ is given by $W = W_{max} − T_{2} \Delta S$, where $\Delta S$ is the increase of entropy of the Universe, and $W_{max}$ is the corresponding work performed in a reversible Carnot cycle.
I read this but still have some problems. The first one is about the system. Is the system the working substance or the working substance and the reservoirs? I think the latter is a better choice, because it would make the problem unnecessarily complicated if there were a surrounding with two different temperatures. So, everything happens within this system including the three subsystems. Can I assume here that this system is isolated? I think it is not necessary to do so. My second question is that should I consider the irreversibility of the processes of the exchanges of heat, too or only when the work is done? I mean I have seen in the textbooks the sign $Q_{rev}$ which denotes the heat exchanged during a reversible process. So the exchange of heat is also irreversible. The main problem is when I want to write the equations. I can simply write that in a reversible process the production of entropy is zero and according to the first law of thermodynamics we have, $$W_{max}=Q_{1,rev}-Q_{2,rev}$$ and in an irreversible process, according to the second law of thermodynamics and because of the production of entropy we also have the term $T_{2}\Delta S$, so $$Q_{1,rev}-Q_{2,rev}=W_{irr} + T_{2}\Delta S$$ But I think I need to write more equations. I have to show that the equation holds. Does this hold in an irreversible process? $$Q_{1,irr}-Q_{2,irr}=W_{irr}$$ How can I proceed from this point?