I have the following problem with the Chebyshev companion matrix in
Maple. There is an undocumented factor of 2^(N-2) occurring in the
characteristic polynomial of the companion matrix. There is something
definitely fishy going on here.
2 3 4 2
should_be_zero := 3/4 a + 3/4 a x + 3/2 a x - 3/4 a + 3 x a - 9/4 x a + 6 x a - 6 x a + 3/4 a
off_by_this_factor := 4
While on a rant about this function, I would like to point out that there is an error in
the help file for the companion matrix function for the LAgrange basis companion matrix.
The call sequence is:
CompanionMatrix(data1, data2, cpt, options)
data1 - (optional) list; first coordinate values (nodes) for distinct
points in the Lagrange basis which specify the polynomial or matrix
data2 - (optional) list; second coordinate values (values) for
distinct points in the Lagrange basis which specify the polynomial or
However, in the example, the nodes and the values are in the opposite order.
(M0,M1) := CompanionMatrix([y0,y1,y2],[x0,x1,x2]);
This should be fixed!!! Or at least made consistent with the documentation.