Ask Your Question

etuardu's profile - activity

2020-01-02 14:39:17 +0100 received badge  Notable Question (source)
2016-08-07 12:22:49 +0100 received badge  Popular Question (source)
2012-07-04 11:53:37 +0100 received badge  Editor (source)
2012-07-04 11:42:33 +0100 asked a question Get the greatest common factor

Hi, I know from my last question that I can factorize to the greatest common factor using collect_common_factors(), but I can't understand how to get this common factor.

Eg: let y = 10*x^4 + x^3 + 2*x^2.
I can simplify it with y.collect_common_factors() and get y = (10*x^2 + x + 2)*x^2.
But how can I get x^2, the collecting common factor?

Thank you!

2012-07-04 11:10:23 +0100 commented answer Polynomial: distribute to greatest common factor

Thank you, `collect_common_factors()` is indeed what I was looking for. It was that easy and I apologize if I couldn't manage to find out myself but it seems this function lacks of documentation or search engine indexing.

2012-07-04 11:03:33 +0100 received badge  Supporter (source)
2012-07-04 11:03:32 +0100 received badge  Scholar (source)
2012-07-04 11:03:32 +0100 marked best answer Polynomial: distribute to greatest common factor



This gives the output you want.

You could also use factor(y,x^2) if you know upfront that you want to factor out $x^2$.

2012-07-01 13:29:49 +0100 asked a question Polynomial: distribute to greatest common factor

Hello, assuming I have a polinomial like this:

sage: var('x, y')
(x, y)
sage: y = 2*x^2 + x^3 + 10*x^4

is there a way to get it simplified applying the distributive property on the greatest common factor?
In this case, the output should be this:

y = x^2 * ( 2 + x + 10*x^2 )

Thank you!