Integral form of work during an irreversible process? Question
Why can't the work during an irreversible process be integrated? Where is my understanding amiss?
Motivation (for this question)
A lot of my physics background seems to say this is a math problem. My understanding of the problem can be summarised by:
 
-lecture slide
where $P$ is pressure, $V$ is volume and $T$ is temperature. 
My counter solution
Do not consider the "system" as one system in total. But consider the "system" as the aggregate of infinitesimal subsystems. Each with their own $P$,$V$,$T$. One should be able to use the first law of thermodynamics   and construct an integral form of work using this.
 A: If $\Pi$ is the force per unit area exerted by the gas on the face of the piston during an irreversible expansion or compression, then $\int{\Pi dV}$ is indeed the work done by the gas on its surroundings (i.e., the piston).  The problem is that $\Pi$ is not equal to the pressure calculated from the ideal gas law ($P=\frac{nRT}{V}$) because the ideal gas law only applies under a state of thermodynamic equilibrium, and the states experienced by a gas during an irreversible expansion or compression are not thermodynamics equilibrium states.  In an irreversible expansion or compression, because of viscous deformational effects, the force per unit area depends not only on the gas volume but also on the rate of change of gas volume.  So the equation of state cannot be applied to calculate the work.  However, if the piston is massless and the force per unit area of the piston is imposed externally (i.e., controlled manually), then, by Newton's 3d law of motion, $\Pi = P_{ext}$, and the work can be calculated as $\int{P_{ext}dV}$.  
In the case of a reversible process, the gas passes through continuous sequence of thermodynamic equilibrium state, and thus, the ideal gas law can be used to calculate the force per unit area exerted by the gas on the piston:  $$\Pi=P=\frac{nRT}{V}$$ and the work is $$\int{\Pi dV}=\int{\frac{nRT}{V}dV}$$
ADDENDUM
In an irreversible process, the force per unit area at the boundary of your system (as determined, in an irreversible process, by the Newtonian fluid stress tensor) and the rate of heat transfer from the surroundings to the system (as determined by the heat flux vector) are functions of position on the boundary separating the system from its surroundings.  These both vary with position on the boundary.  So you need to integrate over the boundary area the stress tensor dotted with a unit normal and with the boundary velocity vector to get the rate of doing work, and you need to integrate over the boundary area the heat flux vector dotted with the unit normal to get the rate of heat transfer.  You then have to integrate these with respect to time.  It is not enough to integrate the pressure times velocity over the boundary area, since the pressure is only part of the Newtonian stress tensor (the true force per unit area), and does not include viscous contributions to the stress.  
Moreover, to get the stress tensor and the heat flux at the boundary in an irreversible process, you need to solve the Navier Stokes fluid dynamic equations in conjunction with the partial differential thermal energy balance equation (which involves the stress tensor), and the partial differential (mass conservation) continuity equation throughout the domain of the system.
If you want to learn more about all this, please see Transport Phenomena by Bird, Stewart, and Lightfoot.
A: As far as I understand (correct me if I am wrong), the problem is more physical than mathematical, a reversible process is something which we can represent using curves in planes just like in Calculus and that's where the Math starts and also stops.
What's happening with a reversible process is that the work or heat transfer during the process has caused the system to take a particular path and assume its states and hence we use integration formulas like $W = \int pdV $ or $Q = \int Tds $ and so on.
But for an irreversible process, there is no link between the work (or heat) and the states of the system. The end states are totally unrelated to the energy transfer (if you try to fit a process it will a reversible one!) and the intermediate states are unpredictable (theoretically and experimentally: remember you cannot reproduce an irreversible process, then how can you make any observation!?)
So instead what is done is even an irreversible process is represented as a reversible process on the graph and later correction terms are added to indicate irreversibility. 
On a side note: Thermodynamics totally ignores irreversibility in processes and carries on assuming everything as ideal, perfect and reversible.
