Task2: added Lagrange interpolation method.