A piecewise homotopy Padé technique to approximate an arbitrary function