Question: Piecewise truncate or obtain some pieces

I have a piecewise that exists on a large intervals, say [-5..15], however, I know need the function to represent [1..9].

There are two approaches I know of: using convert(f,pwlist) or using op(n,f), see attachments. PiecewiseTruncate.mw    and  PiecewiseTruncate.pdf

However, these two methods are not elegant enough, I have to reassemble the pieces in the new function.

How to make the solution neat?

Thanks,

Please Wait...