Approximation function by Lagrange and Newton