Julia code to approximate functions using Chebyshev polynomials