Group Abstract

Message Boards

Appropriate method for numerical integration of InterpolatingFunction

I have a number of solutions of a system of ODEs, i.e. a set of InterpolatingFunction(s). Using NIntegrate I try calculate integrals of these functions, their derivatives and products of different combination of functions and their derivatives.Say, f1 -- InterpolatingFunction, I find f1' as f1d[t_] = D[f1, t]. The functions are quiet smooth (red -- f1, blue -- f1'):But during numerical integration a bulk of warnings appears:NIntegrate[f1d f1, {t,0,1}, WorkingPrecision -> 100]NIntegrate::slwcon: Numerical integration converging too slowly; suspect one of the following: ............NIntegrate::eincr: The global error of the strategy GlobalAdaptive has increased more than 400 times. Th............It's clear, that an appropriate method for such case shoud be used, but what exactly?

Strongly related MMa.SE thread: "How to integrate functions of linearly interpolated data?"In short, you need an InterpolatingFunction computed with at least 50 digits of Precision and use the "InterpolationPointsSubdivision" preprocessor of NIntegrate with appropriate "MaxSubregions" suboption: