# What is the work done by an ideal gas?

What is the work done by an ideal gas when final pressure and volume are both different from its initial pressure and volume or when both pressure and volume changes ?

-

The work done by the gas on the environment is $W = \int_{V_a}^{V_b} P(V)\text{d}V$, where $V_a$ and $V_b$ are the initial and final volumes of the gas and $P(V)$ is the pressure exerted by the gas on the environment when the gas has volume $V$.
There is no simpler expression unless you specify something else about $P$. Work is a path-dependent quantity; there is no way to express the work as a function of simply the starting and ending states of the system.