I have a problem in which I'm solving for -w. My equation is this:

-w= nRT ln V2/V1
However, I don't know the value of n, but I do know the values of P, V, and T. If I fill in (PV/RT) for n in the above equation, would I be using the energy R or the gas R?

The R you use is the Gas Constant.
If V is in liters, P is in atm and T is in K, the value of R is
R = 8.205*10^-2 liter-atm/(mole-K)

thank you drwls

To find the value of -w using the given equation -w = nRT ln(V2/V1), you need to replace n with (PV/RT).

Since you have parameters P, V, and T, you can use the Ideal Gas Law:

PV = nRT

Rearranging this equation, you can solve for n:

n = PV/RT

Now, substitute this value of n into the original equation:

-w = (PV/RT) * RT ln(V2/V1)

Simplifying further:

-w = PV ln(V2/V1)

So, using the Ideal Gas Law, you can replace n with (PV/RT), and the equation becomes -w = PV ln(V2/V1).

Regarding the value of R, in this context, you would use the gas constant R. The gas constant R has a value of 8.205*10^-2 liter-atm/(mole-K) when V is in liters, P is in atm, and T is in Kelvin.