calculating the coefficients of a high-order polynomial having the roots

83 Views Asked by At

I have 90 real and non-real roots and want to calculate the coefficients of the 90th degree polynomial that delivers these roots. I use procedures like "poly" in MATLAB but no matter how I try, the obtained polynomial does not give the intended roots. I think the very small round-off errors in the procedure of "poly" is to blame. Also, it must be something relating to ill-conditionedness. Can you help me find the best solution? Thank you!

1

There are 1 best solutions below

5
On

An alternative procedure to be tested : use iteratively discrete convolution operation (Matlab operator "conv") ; the coefficients of the resulting polynomial would be obtained in a list in the following way :

  • initialize P=[1]

  • for each real root $r_k$ do P=conv(P,[1,-r_k])

  • for each pair of complex roots $a_k\pm ib_k$ do P=conv(P,[1,-2a_k,a_k^2-b_k^2])

Explanations :

  • In the case of $2$ real roots like $3$ and $4$ :

$(x-3)(x-4)=x^2-7x+12 \leftrightarrow $ conv([1,-3],[1,-4])=[1,-7,12]

  • in the case of 2 complex roots like $1+2i$ and $1-2i$, corresponding to polynomial $(x-1+2i)(x-1+2i)=1x^2-2x-3$, the coefficients of the product of this polynomial with, for example, $(x-4)$ will be given by conv([1,-2,-3],[1,4])