An ideal gas at initial pressure $p_1$ undergoes an adiabatic expansion from volume $V_1$ to volume $V_2$. Assuming $\gamma$ is constant, find the final pressure and show that the work done is
$$
W=\frac{p_1 V_1}{\gamma-1}\left(\left(\frac{V_1}{V_2}\right)^{\gamma-1}-1\right) .
$$