I'm guessing that your error means that
multiplication of a piecewise times a symbolic function
has not been implemented:
sage: f = Piecewise([[(0,pi/2),-1],[(pi/2,pi),2]])
sage: f*sin(x)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
> -----------------------------------------------
> The first two integrations are right, but for the last one, I got the
> following error message:
>
>
> Traceback (click to the left of this block for traceback)
> ...
> AttributeError: 'sage.symbolic.expression.Expression' object has no
> attribute 'domain'
>
> --
> To post to this group, send email to sage-s...@googlegroups.com
> To unsubscribe from this group, send email to sage-support...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>