Task 05

Task 05

deadline: 28/03/2021 23:59 CET

[0.5 points]: Approximate the function

f(x)={1if x51if x>5

in the [0,10] interval with the Lagrange interpolating polynomial using the roots of the 10-th degree Chebyshev polynomial (you may use the scipy.interpolate.lagrange and scipy.special.roots_chebyt functions). Print the interpolating polynomial.

[0.5 points]: Plot the function f(x), the interpolating polynomial, and the absolute error of the approximation.

# add your code here