My book defines work in pressure-volume work as: $$\mathrm{d}w = - P_\mathrm{ext} \mathrm{d}V$$
However before doing so it mentioned the piston to be massless.
In physics, work is defined as $$\mathrm{d}w = P_\mathrm{in} \mathrm{d}V$$
- What is the correct definition of pressure-volume work in chemistry?
- Does the definition of work, $$-P_\mathrm{ext} dV$$ change if the piston was not massless in chemistry?
P.S. My question was mainly pointed towards the mathematical expression of work in Chemistry,that is, 'What is the most general work expression in Chemistry in relation with the First Law'.
Some of the users have been suggesting me to check out answers on sign convention of work. I do appreciate it but my question is different and is perhaps best interpreted in @Chet Miller answer.