# Interpolate and integrate data with error messages

If I have the following code, where cp74[j] represents a very long list (e.g. {{a,b}{c,d},{e,f},{g,h},...} for different j values.

 Do[
cpi = Interpolation[cp74[j], InterpolationOrder -> 10];
cpint = -Integrate[cpi[x], {x, 90.01, 74}]
// Print, {j, 1, 10, 1}
]


What is the reason I am getting error messages like this that include 73.9626 which is below the range of integration:

Also I noticed that when I remove the line of cpint = -Integrate[cpi[x], {x, 90.01, 74}] just to see the interpolation that I am getting, I get at least three messages like this, where it says that Data not in notebook:

What can I do to solve the problem and be able to interpolate and integrate this data?.

Thank you

• Can you plot the data in the interpolating function? It appears as if there is no data there or it is not in the form that you seem to expect. – bill s May 9 '20 at 1:25
• I cannot reproduce the problem. The second error message indicates that x has a value. Try Clear[x] and re-execute – Michael E2 May 9 '20 at 1:56
• By the way, Integrate[cpi[x], x] will return the antiderivative more quickly that evaluating the definite integral. – Michael E2 May 9 '20 at 2:15
• @MichaelE2 thank you! You are right. My problem was exactly that I have a very long code and x was defined someplace else and that is what was giving me problems! Thanks for the catch ! – John May 9 '20 at 2:58