🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: sci.math.num-analysis
4 messages
4 total messages Started by Jack W. Sharer Thu, 03 Sep 1992 13:18
Oscillatory Integration?
#412
Author: Jack W. Sharer
Date: Thu, 03 Sep 1992 13:18
25 lines
1063 bytes
I'm having to evaluate this integral:

          /\ 0.5
         /           N
        /      f(x) D (2 pi x + phi) dx
       /
     \/ -0.5

                       N
for N ~ 500 and where D (x) is the N-point Dirichlet kernel:


               iNx
       N      e    - 1
      D (x) = --------,  i = sqrt(-1)   (highly oscilatory for large N)
                ix
               e  - 1

I'm successfully using a 2000-point Simpson integration, but I cannot
begin to evaluate all the needed cases (limited by computer resources).

Could you suggest a change of variable or another technique which
would dramatically improve the integration speed?

Thanks, Jack Sharer, Penn State, j0s@psuvm.psu.edu
Re: Oscillatory Integration?
#414
Author: William Mccreight
Date: Thu, 03 Sep 1992 15:39
3 lines
665 bytes
You should try Filon's method, which approximates the slowly-
varying factor by a polynomial and the integrates. One ref isr
Davis ananad rabinowitz, Numerical Integration.
Re: Oscillatory Integration?
#415
Author: Mihai Dorobantu
Date: Thu, 03 Sep 1992 16:33
52 lines
2440 bytes
In article <92247.091826J0S@psuvm.psu.edu>, Jack W. Sharer <J0S@psuvm.psu.edu> writes:
|> I'm having to evaluate this integral:
|> 
|>           /\ 0.5
|>          /           N
|>         /      f(x) D (2 pi x + phi) dx
|>        /
|>      \/ -0.5
|> 
|>                        N
|> for N ~ 500 and where D (x) is the N-point Dirichlet kernel:
|> 
|> 
|>                iNx
|>        N      e    - 1
|>       D (x) = --------,  i = sqrt(-1)   (highly oscilatory for large N)
|>                 ix
|>                e  - 1
|> 
|> I'm successfully using a 2000-point Simpson integration, but I cannot
|> begin to evaluate all the needed cases (limited by computer resources).
|> 
|> Could you suggest a change of variable or another technique which
|> would dramatically improve the integration speed?
|> 
|> Thanks, Jack Sharer, Penn State, j0s@psuvm.psu.edu
Try an FFT !
Note that D(x) = 1 + exp(ix) + ...+ exp(i(N-1)x) = exp(-iMx)+...+exp(iMx)
where M=N/2.

So the integral is just the sum of the first N Fourier coeficients of f viewd
as a 1-periodic function. The only thing to do is to pick up N equaly spaced
points on [-1/2 1/2], evaluate f and then add the components of fft(f).
For a non-zero phase parameter phi, just change the variable but don't
forget to extend f. See your implementation of FFT, you might have to
multiply or divide by sqrt(N) depending on whatever normalization was done
in implementing the FFT algorithm.

I tried it in MATLAB. Up to N=2^14 i had an "instant" answer, waited
for 1 sec. with N=2^16 and a few seconds for N=2^17. (And I wasn't useing
a workstation or a fast PC, just a terminal,sharing time with 40 
other users!!!)

The FFT algorithm uses O(N log N) operations, so it is almost as 
fast as possible. It is also very stable to rounding and truncation errors.


Good luck,
Mihai Dorobantu

Dept.for Numerical Analysis and Computer Science
The Royal Institute for Technology, Stockholm - Sweden
Re: Oscillatory Integration?
#463
Author: Joseph Mathew
Date: Sat, 05 Sep 1992 02:19
29 lines
1465 bytes
In article <92247.091826J0S@psuvm.psu.edu> J0S@psuvm.psu.edu (Jack W. Sharer) writes:
>I'm having to evaluate this integral:
>
>          /\ 0.5
>         /           N
>        /      f(x) D (2 pi x + phi) dx
>       /
>     \/ -0.5
>
>                       N
>for N ~ 500 and where D (x) is the N-point Dirichlet kernel:
>
>
>               iNx
>       N      e    - 1
>      D (x) = --------,  i = sqrt(-1)   (highly oscilatory for large N)
>                ix
>               e  - 1
>
>I'm successfully using a 2000-point Simpson integration, but I cannot
>begin to evaluate all the needed cases (limited by computer resources).
>
>Could you suggest a change of variable or another technique which
>would dramatically improve the integration speed?

	Since D(x;N) = 1 + exp(ix) + exp(2ix) + ... + exp((N-1)ix)
aren't you just looking for the sum of the Fourier coefficients?

Joseph Mathew
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads