I am trying to calculate the work done on an ideal gas in a piston set up where temperature is kept constant. I am given the volume, pressure and temperature.
I know from Boyle's law that volume is inversely proportional to pressure that is,
$$V \propto \frac{1}{p}$$
using this I can calculate the two volumes I need for this equation to calculate work done:
$$\Delta W = - \int^{V_2}_{V_1} p(V)dV$$
but what I do not understand is how to use this equation to help me calculate the work done, I think I am confused by the fact that I need to have $p(V)$ but I am not sure what this is. If you could help me to understand this, that would be great