r̲e̲a̲l̲ p̲r̲o̲c̲e̲d̲u̲r̲e̲ Ch(n, X); c̲o̲m̲m̲e̲n̲t̲ this procedure computes the Chebyshev polynomial Tn(X) = cos (n X cos^(-1)(X)) for any give real argument X, and any order n by the recursion formula below; r̲e̲a̲l̲ X; i̲n̲t̲e̲g̲e̲r̲ n; b̲e̲g̲i̲n̲ r̲e̲a̲l̲ a, b, c; i̲n̲t̲e̲g̲e̲r̲ i; a := 1; b := X; i̲f̲ n = 0 t̲h̲e̲n̲ c := a e̲l̲s̲e̲ i̲f̲ n = 1 t̲h̲e̲n̲ c := b e̲l̲s̲e̲ f̲o̲r̲ i := 2 s̲t̲e̲p̲ 1 u̲n̲t̲i̲l̲ n d̲o̲ b̲e̲g̲i̲n̲ c := 2 × X × b - a; a := b; b := c e̲n̲d̲; Ch := c e̲n̲d̲;