Next: Solving trigonometric equation Up: Solving with Interval Analysis Previous: Example   Contents

# Solving univariate polynomial numerically

As an alternative to interval solving ALIAS proposes a numerical algorithm

```
ALIAS_Solve_Poly((double *C, int *Degree,double *Sol),
```
The arguments are the coefficients C of the polynomial, a pointer to the integer Degree that is initially the degree of the polynomial and Sol which will be used to store the real roots. This procedure returns the number of real roots or -1 if the computation has failed. The procedure ALIAS_Solve_Poly_PR takes the same arguments but returns the real part of the roots.

There is also a version of the Newton scheme for univariate polynomial:

```
int Fast_Newton(int Degree,REAL *Input,VECTOR &Coeff,VECTOR &CoeffG,
double Accuracy,int Max_Iter,REAL *Residu)
```
where
• Degree is the degree of the polynomial
• Input: an approximation of the solution
• Coeff: the polynomial is written as Coeff[1]+Coeff[2]x+.....Coeff[Degree+1]pow(x,Degree)
• CoeffG: the coefficients of the derivative of the polynomial
• Accuracy: the algorithm will stop if the absolute value of the evaluation of the polynomial at the current point is lower than this number
• Max_Iter: maximum number of iteration
• Residu: the value of the polynomial at the solution
This procedure returns -1 if the derivative polynomial is 0. Otherwise it returns 1 if a solution has been found or 0 if Max_Iter iteration has been completed.

Next: Solving trigonometric equation Up: Solving with Interval Analysis Previous: Example   Contents
Jean-Pierre Merlet 2012-12-20