# Work done on/by a gas

#### joshto

##### Nervous&Neurotic
10+ Year Member
Which set of the following are correct, and why?

According to U=q-w:
i) When work is done BY the gas, energy is lost. "W" is positive.
When work is done ON the gas, energy is gained. "W" is negative.

According to U=q+w:
ii) When work is done BY the gas, energy is lost. "W" is Negative.
When work is done ON the gas, energy is gained. "W" is positive.

*I had learned that whenever work is done by a gas, it has lost energy (because it had done work), which would make W negative.

#### bigballer27

##### That's what she said
i think of it as a much simpler way

when the piston is being pushed out (twards the surr), the volume increases so the work is neg as work is being done by the sys(gas) on the surr...think about it like you are pushing the piston out, away from you

when the piston is being pushed in, V decreases, so W must be positive because the surr is doing work on the sys(gas)

so the eqn should be E=q+w and if you know that work is neg, and the system is insulated (q=o), then E is also negative

using w=-PdV also helps

#### joshto

##### Nervous&Neurotic
10+ Year Member
how you explain it is how ive always learned it:

gas does work, gas loses energy, gas expands, work is negative

gas had work done on it, gas gains energy, gas compresses, work is positive

where does this e=q-w come into play?
i ask because i was going through the list of mnemonics, and found this:
Change in Energy=Q-W (Q: heat, W: work)

When work is done BY the gas, energy is lost. "W" is positive.
When work is done ON the gas, energy is gained. "W" is negative.

#### UCB05

Looks like the only difference between the two statements is how work is defined in each of them. In the first statement positive work is defined as energy lost by the gas as a result of it performing work (work done by the system). In the second statement positive work is defined as energy received as a result of an outside factor performing work on the gas (work done on the system).

I was taught to do it both ways, but as long as you keep your sign convention consistent, you'll get the same answer.
i) gas does work, work as defined is positive, gas loses energy by q-w
ii) gas does work, work as defined is negative, gas loses energy by q+(-w)

*edit* and if you use w=-PdV you would default to the second

#### joshto

##### Nervous&Neurotic
10+ Year Member
in other words, I would be okay if I ignored the E=q-w formula (b/c I haven't practiced with it), correct?

#### UCB05

in other words, I would be okay if I ignored the E=q-w formula (b/c I haven't practiced with it), correct?
If you understand that a system gains energy by having heat added or having work done on it, sure, it doesn't matter which one you use.

#### Doodl3s

7+ Year Member
i would also kinda tell you not to use the equation lol.

the way i do it is imagine the equation: U = Q _ W
and you know if something does work, it no longer has the potential to do the work it just did again, so if the gas does work, it must DROP U, meaning you subtracted the W. Think of it from 3rd person, what SHOULD happen to U.

#### Flapjacks

##### Membership Revoked
Removed
Which set of the following are correct, and why?

According to U=q-w:
i) When work is done BY the gas, energy is lost. "W" is positive.
When work is done ON the gas, energy is gained. "W" is negative.

According to U=q+w:
ii) When work is done BY the gas, energy is lost. "W" is Negative.
When work is done ON the gas, energy is gained. "W" is positive.

*I had learned that whenever work is done by a gas, it has lost energy (because it had done work), which would make W negative.
First of all its U = q + w

w = - P delta V

when work is done by the gas on the surrounding w is negative. (volume gets bigger)
when work is done on the gas by the surroundings it is positive (volume gets smaller)