On Thu, Feb 26, 2009 at 12:27:54PM -0800, Ondrej Certik wrote: > On Thu, Feb 26, 2009 at 12:11 PM, Priit Laes <plaes...@gmail.com> 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 > > ⎮ ⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽ > > ⎮ ╱ 2 > > ⎮ ╲╱ 9 + 4⋅x > > ⌡ > > > > With patch applied: > > > > In [1]: integrate(1/sqrt(9 + 4*x**2), x) > > Out[1]: > > ⎛2⋅x⎞ > > asinh⎜───⎟ > > ⎝ 3 ⎠ > > ────────── > > 2 > > > > This also uncovered a bug: just try to do this: integrate(1/sqrt(16 + > > 4*x**2), x) > > Thanks for the patch! > > Due to this: > > - diffs = [ substitute(g.diff(x)) for g in terms ] > + diffs = [ substitute(simplify(g.diff(x))) for g in terms ] > > > I would like to know Mateusz's opinion, if it's good to use simplify > in the integrator. > > Ondrej >
That's interesting. I will look into it by the evening. -- Mateusz
signature.asc
Description: This is a digitally signed message part