Skip to content

Solving algebric equation of 4th order. Fast and efficient. C++ implementation.

License

Notifications You must be signed in to change notification settings

sasamil/Quartic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Direct solver of algebraic equations of 4th order

This is an extremely simple and efficient solver of algebraic equation of 4th order. I have read so many relating articles, I have tested other solutions... However, this solution contains the algebraic improvement which simplifies things, significantly. eureka Consequently, the numerical computations are reduced and as far as I can see, it performs extraordinarily! The theory and mathematical background are explained in the file - theorymath_eng.docx.

The solution of a given quartic equation - x^4 + a·x^3 + b·x^2 + c·x + d = 0 - can be found by the function:

solve_quartic(double a, double b, double c, double d)

The quartic equations may have different types of roots. a) 4 real roots b) 2 real and 2 complex-conjugate roots c) 4 complex roots (two pairs of complex-conjugates). Our solve_quartic() returns the array of four complex numbers. If there are real roots, the immaginary parts of corresponding solutions will be simply equal to 0.

(main.cpp file is given here just for testing and experimenting)

About

Solving algebric equation of 4th order. Fast and efficient. C++ implementation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages