Status: Valid
Owner: ----
CC: ness...@gmail.com
Labels: Type-Defect Priority-Medium Integration Matching Evalf
New issue 3249 by asmeu...@gmail.com: Difficulty with integrate(exp(I*x)/(1
+ x**2), (x, -oo, oo))
http://code.google.com/p/sympy/issues/detail?id=3249
In [598]: integrate(exp(I*x)/(1 + x**2), (x, -oo, oo))
Out[598]:
⎛ │ -ⅈ⋅π⎞ ⎛ │ ⅈ⋅π⎞
╭─╮3, 1 ⎜ 1/2 │ ℯ ⎟ ╭─╮3, 1 ⎜ 1/2 │ ℯ ⎟
│╶┐ ⎜ │ ─────⎟ │╶┐ ⎜ │ ────⎟
╰─╯1, 3 ⎝1/2, 0, 1/2 │ 4 ⎠ ╰─╯1, 3 ⎝1/2, 0, 1/2 │ 4 ⎠
──────────────────────────────── + ───────────────────────────────
___ ___
2⋅╲╱ π 2⋅╲╱ π
The answer should be pi/E. If you try to check this with evalf, you get
In [599]: integrate(exp(I*x)/(1 + x**2), (x, -oo, oo)).evalf()
Out[599]:
⎛ │ -ⅈ⋅π⎞
╭─╮3, 1 ⎜ 1/2 │ ℯ ⎟
0.282094791773878⋅│╶┐ ⎜ │ ─────⎟ + 0.577863674895461 -
0.64676112277913⋅ⅈ
╰─╯1, 3 ⎝1/2, 0, 1/2 │ 4 ⎠
I can't get the G-function to evalf. Furthermore, if I try to substitue
the numerical answer, it doesn't work:
In [600]: integrate(exp(I*x)/(1 + x**2), (x, -oo,
oo)).evalf().subs(meijerg(((1/2,), ()), ((1/2, 0, 1/2), ()),
exp_polar(-I*pi)/4), 2.04 - 2.29*I)
Out[600]:
⎛ │ -ⅈ⋅π⎞
╭─╮3, 1 ⎜ 1/2 │ ℯ ⎟
0.282094791773878⋅│╶┐ ⎜ │ ─────⎟ + 0.577863674895461 -
0.64676112277913⋅ⅈ
╰─╯1, 3 ⎝1/2, 0, 1/2 │ 4 ⎠
(I'm not sure if that's the correct numerical answer because I don't know
if wolfram alpha handled the branch cuts correctly).
According to wolfram alpha, the answer is computable in terms of Si, Ci,
sinh, and cosh.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.