[SciPy-User] integral of oscillatory functions

Emanuel Woiski woiski at gmail.com
Sun Jul 31 08:04:10 EDT 2011


2011/7/31 Juan Fiol <fiolj at yahoo.com>

> Thanks for all the answers. They were  very helpful. In general, seems that
> there is no other way that to tackle the specific problem with some
> analytical work. I'l look more deeply into that, and let you know if
> something interesting pops out.
>
> Joshua, thanks for the link. I think that the method at what the document
> refers is the one I've mentioned as "asymptotic". I'd already skimmed over
> most of the papers cited there but as I said only the surface. I think that
> this document has an amenable enough presentation that will make it useful
> to give a try.
>
> Adam: I'll look further into the asymptotic methods. The problem is that
> the oscillatory part is complicated enough to make it painful to go through
> the analytical work. I do not plan to do the work in scipy/numpy. I am
> trying to solve the problem in python but need then to adapt the solution to
> one of my fortran programs.
>
> Charles: I apologize for not being specific enough. The integrand itself is
> quite complicated. Moreover its form may change.
> I am attaching a short pdf with my current definitions, but in python would
> be something as
>
> # Auxiliary functions and definitions
> # These values will be changing
> w0= 0.4
> dw= 0.1
> w=np.array([w0,w0+dw, w0-dw])
> A=3.
> B=4.
>
> Omega= B - (A*(a/np.square(w))).sum()
>
> def h(t):
>   return ((a/w)*(np.cos(w*t))).sum() + C
>
> def G(t):
>   return (k_A*(a/np.square(w))*np.sin(w*t)).sum()
> # function to integrate
> def integrand(t):
>   return np.exp(1j* G(t)) * np.exp(1j* Omega*t) * f(t)
>
>
> Upon examination of your equations, I thought you should try mpmath [1] or
even better sympy [2], which is an open source Python library for symbolic
mathematics, and uses mpmath internally. Another alternative is Sage [3]
whose Mission statement is: *Creating a viable free open source alternative
to Magma, Maple, Mathematica and Matlab*. I'd try sympy first.

[1]  code.google.com/p/*mpmath/*
[2]  code.google.com/p/*sympy*/
[3]  http://www.sagemath.org/

>
> regards
woiski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20110731/2a8c4f3a/attachment.html>


More information about the SciPy-User mailing list