Status: Started Owner: Vinzent.Steinberg Labels: Type-Defect Priority-Medium Integration
New issue 2450 by Vinzent.Steinberg: pull free symbols out of Integral http://code.google.com/p/sympy/issues/detail?id=2450 For instance Integral(cos(t)/w, (t, 0, w)) could be simplified to Integral(cos(t), (t, 0, w))/w . A prototype implementation: from sympy import * var('a b x') w = a*pi/b i = Integral(w*cos(x), (x, a, b)) def pull_const(i): if not i.args[0].is_Mul: return i alist = [] blist = [] for f in i.args[0].args: if any(s in i.variables for s in f.free_symbols): blist.append(f) else: alist.append(f) return Mul(*alist) * Integral(Mul(*blist), i.args[1]) print pull_const(i) -- 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.