5.0

5.0 | 2 ratings Rate this file 9 Downloads (last 30 days) File Size: 1.62 KB File ID: #25375

Polynomials with multiple roots solved

by Feng Cheng Chang

 

21 Sep 2009 (Updated 22 May 2012)

Solving multiple roots polynomial, using simple elementary arithematic operations mostly.

| Watch this File

File Information
Description

A given polynomial having multiple roots is solved by the routine

              Z = poly_roots(p)
where
            Input p: polynomial coefficient vector
            Output Z: root-multiplicity pairs

The MATLAB source code is very simple and compact (fewer then 50 lines) and amazingly gives the expected results for any test polynomials of very high degree and multiplicities.

In this simple routine 'poly_roots.m', except for a MATLAB built-in function 'roots.m', all the required computations involve only simple elementary arithematic operations (such
as additions, subtractions, multiplications, divisions, and integer exponations), without applying any high mathematics. The only routine 'roots.m' is used here mainly to solve a simple roots polynomial (not any multiple roots polynomials).

Most of the calculations in this routine involve elementary arithematic operations, therefore, it is fairly easy to improve the expected results from the existing double precision to vpi' multiple precision.
 
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.

Acknowledgements

Gcd Of Polynomials, Multiple Root Polynomial Solved By Partial Fraction Expansion, and Polynomial Coefficient Vector Derived From Sub Polynomial Factors inspired this file.

This file inspired Solving Multiple Root Polynomials.

MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
polynomial roots polynomial gcd multiple roots
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
29 Apr 2012 John D'Errico

Well done.

27 Apr 2012 Andrew Mendelsohn

Nice little file finds multiple roots much more accurately than built in routine. Used it in an inverse Laplace transform application.

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.

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

21 May 2012

Update the original source code. It involves only simple elementary operations, except 'roots.m'. It may easily convert into multiple precision later.

22 May 2012

Minor correction to poly_roots.m

Contact us