Be the first to rate this file! 76 downloads (last 30 days) File Size: 11.21 KB File ID: #25375

Polynomials with multiple roots solved

by Feng Cheng Chang

 

21 Sep 2009 (Updated 09 Mar 2010)

Code covered by the BSD License  

Find roots of a polynomial with very high degree and multiplicity by this compact routine.

Download Now | Watch this File

File Information
Description

A given polynomial with multiple roots is solved by the routine
                  Z = polyroots(p), where
          Input: p polynomial coefficient vector, real or complex.
          Output: Z root-multiplicity pairs.

The MATLAB source code is very compact, using only basic MATLAB built-in functions, and existing double precision.

A short routine p = polyget(A) is also provided for creating a test polynomial coefficient vector.

This simple routine gives amazingly the expected results for test polynomials of very high degree and multiplicity, such as

          p(x) = (x -123456789)^9876
          p(x) = (x^8-1)^1000
          p(x) = (x^100-1)^100
          p(x) = (x^6 -1) *(x^5 -1)^2*(x^4 -1)^3*(x^3 -1)^4*(x^2 -1)^5*(x -1)^6
          p(x) = (x-1+2i)^9 *(z+3-4i)^8 *(z-5-6i)^7

For detail description, please refer to
F.C. Chang, "Solving multple-root polynomials" IEEE Antennas and Propagation Magazine, Vol.51, No.6, pp. 151-155, Dec. 2009.

Or get a pdf file by e-mail from fcchang007@yahoo.com.

MATLAB release MATLAB 6.5 (R13)
Zip File Content  
Other Files license.txt,
polyget.m,
polyroots.m,
polyroots_examples.doc,
polyroots_examples.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
23 Oct 2009 Feng Cheng Chang

Self comment:

Amazingly, the revised routine can find the desired roots of test polynomials p(x) -- expanded, such as
       p(x) = (x+987654321)^N,
where N=any positive integers, such as 10, 100, 1000, 10000, ....

For example, find the roots of the following polynomial expanded
       p(x) = (x+987654321)^12345.

>> format long g
>> p = poly([-987654321*ones(1,12345)]);
>> Z = poly_roots(p)
 Z =
          -987654321 12345

It takes about 2 min total time. Most is to create polynomial coefficient vector p, and only 0.5 sec to get the desired root-multiplicity pairs Z.

Of course, any numerical algorithm is not fool prove, neither is mine.

Foe example,it does work for p(x)=(9876x+12345)^70, but fails for p(x)=(9876x+12345)^80.

I hope someone would like to try it for some other existing test polynomials, and give me any valuable comments.

Please login to add a comment or rating.
Updates
23 Oct 2009

Update the m-file, the very small roots can thus be solved.

04 Jan 2010

Update m-file -- improve help description

26 Feb 2010

Update the m-file to speed up operations. Also present 17 typical examples for test polynomials in MATLAB script file.

09 Mar 2010

add some examples

Tag Activity for this File
Tag Applied By Date/Time
polynomial roots polynomial gcd multiple roots Feng Cheng Chang 22 Sep 2009 09:44:21
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com