I have the following piece of a Mathematica notebook:
As I understand, the interpolating function M1hatInterp is piecewise polynomial and hence can be integrated exactly. Why does Integrate not work here?
Is there a way around this? Also, is it possible to see what the piecewise interpolating function actually is?

NIntegrate. Or try converting the interpolating function into an explicit piecewise polynomial (see https://mathematica.stackexchange.com/questions/59944/extracting-the-function-from-interpolatingfunction-object). – Michael E2 Aug 06 '21 at 20:47NIntegrate, since I need an exact result. – Iosif Pinelis Aug 06 '21 at 20:49PiecewiseExpandisn't one of the methods in the linked Q&A. I like Carl Woll's method, personally. -- As a side note, if you post code people can play with, you're more likely to get a usable answer. I could make up my own function, but then I would solve my problem, not yours. And there's a good chance, you'll tell me that my method turns out not to work on yours, and I'll be mad about how I spent my time. – Michael E2 Aug 06 '21 at 21:35