// Calculate the integral of cos(x)*exp(-x/64)/sqrt(x) over // the interval (0, infinity). real f(real x) { return x <= 0 ? 0 : exp(-x/64) / sqrt(x); } auto i = integrateQAWF(&f, 0.0L, 1.0L, Oscillation.cos, 1e-15L);
integrateQAWO(), for similar integrals over a finite interval.
Calculates a Fourier transform integral.
Use this to calculate the integral of f(x)*cos(omega*x) or f(x)*sin(omega*x) on the interval (a,$(INFTY)). The weight function is specified by setting weight to Oscillation.cos or Oscillation.sin.
The procedure of integrateQAWO() is applied on successive finite intervals, and convergence acceleration by means of the Epsilon algorithm is applied to the series of integral approximations.
Note: This function is unique among the QUADPACK integrators in that you must specify an absolute accuracy, not a relative one.