problems when using degree on indeterminates with indices
Publié : lun. janv. 01, 2018 9:04 pm
Hi,
I noticed the following problem
The first will return 0, the second will return 2. Although giac recognizes the expressions properly i.e. when doing arithmetic the indeterminate x1 will behave as it should. This behaviour also exists in Xcas. Any ideas or suggestion (except suggesting me to change the variable name not to have indices, because arithmetic is absolutely fine with the indices).
Edit: It seems giac believes that "x1" is of another type. For instance using e2r(x1**2) will not return the expected result. This is problematic for me.
Edit2: It seems I misunderstood degree? For a multivariate polynomial it does not take the total degree. Does it regard a multivariate polynomial as a univariate polynomial choosing a particular indeterminate? (and how does it choose this?). For instance degree(x*y) will return 1. Do I need to write my own code finding total degree? I also figured degree(x1**2,x1) does work
Jose
I noticed the following problem
Code : Tout sélectionner
from giacpy import degree
degree("x1**2")
degree("x**2")
Edit: It seems giac believes that "x1" is of another type. For instance using e2r(x1**2) will not return the expected result. This is problematic for me.
Edit2: It seems I misunderstood degree? For a multivariate polynomial it does not take the total degree. Does it regard a multivariate polynomial as a univariate polynomial choosing a particular indeterminate? (and how does it choose this?). For instance degree(x*y) will return 1. Do I need to write my own code finding total degree? I also figured degree(x1**2,x1) does work
Jose