I know that if we want to calculate the work done on one mole of a gas quasistatically from volume, $V_i$ to volume, $V_f$ we have to calculate:
$W=-\int_{V_i}^{V_f}PdV$
But, what happens if the process is isobaric? As the pressure is constant, it would come out of the integral but then that would imply that if, for example, we have these two equations of state:
$P=\cfrac{RT}{v-b}$ and $P=\cfrac{RT}{v}\left(1-\cfrac{B}{v}\right)$
the value of work made per mole, of the corresponding substance, during a quasi-static expansion from the initial volume $v_i$ to the final volume $v_f$ will it be the same for both?
Since if it leaves the integral we can consider it as a constant $ c $ and therefore the result of the integral would be $ W = c (v_f-v_i) $ for both different equations of state.
Or the correct answers would be:
$W_1=\cfrac{RT}{v-b}(v_f-v_i)$ and $W_2=\cfrac{RT}{v}\left(1-\cfrac{B}{v}\right)(v_f-v_i)$ which causes me confusion that the random variable $ v $ exists.