Re: [PATCH] Fix heuristic integration to support more general forms for asin/asinh results

2009-02-26 Thread Mateusz Paprocki
On Thu, Feb 26, 2009 at 12:27:54PM -0800, Ondrej Certik wrote: > On Thu, Feb 26, 2009 at 12:11 PM, Priit Laes wrote: > > Patch here: http://plaes.org/files/2009-Q1/sympy-fix-asin-integral.patch > > > > Previously sympy failed to integrate things like this: > > > > In [3]: integrate(1/sqrt(9 + 4*x*

Re: [PATCH] Fix heuristic integration to support more general forms for asin/asinh results

2009-02-26 Thread Ondrej Certik
On Thu, Feb 26, 2009 at 12:11 PM, Priit Laes wrote: > Patch here: http://plaes.org/files/2009-Q1/sympy-fix-asin-integral.patch > > Previously sympy failed to integrate things like this: > > In [3]: integrate(1/sqrt(9 + 4*x**2), x) > Out[3]: > ⌠ > ⎮       1 > ⎮ ─ dx > ⎮    ⎽⎽ >

[PATCH] Fix heuristic integration to support more general forms for asin/asinh results

2009-02-26 Thread Priit Laes
Patch here: http://plaes.org/files/2009-Q1/sympy-fix-asin-integral.patch Previously sympy failed to integrate things like this: In [3]: integrate(1/sqrt(9 + 4*x**2), x) Out[3]: ⌠ ⎮ 1 ⎮ ─ dx ⎮⎽⎽ ⎮ ╱2 ⎮ ╲╱ 9 + 4⋅x ⌡ With patch applied: In [1]: integrate(1/

Re: [PATCH] Poly.cancel now removes content from p/q properly

2009-02-26 Thread Ondrej Certik
Nice patch, +1 thanks! Ondrej On Thu, Feb 26, 2009 at 9:28 AM, Mateusz Paprocki wrote: > > In [1]: var('zr zc') > Out[1]: (zr, zc) > > In [2]: zup, zlow = zr, 1/(1/zc + 1/(zc+zr)) > > In [3]: zc/(zc+zr) * zlow/(zlow+zup) > Out[3]: >                     zc > ──

[PATCH] Poly.cancel now removes content from p/q properly

2009-02-26 Thread Mateusz Paprocki
In [1]: var('zr zc') Out[1]: (zr, zc) In [2]: zup, zlow = zr, 1/(1/zc + 1/(zc+zr)) In [3]: zc/(zc+zr) * zlow/(zlow+zup) Out[3]: zc ⎛1 1 ⎞ ⎛ 1 ⎞ (zc + zr)⋅⎜── + ───⎟⋅⎜zr + ⎟