Numerical Operations on Oscillatory Functions

We consider some typical numerical operations on functions (differentiation, integration, solving differential equations, interpolation) and show how the standard algorithms can be modified to become efficient when the functions are oscillatory, of the form y(x) = f1(x) sin(omega x) + f2(x) cos(omega x) where f1(x) and f2(x) are smooth functions. The expressions of the parameters of the new formulae are written in a way which makes them tuned also for functions of form y(x) =f1(x) sinh(lambda x) + f2(x) cosh(lambda x). Our formulae only require the values of y at some points and those of omega or lambda and they tend to the classical formulae when omega or lambda tends to zero. For the derivation we follow the exponential fitting technique introduced in a previous paper (L. Gr. Ixaru, Comput. Phys. Commun. 105 (1997), 1-19). We list the tuned expressions for the first and the second derivative, for the Simpson quadrature formula and for the Numerov algorithm to solve differential equations. We also show how the Gauss quadrature rule can be adapted and finally give a few tuned formulae for the interpolation. Numerical illustrations are presented for each case. Some open problems are also mentioned.