In an isothermal process, the temperature of the gas remains constant. For an ideal gas undergoing an isothermal expansion or compression, the change in internal energy \( \Delta U = 0 \) because internal energy of an ideal gas depends only on temperature, and the temperature does not change.
- The first law of thermodynamics is given by:
\[
\Delta U = q + w
\]
Since \( \Delta U = 0 \) for an isothermal process, we have:
\[
q = -w
\]
This means the heat absorbed by the gas \( q \) is equal in magnitude to the work done by the gas \( w \), but with opposite signs.
Thus, \( \Delta U = 0 \), \( q \neq 0 \), and \( w \neq 0 \).
Therefore, the correct answer is option (2).