Re: [sage-support] how to factorize an expression with constant variables ?

2012-09-03 Thread Michael Orlitzky
On 09/03/12 14:49, mazkime wrote: > Thank you for your answer and sorry for the typo mistake. > Your solution works well with the example given but doesn't work as I > would like with exponents (x^2, ...). Yeah it's not ideal. I needed to do this with symbolic derivatives, and the method I posted

Re: [sage-support] how to factorize an expression with constant variables ?

2012-09-03 Thread mazkime
Thank you for your answer and sorry for the typo mistake. Your solution works well with the example given but doesn't work as I would like with exponents (x^2, ...). What I would like to get is Sage returning expressions with coefficients sorted by the value of the exponents, like when using mul

Re: [sage-support] how to factorize an expression with constant variables ?

2012-09-03 Thread Michael Orlitzky
On 09/03/12 03:26, mazkime wrote: > Hello, > I would like to factorize an expression with sage that contains constant > variables (i.e. parameters), but I cannot figure out how to do that. > > Here is an example : x, y are variables and A is a parameter > > * > var('A x y') >

[sage-support] how to factorize an expression with constant variables ?

2012-09-03 Thread mazkime
Hello, I would like to factorize an expression with sage that contains constant variables (i.e. parameters), but I cannot figure out how to do that. Here is an example : x, y are variables and A is a parameter * var('A x y') f = A*x + x + A^2*exp(y) + y print (f.factor()) **