| Issue 841: | integrate(exp(-x**2)*exp(I*k*x), (x, -oo, oo)) doesn't calculate the integral | |
| 5 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
The Fourier transform of a Gaussian: integrate(exp(-x**2)*exp(I*k*x), (x, -oo, oo)) is sqrt(pi)*exp(k**2/4), but sympy can't calculate it yet. Of course, it should implement the most general case: integrate(c*exp(-x**2/a)*exp(I*k*x), (x, -oo, oo)) with a>0 I don't mind implementing it myself, but as I'm new to sympy I'm still looking for the right place to add the code. Either a patch, or hints to where the integration rules are stored would be welcome. |
||||||||||||||
,
May 06, 2008
This should be useful: http://www.ph.tn.tudelft.nl/~lucas/education/tn254/2002/Fourier%20transform%20of%20a%20Gaussian.pdf I've found the place where the substitution is made for the integral of exp(-a*x**2) in risch.py. I suppose that is the right place to implement this integral. Should Fourier transforms have their own function (as in Maple), or should the normal integrating routine be able to calculate them? I think the former would be better, and even better if Dirac deltas were supported without further imports. |
|||||||||||||||
,
May 07, 2008
> I don't mind implementing it myself, but as I'm new to sympy I'm still
> looking for the right place to add the code. Either a patch, or hints to
> where the integration rules are stored would be welcome.
I attached a patch solves your integral:
In [1]: integrate(exp(-x**2)*exp(I*k*x), (x, -oo, oo))
Out[1]:
2
k
──
⎽⎽⎽ 4
╲╱ π *ℯ
That's how I'd implement it, Mateusz, do you have any comments to it?
João, feel free to take the patch, add more integrals, tests, docstrings.
> Should Fourier transforms have their own function (as in Maple), or should the normal
> integrating routine be able to calculate them? I think the former would be better,
> and even better if Dirac deltas were supported without further imports.
I think we can have a function for it to have something now. However, the integration
code should be able to handle them as well in the long term.
Status: Started
Labels: NeedsReview |
|||||||||||||||
,
May 07, 2008
> That's how I'd implement it, Mateusz, do you have any comments to it? For now it's OK, in longer term I will handle integrals of this kind via Meijer G-functions (this will also provide (quite) general interface for all sorts of transforms like Laplace etc.). |
|||||||||||||||
,
May 20, 2008
joaolsi, do you need anything else to get you going? What remains to be done is to write a test, then it can go in.
Labels: -NeedsReview easy-to-fix
|
|||||||||||||||
,
May 21, 2008
(No comment was entered for this change.)
Labels: -easy-to-fix EasyToFix
|
|||||||||||||||
,
Sep 20, 2008
Let's get this in, it's almost ready.
Labels: Milestone-Release0.6.3
|
|||||||||||||||
,
Nov 13, 2008
(No comment was entered for this change.)
Labels: -Milestone-Release0.6.3 Milestone-Release0.6.4
|
|||||||||||||||
,
Feb 08, 2009
(No comment was entered for this change.)
Labels: -Milestone-Release0.6.4 Milestone-Release0.6.5
|
|||||||||||||||
,
Jul 13, 2009
(No comment was entered for this change.)
Labels: Milestone-Release0.6.6
|
|||||||||||||||
,
Dec 01, 2009
Who want's to work on this? |
|||||||||||||||
,
Dec 01, 2009
(No comment was entered for this change.)
Labels: NeedsBetterPatch
|
|||||||||||||||
| ► Sign in to add a comment | |||||||||||||||