javamatrixcomplex-numberspolynomial-mathroot-finding# Complex-coefficient polynomial root finding in Java

I'm trying to find a way to compute roots of a polynomial with complex coefficients in Java (i.e. an equivalent of what is ridiculously easily done with roots() in MATLAB).

I'm ready to recode a root finding algorithm that builds the companion matrix and then uses generalized eigenvalue decomposition to find the roots, but for this I would need a library that handles complex-valued matrix operations.

I browsed for a while and nothing convincing seems to be available out there, which I think is rather weird. Then, I'd like to ask you:

Do you know a (stable) Java library that performs root finding on polynomials defined by COMPLEX coefficients?

Do you know a (stable) Java library that performs evd, svd, inverse, etc. on COMPLEX-valued matrices?

*Note:* I already looked at JAMA (doesn't handle complex), Michael Thomas Flanagan's Java Scientific Library (not available anymore), colt (doesn't seem to handle complex), Efficient Java Matrix Library (no complex either), DDogleg Numerics (does not handle polynomial with complex coefficients), JScience (not clear if evd is available) and common-math from Apache (not clear if they allow for complex matrices, and if yes, if evd is available).

Solution

The Durand-Kerner method also works for complex coefficients and does not rely on matrix computations.

It's quite simple to implement, you could google up an implementation (Stackoverflow forbids me to link the one I found) or make one of your own. You could use the jscience library for the complex data types, not for the algorithm itself.

EDIT: Didn't see that you need evd too, never mind my mention of jscience as an option to do the complex matrix math.

- Maven (commandline): No compiler is provided in this environment
- Java Swing: display Text selectable
- How to make a query for mongodb using spring to return objects ordered alphabetically'
- cant update array contents java
- In Gradle, how can I generate a POM file with dynamic dependencies resolved to the actual version used?
- Why do we use @Embeddable In Hibernate
- IS there a way to configure ehcache 2 for spring boot 3?
- org.hibernate.mapping.Table.getColumn returns null
- Java Swing bars floating instead of starting from the same baseline
- How to find files that match a wildcard string in Java?
- java.lang.ClassCastException: oracle.sql.CLOB cannot be cast to oracle.sql.CLOB
- Update a Vertex after Retrieving it
- Read nested list with other attributes in Java streams
- Do you not need a password to access a truststore (made with the java keytool)?
- Creating new Instance of @Component each time FXMLLoader calls applicationContext.getBean(class)
- Add ' to particular place in String in Java
- ExecutionCompletionService hangs when used with Project loom
- How do you handle "impossible" exceptions in Java?
- Android navigation drawer, change text/hover color
- Fastest way to determine if an integer's square root is an integer
- Play WAV file backward
- EclipseLink and Derby with Java 19
- SpringBoot + AWS cognito, can't resolve issuerUri
- Is there a way to use a custom, arbitrary SQL query for loading an entity in Jmix?
- Fill an array with matches from a HashMap in Java
- Print retry count with @Retryable
- Actuator endpoints returning 500 error after upgrade to spring boot 3
- Bufferedimage resize
- What is the difference between ExecutorService.submit and ExecutorService.execute in this code in Java?
- Spring Boot - Process finished with exit code 0