Comment #1 on issue 2671 by [email protected]: constantsimp() isn't working for dsolve(w(t).diff(t, 6) - k**6*w(t), w(t))
http://code.google.com/p/sympy/issues/detail?id=2671

This requires pre-conditioning since constantsimp doesn't do any simplification:

    >>> a = C2*cos(sqrt(3)*t/2) + C3*cos(sqrt(3)*t/2)
    >>> constantsimp(a,t,2)
    C2*cos(sqrt(3)*t/2) + C3*cos(sqrt(3)*t/2)
    >>> factor(_)
    (C2 + C3)*cos(sqrt(3)*t/2)
    >>> constantsimp(_,t,2)
    C2*cos(sqrt(3)*t/2)

If you try preconditioning with terms_gcd(add, expand=False) for all Adds in the top level Muls in the expression, perhaps that would work:

    >>> eq=y+3*z*(x*y+x*z)+exp(4*x)
>>> [terms_gcd(a,expand=0) for m in Add.make_args(eq) for a in Mul.make_args(m)
    if a.is_Add]
    [x*(y + z)]

--
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.

Reply via email to