Hi Yann, On 2017-09-19, Yann Cargouet <ycargo...@gmail.com> wrote: > Here is the text of the expression: > Cc*Cin*Cl*Rc*Rl*Rs*s^3 + Cc*Cl*Rc*Rl*s^2 + Cc*Cin*Rc*Rs*s^2 + > Cc*Cin*Rl*Rs*s^2 + Cc*Cl*Rl*Rs*s^2 + Cin*Cl*Rl*Rs*s^2 + Cc*Rl*Rs*gm*s + > Cc*Rc*s + Cc*Rl*s + Cl*Rl*s + Cc*Rs*s + Cin*Rs*s + 1 >> I would like to factorize a polynomial function of third degree in order >> to obtain the following form: >> (1 + a*s + b*s^2)*(1 + c*s). >> >> Here my test case: >> >> When I use the factor() function there is no change on the expression. >> Which function I have to use to obtain the wanted simplication ? >> >> all my variables are defined with the command var('Cc, Cin,...)
When working with polynomials, it is often a good idea to actually *define* polynomials. That's to say, to define Cc, Cin, ... as generators of a polynomial ring, not as symbolic variables. The factorisation also depends on the domain of coefficients. Shall the factors be defined with coefficients in the integers? Rational numbers? Real numbers? Complex numbers? Unfortunately, when I tried with polynomials over the reational numbers, I did not obtain a non-trivial factorisation either. Since you explicitly ask about a factorisation of the form (1 + a*s + b*s^2)*(1 + c*s): Is it clear from your application that a factorisation of that form actually exists? Then, you can try to do an Ansatz for a factorisation and obtain equations for a,b,c by comparing the coefficients. Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.