Updates:
Status: Accepted
Labels: Integration WrongResult
Comment #1 on issue 2150 by asmeurer: integrate gives wrong result
http://code.google.com/p/sympy/issues/detail?id=2150
No, you have definitely found a bug. The problem is in the indefinite
integral:
In [23]: integrate(u, x)
Out[23]: 0
I have fixed the integral so that it no longer gives a wrong result in my
integration3 branch, but the result is still less than ideal, even with h
set as a real symbol:
In [41]: integrate(u, x)
Out[41]:
⎛ 2⎞ ⎛ 2⎞
⎜ ⅈ⋅h ⎟ ⎜ ⅈ⋅h ⎟
ⅈ⋅log⎜x + ────⎟ ⅈ⋅log⎜x - ────⎟
⎝ │h│ ⎠ ⎝ │h│ ⎠
─────────────── - ───────────────
2⋅│h│ 2⋅│h│
and the definite integral isn't so great either:
In [43]: U
Out[43]:
⎛ 2⎞ ⎛ 2⎞ ⎛ 2⎞ ⎛ 2⎞
⎜ ⅈ⋅h ⎟ ⎜ ⅈ⋅h ⎟ ⎜ ⅈ⋅h ⎟ ⎜ ⅈ⋅h ⎟
ⅈ⋅log⎜∞ + ────⎟ ⅈ⋅log⎜-∞ - ────⎟ ⅈ⋅log⎜∞ - ────⎟ ⅈ⋅log⎜-∞ + ────⎟
⎝ │h│ ⎠ ⎝ │h│ ⎠ ⎝ │h│ ⎠ ⎝ │h│ ⎠
─────────────── + ──────────────── - ─────────────── - ────────────────
2⋅│h│ 2⋅│h│ 2⋅│h│ 2⋅│h│
In [44]: W
Out[44]:
ⅈ⋅log(∞ + ⅈ) ⅈ⋅log(-∞ - ⅈ) ⅈ⋅log(∞ - ⅈ) ⅈ⋅log(-∞ + ⅈ)
──────────── + ───────────── - ──────────── - ─────────────
2 2 2 2
The problem, I think, can be solved if the code in ratint is improved to
return an atan in [23].
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-iss...@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.