>>12272051 There are a variety of relationships between volume and pressure for a given total work done depending on the application.
In practice, to find the relationship between pressure and volume at each temp is no more or less experimentally difficult than just measuring the work done directly. So given that you want the total work done, just measure it.
If it is for a project that is too huge to do experimentally, your best bet is
>>12272114 for the closest configuration.
Nothing in the real world is adiabatic or polytropic and both still require you to know n.