How will you calculate the work done on an ideal gas in a compression

How will you calculate the work done on an ideal gas in a compression, when change in pressure is carried out in infinite steps?

When compression is carried out in infinite steps with change in pressure, it is a reversible process. Work done on the gas is represented by the shaded area