Click here to Skip to main content
15,923,273 members
Articles / Bisection
Tip/Trick

Polynomials over ℂ Root Finder using Bisection method

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
24 Jun 2024MIT1 min read 6.1K   146   5   4
Finds Roots of a Polynomial with complex coefficients using an "extended" Bisection method
Application's code finds the roots of a polynomial based on two points 'a' and 'b' whose real and imaginary signs are opposed. These points are obtained from or derived from the polynomial's upper Cauchy's bound.

Image 1

Introduction

As far as I know, Bisection method has had as drawback the impracticability of knowing beforehand where p(a)*p(b) = -1. This is, where the polynomial (over real numbers) changes its' sign. In my previous article (Real Imaginary Root Finder using Bisection method), these points are found deriving the polynomial. Now, for polynomials over complex numbers, just the "upper" bound is needed.

Background

If P(x) = cnxn+an−1xn−1>+...c0, from Cauchy's radius all the roots will be inside a circle of radius

Upper radius = max { 1, ||c0/cn||, ||c1/cn||, ...,||cn-1/cn|| }. The lower radius will be the inverse, i.e., 

Lower radius = 1/(Upper radius).  (If Upper < 1, then swap upper by lower).

If the radius is 1, the limits of real and imaginary parts may be ±1 and ±i. 

Now, the application finds where inside these bounds two points have opposite signs in the real and imaginary parts of the polynomial value (Re(P(a))=-Re(P(b)) and Im(P(a))=-Im(P(b)) ). When these points are found, for ex. "a" and "b", it is certain that the roots will be within the set of circles of all possible pairs (a, b) centered at (a+b)/2 and radius (a-b)/2.

History

Version 1.0.4.0

Fixed some bugs.

Version 1.0.8.0

Fixed some bugs.

Version 1.0.10.0

Fixed a bug in Complex class. Powers of complex numbers elevated to non integer numbers was failing, so the last two roots, mostly, where erroneously calculated.

Version 1.0.11.0

Bisection method has been improved and so has the response.

Version 1.0.12.0 (2024/06/19)

Obtaining roots accuracy has been improved, especially when there is multiplicity.

Version 1.0.13.0 (2024/06/23)

In this release, the roots' precision is selectable and therefore the execution time.

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Spain Spain
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralMy vote of 5 Pin
Ștefan-Mihai MOGA6-Jun-24 7:12
professionalȘtefan-Mihai MOGA6-Jun-24 7:12 
GeneralRe: My vote of 5 Pin
Xavier Junqué i de Fortuny6-Jun-24 7:26
Xavier Junqué i de Fortuny6-Jun-24 7:26 
Praisethanks Pin
Xi Li from Unknown5-Jun-24 0:24
Xi Li from Unknown5-Jun-24 0:24 
GeneralRe: thanks Pin
Xavier Junqué i de Fortuny5-Jun-24 5:53
Xavier Junqué i de Fortuny5-Jun-24 5:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.