I do this:

import sympy
sympy.srepr(sympy.integrate(S('cos(x * y)'), S('(x, 0, a)')))

It returns this:

"Piecewise(ExprCondPair(Mul(Pow(Symbol('y'), Integer(-1)), 
sin(Mul(Symbol('a'), Symbol('y')))), And(StrictGreaterThan(Symbol('y'), 
-oo), StrictLessThan(Symbol('y'), oo), Unequality(Symbol('y'), 
Integer(0)))), ExprCondPair(Symbol('a'), true))"

How do I find the value of the Piecewise expression when y is nonzero? I 
have tried using sympy.refine with Q.nonzero, but that has not worked. 
Indeed the docs for refine warn, "Relations in assumptions are not 
implemented (yet)". Does that mean there's no way to find the value of the 
integral assuming y is nonzero?

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/97035a45-f71c-48fa-939a-197d56f036c7n%40googlegroups.com.

Reply via email to