Formulae for Heat Change and Internal Energy Change in a Thermodynamic Process Today, we were being given a lesson on Thermodynamics when my brain encountered an error.
It is easy to derive that, $\Delta U$, the internal energy change for constant volume process is given by,
$$
\Delta U = nC_V \Delta T
$$
and that enthalpy change for a constant pressure process is given by
$$
\Delta H = nC_P \Delta T
$$
However, my teacher later mentioned that internal energy and enthalpy changes are given by the same equations for any thermodynamic process. They need not be constant volume/pressure processes.
I can't figure out why should that be true. A hint shall be enough.
 A: A very general discussion-Not specific to a system:
The internal energy, $U$, of a system is a function of state, which means that its value only depends on the thermodynamic variables ($P, V, T)$ for example, at a given state (this means for a given set of values of these variables). 
Let us  make this more concrete: Imagine the system is in a thermodynamic state where the thermodynamic variables have the values ($P_i, V_i, T_i$) ($i$ stands for initial). At these values of the thermodynamic variables the internal energy has a value:
Internal energy at the initial state $i$:  $U(P_i,T_i,V_i)$.  
You can think of a gas at pressure, volume and temperature condition ($P_i, V_i, T_i$). Now imagine you change the thermodynamic variables to these ones ($P_f, V_f, T_f$) ($f$ stands for final).  The internal energy now has a new value 
Internal energy at the initial state $f$:  $U(P_f,T_f,V_f)$.  
In this process you have changed the internal energy of the system by an amount: 
Change in U: $\Delta U= U(P_f,T_f,V_f)- U(P_i,T_i,V_i)$
I hope it is clear to observe that the system could have followed an infinitely large set of $(P,V,T)$-points, along an infinitely large number of different paths in order to go from state $i$ to state $f$. However, these are not, in any way, influencing by how much $U$ will change, you can take which ever path you please to go from state $i$ to state $f$. So the system has no memory of the intermediate states.
In mathematical terminology, this means that the differential change, $dU$, is a perfect differential and this is stated by the simple mathematical expression
$\oint_C dU=0$ 
It is very similar to the gravitational potential of the Earth, for example, which tells us that the amount of energy we need to spend to lift an object by 3m, does not depend whether we bring it straight vertically up or we follow some other path. 
A: Consider the internal energy $U$.
The internal energy of a thermodynamic system is state function meaning that it is a number associated with the state of a system and not, for example, a thermodynamic process that the system undergoes.
It is also the case, that for an ideal gas in particular, it is a function of state that depends only on the quantity of gas which can be characterized by the number of moles $n$, and the absolute temperature of the gas $T$.  In other words
$$
  U = U(n,T) = nC_VT
$$
Given this fact, can you now see why the change in internal energy is given that that formula and does not depend on the process which takes the system from its initial state to its final state?
A: Your teacher is correct if you are dealing with ideal gases.  For an ideal gas $(\partial U/\partial V)_T = 0$ so any change in volume won't change the internal energy.  Similarly $(\partial H\partial p)_T = 0$ so any change in pressure won't change the enthalpy.
With respect to the question you asked in bold type above if the gas is not ideal, those two derivatives are not, in general, zero and so those two formulas are not valid in general.
A: Change in internal  energy = $E_{\rm initial} - E_{\rm final}$
