Comment #1 on issue 2040 by smichr: Better way to make a rational function
out of an expression
http://code.google.com/p/sympy/issues/detail?id=2040
Sorry if this is too specific, but what about:
eq = sqrt(log(x**2 + 3*x + 2)*(log(x + 1) + log(x + 2)))
eq = eq.subs(dict((a,factor(a)) for a in eq.atoms(Add)))
eq = eq.subs(dict((a,logcombine(a, 1)) for a in eq.atoms(Add)))
from sympy.simplify.simplify import powdenest # issue 2039
powdenest(eq)
log((1 + x)*(2 + x))
{All the assumptions nonsense is bypassed with the
logcombine 'assume_pos_real' argument. I think a nicer solution would be an
easy way to change the assumptions on variables in one go--that was the
intent of the discussion question I posed before looking at this.}
--
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.