The approach taken in this answer is also applicable to this problem.
Construct the function to be integrated:
derPhi = Head[Simplify[D[WaveletPhi[DaubechiesWavelet[8], x], x], 0 < x < 15]]
Verify that we have a piecewise linear interpolant:
derPhi["InterpolationOrder"]
{1}
This means, we can use a low-order quadrature rule to evaluate (sub-)integrals between the interpolation points.
Verify how many interpolation points are used in the integration interval of interest:
Count[Flatten[derPhi["Grid"]], x_ /; 1/4 < x < 1/2]
63
We can then use the "InterpolationPointsSubdivision"
method of NIntegrate[]
. The count above is well within the default setting of "MaxSubregions"
, so that doesn't need to be adjusted:
NIntegrate[derPhi[x], {x, 1/4, 1/2},
Method -> {"InterpolationPointsSubdivision",
Method -> {"GaussKronrodRule", "Points" -> 2},
"SymbolicProcessing" -> 0}]
0.009721637451048174
If
withPiecewise
since the latter is better suited for numeric functions while the former is intended more for programmatic use. $\endgroup$