Stable method for solving the Cauchy problem with the use of Chebyshev polynomials