*To*: mathgroup@smc.vnet.net*Subject*: [mg11073] Computing my own function efficiently*From*: Tommy Nordgren <f85-tno@nada.kth.se>*Date*: Wed, 18 Feb 1998 20:32:24 -0500*Organization*: Royal Institute of Technology (KTH)

I have a function that is defined by: f[k_,b_] := Integrate[ Cos[b x] Exp[-x^2]/(k^2+x^2),{x,-Infinity,Infinity}] Since Mathematica can't solve the integral, I'm looking for ways to efficiently perform the integration. I don't think a Gaussian quadrature formula based on hermite polynomials would do the trick, since Cos[b x]/(k^2+x^2) can't be well fiited to a polynomial globally. Using simpsons formula will be inefficient for large b, since for highorder accuracy it's necessary to use steps shorter than the period of the cosine. The approach I'm considering is to derive the integral of Cos[b x] times a second-order polynomial, and approximate the integral as the sum of several such segments. What I'm wondering about now, is how to get a good error estimate of this method. -- ------------------------------------------------------------------------- Tommy Nordgren "Home is not where you are born, Royal Institute of Technology but where your heart finds peace." Stockholm Tommy Nordgren - The dying old crone f85-tno@nada.kth.se --------------------------------------------------------------------------