Ask Your Question
1

another factoring polynomials question

asked 2020-01-29 18:27:50 +0100

anne gravatar image

I have the following expression:

f = u^2*v*x + 3*u*v^2*x + 2*v^3*x + u^2*x^2 + 5*u*v*x^2 + 5*v^2*x^2 + 2*u*x^3 + 4*v*x^3 + x^4 + 2*u^2*v*y + 6*u*v^2*y + 4*v^3*y + 2*u^2*x*y + 12*u*v*x*y + 12*v^2*x*y + 6*u*x^2*y + 12*v*x^2*y + 4*x^3*y + u^2*y^2 + 6*u*v*y^2 + 6*v^2*y^2 + 6*u*x*y^2 + 12*v*x*y^2 + 5*x^2*y^2 + 2*u*y^3 + 4*v*y^3 + 2*x*y^3 + u^2*v*z + 3*u*v^2*z + 2*v^3*z + u^2*x*z + 6*u*v*x*z + 6*v^2*x*z + 3*u*x^2*z + 6*v*x^2*z + 2*x^3*z + u^2*y*z + 6*u*v*y*z + 6*v^2*y*z + 6*u*x*y*z + 12*v*x*y*z + 5*x^2*y*z + 3*u*y^2*z + 6*v*y^2*z + 3*x*y^2*z + u*v*z^2 + v^2*z^2 + u*x*z^2 + 2*v*x*z^2 + x^2*z^2 + u*y*z^2 + 2*v*y*z^2 + x*y*z^2

and I would like to simplify it by gathering and factoring partial sums

u, u+v,...,u+v+x+y+z
v, v+x,...,v+x+y+z
x, x+y,x+y+z,
y,y+z
z

(I have reason to expect that the expression will look quite a bit nicer if I do this, introducing notation for the sums of course, like h_{ij} = the sum of variables i up to j)

My first lame try at this was to ask sage to rational_simplify() quotients f/(u+v+x+y+z),...,f/(u+v), and so on, hoping to see more than just one big fraction. It didn't work.

Any insights/suggestions/corrections would be much appreciated!

Thanks,

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-01-30 22:44:52 +0100

azerbajdzan gravatar image

updated 2020-01-30 23:06:04 +0100

Your $f$ can be simplified to:

v*(u + v)*(6*(x + y + z)^2 - (x^2 + 6*(x + y)*z + 5*z^2) + (x + 2*y + z)*(u + 2*v)) + (x + y)*(x + y + z)*(u^2 + x*(x + 2*y + z) + (u + 2*v)*(2*x + 2*y + z))

or if you prefer it without minus $-$ sign:

v*(u + v)*((x + z)*(5*x + z) + 6*y*(2*x + y + z) + (x + 2*y + z)*(u + 2*v)) + (x + y)*(x + y + z)*(u^2 + x*(x + 2*y + z) + (u + 2*v)*(2*x + 2*y + z))

Is it what you wanted?

edit flag offensive delete link more

Comments

A very belated thank you!

anne gravatar imageanne ( 2020-12-01 05:58:13 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-01-29 18:27:50 +0100

Seen: 324 times

Last updated: Jan 30 '20