# Setting up integration, thermodynamics

1. Sep 19, 2010

### Markel

I have a general problem with finding the right parts for integrations.

For example, for an Isothermal expansion, both pressure and volume are changing. For some reason we call V=dv and relate P to V by the ideal gas law and integrate to get work:

W= nRT ln (VF/ Vi)

Now, could we do the same thing, and call work the integral of:

W= $$\int$$Vdp

W= nRT ln (Pf/ Pi)

If both quantities are changing? How do we know which to set as the differential, and which to relate in terms of the other variable?

or why couldn't I do a double integral? first over the volume, then over the pressure?

Also: Why does the LAtex code show up all messed up when I hit 'preview post'....?

thanks