# Thermodynamics - Work Done in a Closed System (Polytropic?)

Just want to check that I've used the correct method for this thermodynamics question i've been set. Any clarification would be greatly appreciated.

So I have a closed system in which a gas is compressed from a pressure of 3 bar absolute to 5 bar absolute. The volume changes from 0.9m^3 to 0.6m^3 after compression. This is according to the law P1*V1^n = P2*V2^n.

I've calculated the value n using transposition and logs.

I need to find:
b) The work done, stating whether it is done on the system or on the surroundings.

2. The attempt at a solution

b) P1 = 3 bar = 300000 n/m^2
P2 = 5 bar = 500000 n/m^2
V1 = 0.9 m^3
V2 = 0.6 m^3
Index N = 1.26

I believe the formula that you are supposed to use is the polytropic process formula for work done:

Work Done = (P1*V1) - (P2*V2) / N-1

Work Done = (300000*0.9) - (500000*0.6) / 1.26-1

Work Done = 270000 - 300000 / 0.26

Work Done = -115385 Joules
-115.4 KJ

Because the work done is a negative value I believe the work is being done on the system.

Now have I done this correctly or have I slipped up and used the wrong method? Cheers for any help!