The new piecewise is unfortunately not very user friendly. Here's one workaround:
diff(f.expression_at(1))(1).n()