I've seen work often represented by the formula $$W = PΔV$$ But there are also other formulas, which represent different types of work. For example,
Non Flow Work $$ W =\int_{1}^{2} PdV $$
Steady Flow Work $$ W =\int_{1}^{2} -VdP $$
Polytropic Work $$ W = \frac{P_2V_2-P_1V_1}{1-n} $$
I just want to ask, what is the general formula or at least representation of a formula for work in terms of pressure and volume that encompasses everything? One where I can kind of derive or at least have an intuition where the specific formulas for work are coming from.
If it is just work times pressure and volume, how do you determine which one becomes the differential variable and which one stays constant in an integral? When is the delta sign used in place of differential? When are both not constant, just like in the polytropic process?
I've studied about types of work in thermodynamics but am not that familiar so I decided to ask here to have a more clear comparison and contrast on the different concepts.