Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Generate the generalized Fiedler companion matrix of a univariate polynomial
ResourceFunction["GeneralizedFiedlerMatrix"][poly,x] gives the Fiedler companion matrix of poly, treated as a polynomial in x. | |
ResourceFunction["GeneralizedFiedlerMatrix"][perm,poly,x] gives the generalized Fiedler companion matrix associated with the permutation perm. |
Generate a Fiedler companion matrix:
In[1]:= |
Out[1]= |
The characteristic polynomial of this matrix is a constant multiple of the original polynomial:
In[2]:= |
Out[2]= |
Generate the regular Fiedler matrix:
In[3]:= |
Out[3]= |
Use a different permutation:
In[4]:= |
Out[4]= |
Use a disjoint cycle representation of a permutation:
In[5]:= |
Out[5]= |
Numerically find the roots of a polynomial by computing the eigenvalues of its Fiedler companion matrix:
In[6]:= |
Out[6]= |
Compare with the result of NSolve:
In[7]:= |
Out[7]= |
Different permutations may yield the same companion matrix:
In[8]:= |
Out[8]= |
In[9]:= |
Out[9]= |
The Frobenius companion matrix (with polynomial coefficients placed on the first row) is a special case of the generalized Fiedler matrix:
In[10]:= |
Out[10]= |
This work is licensed under a Creative Commons Attribution 4.0 International License