Package org.matheclipse.core.polynomials
Class QuarticSolver
- java.lang.Object
 - 
- org.matheclipse.core.polynomials.QuarticSolver
 
 
- 
public class QuarticSolver extends Object
Solve polynomial equations up to fourth degree (Solve(a*x^4+b*x^3+c*x^2+d*x+e==0,x)).See Wikipedia - Quadratic equation See Wikipedia - Cubic function See Wikipedia - Quartic equation
TODO not completly tested. Especially if a division through zero occurs. 
- 
- 
Constructor Summary
Constructors Constructor Description QuarticSolver() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IASTAppendablebiQuadraticSolve(IExpr a, IExpr c, IExpr e, IExpr sum)Solve the bi-quadratic expression.static IASTAppendablebiQuadraticSolve(IExpr a, IExpr c, IExpr e, IExpr sum, boolean createSet, boolean sort)Solve the bi-quadratic expression.static IASTAppendablecreateSet(IASTAppendable result)static IASTAppendablecubicSolve(IExpr a, IExpr b, IExpr c, IExpr d, IExpr additionalSolution)Solve(a*x^3+b*x^2+c*x+d==0,x).static IASTAppendablecubicSolve(IExpr a, IExpr b, IExpr c, IExpr d, IExpr additionalSolution, boolean createSet, boolean sort)Solve(a*x^3+b*x^2+c*x+d==0,x).static IASTAppendableevalAndSort(IASTAppendable result, boolean sort)static IASTAppendablequadraticSolve(IExpr a, IExpr b, IExpr c)Solve(a*x^2+b*x+c==0,x).static IASTAppendablequadraticSolve(IExpr a, IExpr b, IExpr c, boolean createSet)Solve(a*x^2+b*x+c==0,x).static IASTAppendablequadraticSolve(IExpr a, IExpr b, IExpr c, boolean createSet, boolean sort)Solve(a*x^2+b*x+c==0,x).static IASTAppendablequadraticSolve(IExpr a, IExpr b, IExpr c, IExpr solution1, IExpr solution2)Solve(a*x^2+b*x+c==0,x).static IASTAppendablequadraticSolve(IExpr a, IExpr b, IExpr c, IExpr solution1, IExpr solution2, boolean createSet, boolean sort)Solve(a*x^2+b*x+c==0,x).static IASTAppendablequarticSolve(IExpr a, IExpr b, IExpr c, IExpr d, IExpr e)Solve(a*x^4+b*x^3+c*x^2+d*x+e==0,x).static IASTAppendablequarticSolve(IExpr a, IExpr b, IExpr c, IExpr d, IExpr e, boolean createSet, boolean sort)Solve(a*x^4+b*x^3+c*x^2+d*x+e==0,x).static IASTquarticSolveN(IExpr a, IExpr b, IExpr c, IExpr d, IExpr e)static IASTAppendablequasiSymmetricQuarticSolve(IExpr a, IExpr b, IExpr c)Solve the special case of a "Quasi-symmetric equation"Solve(a*x^4+b*x^3+c*x^2+b*x+a==0,x).static IASTAppendablequasiSymmetricQuarticSolve(IExpr a, IExpr b, IExpr c, boolean createSet, boolean sort)Solve the special case of a "Quasi-symmetric equation"Solve(a*x^4+b*x^3+c*x^2+b*x+a==0,x).static IASTMutablesolve(IExpr exprPoly, IExpr x)static IASTMutablesolve(IExpr exprPoly, IExpr x, boolean createSet, boolean sort)static IASTMutablesortASTArguments(IASTMutable resultList)Sort the arguments of a list. 
 - 
 
- 
- 
Method Detail
- 
solve
public static IASTMutable solve(IExpr exprPoly, IExpr x) throws ArithmeticException
- Throws:
 ArithmeticException
 
- 
solve
public static IASTMutable solve(IExpr exprPoly, IExpr x, boolean createSet, boolean sort) throws ArithmeticException
- Throws:
 ArithmeticException
 
- 
quarticSolve
public static IASTAppendable quarticSolve(IExpr a, IExpr b, IExpr c, IExpr d, IExpr e)
Solve(a*x^4+b*x^3+c*x^2+d*x+e==0,x). See Wikipedia - Quartic equation- Parameters:
 a- coefficient forx^4b- coefficient forx^3c- coefficient forx^2d- coefficient forxe- coefficient for1- Returns:
 
 
- 
quarticSolve
public static IASTAppendable quarticSolve(IExpr a, IExpr b, IExpr c, IExpr d, IExpr e, boolean createSet, boolean sort)
Solve(a*x^4+b*x^3+c*x^2+d*x+e==0,x). See Wikipedia - Quartic equation- Parameters:
 a- coefficient forx^4b- coefficient forx^3c- coefficient forx^2d- coefficient forxe- coefficient for1createSet- delete duplicates from result list- Returns:
 
 
- 
cubicSolve
public static IASTAppendable cubicSolve(IExpr a, IExpr b, IExpr c, IExpr d, IExpr additionalSolution)
Solve(a*x^3+b*x^2+c*x+d==0,x). See Wikipedia - Cubic function- Parameters:
 a- coefficient forx^3b- coefficient forx^2c- coefficient forxd- coefficient for1additionalSolution- ann additional solution, which should be appended to the result- Returns:
 
 
- 
cubicSolve
public static IASTAppendable cubicSolve(IExpr a, IExpr b, IExpr c, IExpr d, IExpr additionalSolution, boolean createSet, boolean sort)
Solve(a*x^3+b*x^2+c*x+d==0,x). See Wikipedia - Cubic function- Parameters:
 a- coefficient forx^3b- coefficient forx^2c- coefficient forxd- coefficient for1additionalSolution- ann additional solution, which should be appended to the result- Returns:
 
 
- 
createSet
public static IASTAppendable createSet(IASTAppendable result)
 
- 
evalAndSort
public static IASTAppendable evalAndSort(IASTAppendable result, boolean sort)
 
- 
quadraticSolve
public static IASTAppendable quadraticSolve(IExpr a, IExpr b, IExpr c)
Solve(a*x^2+b*x+c==0,x). See Wikipedia - Quadratic equation- Parameters:
 a-b-c-- Returns:
 
 
- 
quadraticSolve
public static IASTAppendable quadraticSolve(IExpr a, IExpr b, IExpr c, boolean createSet)
Solve(a*x^2+b*x+c==0,x). See Wikipedia - Quadratic equation- Parameters:
 a-b-c-createSet-- Returns:
 
 
- 
quadraticSolve
public static IASTAppendable quadraticSolve(IExpr a, IExpr b, IExpr c, boolean createSet, boolean sort)
Solve(a*x^2+b*x+c==0,x). See Wikipedia - Quadratic equation- Parameters:
 a-b-c-createSet-sort- the result- Returns:
 
 
- 
quadraticSolve
public static IASTAppendable quadraticSolve(IExpr a, IExpr b, IExpr c, IExpr solution1, IExpr solution2)
Solve(a*x^2+b*x+c==0,x). See Wikipedia - Quadratic equation- Parameters:
 a- coefficient forx^2b- coefficient forxc- coefficient for1solution1- possible first solution fromcubicSolve(IExpr, IExpr, IExpr, IExpr, IExpr)solution2- possible second solution fromcubicSolve(IExpr, IExpr, IExpr, IExpr, IExpr)- Returns:
 
 
- 
quadraticSolve
public static IASTAppendable quadraticSolve(IExpr a, IExpr b, IExpr c, IExpr solution1, IExpr solution2, boolean createSet, boolean sort)
Solve(a*x^2+b*x+c==0,x). See Wikipedia - Quadratic equation- Parameters:
 a- coefficient forx^2b- coefficient forxc- coefficient for1solution1- possible first solution fromcubicSolve(IExpr, IExpr, IExpr, IExpr, IExpr)solution2- possible second solution fromcubicSolve(IExpr, IExpr, IExpr, IExpr, IExpr)createSet- delete duplicate values in the resultsortResult- sort the result values- Returns:
 
 
- 
biQuadraticSolve
public static IASTAppendable biQuadraticSolve(IExpr a, IExpr c, IExpr e, IExpr sum)
Solve the bi-quadratic expression.Solve(a*x^4+bc*x^2+e==0,x).See Bronstein 1.6.2.4
- Parameters:
 a-c-e-sum-- Returns:
 
 
- 
biQuadraticSolve
public static IASTAppendable biQuadraticSolve(IExpr a, IExpr c, IExpr e, IExpr sum, boolean createSet, boolean sort)
Solve the bi-quadratic expression.Solve(a*x^4+bc*x^2+e==0,x).See Bronstein 1.6.2.4
- Parameters:
 a-c-e-sum-createSet-- Returns:
 
 
- 
quasiSymmetricQuarticSolve
public static IASTAppendable quasiSymmetricQuarticSolve(IExpr a, IExpr b, IExpr c)
Solve the special case of a "Quasi-symmetric equation"Solve(a*x^4+b*x^3+c*x^2+b*x+a==0,x). See Wikipedia - Quartic equation. See Bronstein 1.6.2.4- Parameters:
 a- coefficient forx^4andxb- coefficient forx^3andxc- coefficient forx^2- Returns:
 
 
- 
quasiSymmetricQuarticSolve
public static IASTAppendable quasiSymmetricQuarticSolve(IExpr a, IExpr b, IExpr c, boolean createSet, boolean sort)
Solve the special case of a "Quasi-symmetric equation"Solve(a*x^4+b*x^3+c*x^2+b*x+a==0,x). See Wikipedia - Quartic equation. See Bronstein 1.6.2.4- Parameters:
 a- coefficient forx^4andxb- coefficient forx^3andxc- coefficient forx^2- Returns:
 
 
- 
sortASTArguments
public static IASTMutable sortASTArguments(IASTMutable resultList)
Sort the arguments of a list.- Parameters:
 resultList- assumed to be of typeList()- Returns:
 - sorted 
resultList 
 
 - 
 
 -