Apparently, it shouldn't make any sense for it gives weird results when you compute e.v. of momentum for a part of infinite potentital well (say well is [0,a] and you do the e.v. integral from [0,a/3]]). Why do we have to integrate over all the space then?