I'm using an interpolation function defined over a limited range & using "Piecewise" to extend the range. This "Piecewise" function defines the derivative in "NDSolve." The result seems to be correct, but an error message results indicating that the interpolation function is being asked to extrapolate out of its defined range. I have used "Piecewise" in the past with "NDSolve" without this error. Using "Integration" to integrate the "Piecewise" function doesn't generate the error message. Here is a simplified version of the code:
hf= Interpolation[{{0, 0}, {1, 0.4}, {2, 1.2}, {4.7, 3.4}, {5, 3.4}, {5.4, 3.3}, {9, 1.8}, {12.5, 1}, {16, 0.1}, {17, 0}}, InterpolationOrder -> 1];
h[t_] := Piecewise[{{hf[t], 0 <= t <= 17}}];
ih = NDSolveValue[{ih'[t] == h[t], ih[0] == 0}, ih, {t, 0, 30}]
{Integrate[h[t], {t, 0, 30}], ih[30]}
Am I doing something wrong? Comments please. Thank you.