Sturm sequences : sturmseq

### 2.25.17 Sturm sequences : `sturmseq`

`sturmseq` takes as argument, a polynomial expression P or a rationnal fraction P/Q and returns the list of the Sturm sequences of the square-free factors of odd multiplicity of P (or of P/Q). For F a square-free factor of odd multiplicity, the Sturm sequence R1,R2,... is made from F, F′ by a recurrence relation :

- R1 is the opposite of the euclidian division remainder of F by F′ then,
- R2 is the opposite of the euclidian division remainder of F′ by R1,
- ...
- and so on untill Rk=0.

Input :

`sturmseq(2*x```^```3+2)`

or

`sturmseq(2*y```^```3+2,y)`

Output :

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

The first term gives the content of the numerator (here 2), then the Sturm sequence (in list representation) [x3+1,3x2,−9].
Input :

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

Output :

`[2,[[1,0,0,1],[3,0,0],-9],1,[1,[[3,0,2],[6,0],-72]]`

The first term gives the content of the numerator (here 2), then the Sturm sequence of the numerator ([[1,0,0,1],[3,0,0],-9]), then the content of the denominator (here 1) and the Sturm sequence of the denominator ([[3,0,2],[6,0],-72]). As expressions, [x3+1,3x2, −9] is the Sturm sequence of the numerator and [3x2+2,6x,−72] is the Sturm sequence of the denominator.
Input :

`sturmseq((x```^```3+1)```^```2,x)`

Output :

`[1,1]`

Indeed F=1.
Input :

`sturmseq(3*(3*x```^```3+1)/(2*x+2),x)`

Output :

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

The first term gives the content of the numerator (here `3`),
the second term gives the Sturm sequence of the numerator (here `3x```^```3+1, 9x```^```2, -81`),
the third term gives the content of the denominator (here `2`),
the fourth term gives the Sturm sequence of the denominator (`x+1,1`).
Warning !!!!
P is defined by its symbolic expression.
Input :
`sturmseq([1,0,0,1],x)`,
Output :
`Bad argument type`.