[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] Numerical integration
From: |
Jonny Taylor |
Subject: |
[Help-gsl] Numerical integration |
Date: |
Wed, 2 Sep 2009 17:38:27 +0100 |
Hi all,
My code needs to numerically integrate a function between known finite
limits (which is what currently takes most of its run time), and I am
trying to work out of any of the GSL routines can help with this. The
function has a sort of carrier/envelope form:
f(x) = g(x) exp(i a x)
and I am trying to determine:
int(f(x), 0, x2)
g(x) is a function which has a known, fairly complicated, but well-
behaved, analytical form (and it doesn't appear possible to even begin
to symbolically integrate either f(x) or g(c))
At the moment I am just using a simple Simpson's rule to integrate it.
The carrier frequency is not enormous, but is high enough frequency to
require quite a few sample points. I feel that because of this
specific form there ought to be some sort of shortcut or special
technique that could separate out the "carrier wave", so that
effectively all that needs to be sampled is the slowly-varying
envelope. Can anyone suggest a suitable technique that I could use for
this? (ideally one implemented in GSL, but I can code it up from
scratch if required). Someone suggested to me that some sort of trick
involving fourier transforms might help, but I haven't really got
anywhere with that as yet.
Thanks in advance for any suggestions
Jonny