What is the work done by the piston when the piston is compressed and there's no internal energy/heat lost from the gas(thermally insulated)? The reason I can't solve this problem is because I have trouble writing pressure as a function of volume/displacement.Here's how far I've done.
Subscript 0 indicates original piston position; 1 indicates piston position after compressed
x: height of piston
A: cross section area of piston
Ideal gas law PV=nRT
$W=\int_{x_0}^{x_1}F\left(x\right)dx$
$=A\int_{x_0}^{x_1}P\left(x\right)dx$
$=A\int_{x_0}^{x_1}\frac{nRT\left(x\right)}{V\left(x\right)}dx$
$=A\int_{x_0}^{x_1}\frac{nRT\left(x\right)}{Ax}dx$
$=nR\int_{x_0}^{x_1}\frac{T\left(x\right)}{x}dx$
I don't know how to express temperature as a function of height, since that would be related to the work done by the piston, which is something I'm calculating.