Question: Companion matrix for Chebyshev polynomials

Hello,

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.

N:=4:
p:=add(a[i]*ChebyshevT(i,x),i=0..N):
(A,B):=LinearAlgebra[CompanionMatrix](p,x):
p1:=LinearAlgebra[Determinant](x*B-A):
should_be_zero:=simplify(p-p1);
off_by_this_factor:=simplify(p/p1);

## OUTPUT:
2 3 4 2
should_be_zero := 3/4 a[0] + 3/4 a[1] x + 3/2 a[2] x - 3/4 a[2] + 3 x a[3] - 9/4 x a[3] + 6 x a[4] - 6 x a[4] + 3/4 a[4]
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 polynomial data2 - (optional) list; second coordinate values (values) for distinct points in the Lagrange basis which specify the polynomial or matrix polynomial 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. Kind Regards, Piers Lawrence
Please Wait...