Is there anything reliable known about who actually discovered the Chebyshev polynomials and what the motivation and circumstances were?  

The reason why I am interested in knowing, is that I needed a solution for a variant of those polynomials: instead of all extrema having the same magnitude, I wanted to have them attain predefined values in a fixed order (I have found a solution for that problem, but involves a system of polynomial equations) and I wonder, whether the definition of the Chebyshev polynomials has been "guessed" or developed for a specific problem.