fixed sparse grid so that it can integrate on arbitrary sized intervals