What is the story behind the Chebyshev polynomials? 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.
Edit:  
at the request of @Hans, here is formal definition of my problem:
given a sequence $(y_1,\ ...\ y_{n-1}), (y_{i+2}-y_{i+1})(y_{i+1}-y_i)<0$ of values, determine a polynomial $p(x)$ of degree $n$ and, $\ n$-$1$ abszissas $\ \xi_1 <,\ ...,\ <\xi_{n-1}$, so that $\ p(\xi_i)=y_i, p'(\xi_i)=0$  
It should be noted that the polynomials that I am looking for, have no special properties, except for the predefined values in the extrema.
The leading coefficient can be set to $1$ and the constant term to $0$.
$$\ $$  
Construction of polynomials with predefined sequence of function-values for its local extrema: 
we can w.l.o.g. assume that the sought polynomial has leading coefficient $1$, a local extremum in the origin and, that all other local extrema are located at positive abszissas. Then polynomial is
$$p(x) =\frac{1}{n}\int x\prod_{i=2}^{n-1}(x-\xi_i)$$
and
$$p(\xi_i)=y_i$$
would a be system of polynomial equations for determining the $\xi_i$ and thus $p(x)$; the only problem being that, because of the symmetry, in the current formulation there is no control over the ordering of the $y(\xi_i)$.
That can however easily be fixed by defining $$\xi_k=\sum_{i=2}^{k}a_i^2$$
and solving the system of polynomial equations
$$p(\sum_{i=2}^{k}a_i^2)=y_k$$
 A: An earlier, but different, approach to the questions posed and solved by next-to-be Tchebyshev Polynomials was given by Augustin-Louis Cauchy in his Cours d'Analyse (1821). See p. 230 and ff.
A: The Chebyshev polynomials first appeared in his paper Théorie des mécanismes connus sous le nom de parallélogrammes (1854). The remarkable "mechanisms" described in this work can be seen in action here (click on each picture to activate it).
The context is described in MacTutor:

Chebyshev was probably the first mathematician to recognise the
  general concept of orthogonal polynomials. A few particular orthogonal
  polynomials were known before his work. Legendre and Laplace had
  encountered the Legendre polynomials in their work on celestial
  mechanics in the late eighteenth century. Laplace had found and
  studied the Hermite polynomials in the course of his discoveries in
  probability theory during the early nineteenth century. 
  It was Chebyshev who saw the
  possibility of a general theory and its applications. His work arose
  out of the theory of least squares approximation and probability; he
  applied his results to interpolation, approximate quadrature and other
  areas.

For a more extensive account of the history of this discovery, see The theory of best approximation of functions.
