I want to integrate the attached piecewise function over theta from 0 to 1. The single cases work fine, but integrating the function itself processes forever. I noted that cmd+. (the abortion command) takes a few seconds until Mathematica stops compiling, so I assume the problem lies in integrating the piecewise-function itself. What am I doing wrong?