SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.analysis.function.polynomial.root
Class QuarticByFormula

java.lang.Object
  extended by com.numericalmethod.suanshu.analysis.function.polynomial.root.QuarticByFormula
All Implemented Interfaces:
Quartic.QuarticSolver

public class QuarticByFormula
extends java.lang.Object
implements Quartic.QuarticSolver

This solves the quartic equations by a root-finding formula.

Solve

ax4 + bx3 + cx2 + dx + e = 0
using 4 direct equations for 4 roots.

See Also:
PlanetMath: Quartic Formula

Constructor Summary
QuarticByFormula()
           
 
Method Summary
 NumberList solve(double a, double b, double c, double d, double e)
          Solve ax4 + bx3 + cx2 + dx + e = 0
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuarticByFormula

public QuarticByFormula()
Method Detail

solve

public NumberList solve(double a,
                        double b,
                        double c,
                        double d,
                        double e)
Description copied from interface: Quartic.QuarticSolver
Solve
ax4 + bx3 + cx2 + dx + e = 0

Specified by:
solve in interface Quartic.QuarticSolver
Parameters:
a - a
b - b
c - c
d - d
e - e
Returns:
the list of roots

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.