Sturm sequences and number of sign changes of P on (a, b] : sturm

### 5.26.15 Sturm sequences and number of sign changes of P on (a, b] : sturm

sturm takes two or four arguments : P a polynomial expression or P/Q a rational fraction and a variable name or P a polynomial expression, a variable name and two real or complex numbers a and b.

If sturm takes two arguments, sturm returns the list of the Sturm sequences and multiplicities of the square-free factors of P (or P/Q) (in this case sturm behaves like sturmseq).

If sturm takes four arguments, it behaves like sturmab :

- if a and b are reals, sturm returns the number of sign changes of P on (a, b]
- if a or b are complex, sturm returns the number of complex roots of P in the rectangle having a and b as opposite vertices.

Input :

sturm(2*x`^`3+2,x)

Output :

[2,[[1,0,0,1],[3,0,0],-9],1]

Input :

sturm((2*x`^`3+2)/(x+2),x)

Output :

[2,[[1,0,0,1],[3,0,0],-9],1,[[1,2],1]]

Input :

sturm(x`^`2*(x`^`3+2),x,-2,0)

Output :

1