Calculate internal energy, heat transfer, and work done using the first law of thermodynamics. Step-by-step solutions for closed and open systems.