I am having trouble with Integrating functions that involve If statements.
For example, I can integrate
If [Cos[-y] Sin Sin < 0, -1, 1]
with x over the range -pi to pi and y over the range 0 to pi
However, trying to integrate
If[(Cos[-y] Sin Sin + Cos) < 0, -1, 1]
over the same ranges fails with Mathematica just returning the entered integration command.
Is there any way to have Mathematica integrate functions containing If statements of this nature?
Thanks in anticipation.