second, as you don't handle piecewise functions, I think you should not use this limit-machinery.