Efficiency of a cycle in TS diagram

1. The problem statement, all variables and given/known data
A working substance goes through a cycle within which the absolute temperature varies n-fold, and the shape of the cycle is
,
where T is the absolute temperature, and S the entropy. Find the efficiency cycle.

The total heat is [tex]Q=\int T dS[/tex], that is the area of the surface in the picture. I could just say: it's a triangle so I'll use the formula for the triangle surface:
[tex]P=\frac{1}{2}ab[/tex].

The [tex]Q_{in}[/tex] is easy to calculate:[tex]Q_{in}=T_0\int_{S_0}^{S_1}dS=T_0(S_1-S_0)[/tex].

But how do I get the [tex]Q_{out}[/tex]? The temperature changes. I have found in solution (without explanation) that the answer is:

[tex]Q_{out}=\frac{1}{2}(T_0+T_1)(S_1-S_0)[/tex], but why [tex]T_0+T_1[/tex]? and where does that 1/2 comes from? The triangle area formula? :\

No, it's trapezium's area.
But why don't you look at it another way? The "total heat" you calculated is actually work done A! And for a cycle: [tex]A = Q_{in} - |Q_{out}|[/tex]. So instead of doing an integration or wondering it's triangle or something else, just calculate a simple sum.

No, it's trapezium's area.
But why don't you look at it another way? The "total heat" you calculated is actually work done A! And for a cycle: [tex]A = Q_{in} - |Q_{out}|[/tex]. So instead of doing an integration or wondering it's triangle or something else, just calculate a simple sum.

Ummm it's triangle :D

I don't get it how to calculate the sum when I don't have the work :\ [tex]A=W=pdV[/tex] right? 1-2 is isotherm, 2-3 is isenthalp (no Q) and 3-1 is sth I don't know :D I could say that its a line with slope k, which is not that hard to calculate, but I don't have the y-intercept (T in my graph)...