Updates:
Cc: [email protected]
Comment #1 on issue 2808 by [email protected]: integrate(1/(x**2 +
a**2)**2, x) is wrong if a is real
http://code.google.com/p/sympy/issues/detail?id=2808
Note that this used to work in SymPy 0.7.0:
In [1]: a = Symbol('a', real=True)
In [2]: integrate(1/(x**2 + a**2)**2, x)
Out[2]:
⎛ 4 ⎞ ⎛ 4 ⎞
⎜ ⅈ⋅a ⎟ ⎜ⅈ⋅a ⎟
ⅈ⋅log⎜- ──── + x⎟ ⅈ⋅log⎜──── + x⎟
⎜ 3 ⎟ ⎜ 3 ⎟
x ⎝ │a│ ⎠ ⎝│a│ ⎠
────────────── - ───────────────── + ───────────────
4 2 2 3 3
2⋅a + 2⋅a ⋅x 4⋅│a│ 4⋅│a│
Then in SymPy 0.7.1 it failed with UnificationFailed: can't unify DMF(([],
[mpz(1)]), ZZ) with 0, which was fixed by
commit 04a53dc970eb8632745fe0382c9864d0976231fa
Author: Mateusz Paprocki <[email protected]>
Date: Thu Oct 6 16:05:46 2011 -0700
Fixed integrate(a/(a**2 + b*a + b*c*x**2), x) (#2718)
In [1]: var('a:c', positive=True)
Out[1]: (a, b, c)
In [2]: integrate(a/(a**2+b*a+b*c*x**2),x)
Out[2]:
⎛ ⎛ ___ 3/2 ⎞ ⎞
___ ⎜ x⋅⎝a⋅╲╱ b ⋅c + b ⋅c⎠ ⎟
╲╱ a ⋅atan⎜──────────────────────────────────────────────⎟
⎜ 3/2 ___ _______ ___ ___ _______⎟
⎝a ⋅╲╱ c ⋅╲╱ a + b + ╲╱ a ⋅b⋅╲╱ c ⋅╲╱ a + b ⎠
──────────────────────────────────────────────────────────
___ ___ _______
╲╱ b ⋅╲╱ c ⋅╲╱ a + b
In [3]: simplify(_)
Out[3]:
⎛ ___ ___ ⎞
___ ⎜ ╲╱ b ⋅╲╱ c ⋅x ⎟
╲╱ a ⋅atan⎜───────────────⎟
⎜ ___ _______⎟
⎝╲╱ a ⋅╲╱ a + b ⎠
───────────────────────────
___ ___ _______
╲╱ b ⋅╲╱ c ⋅╲╱ a + b
and then started giving the wrong result above.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.