Issue 3647

Changes:

- Use `Piecewise` in `manualintegrate`
- `manualintegrate` no longer caches its results (to avoid getting a stale result after the assumptions change)