PDA

View Full Version : Faster Polynomial Multiplication


Kys91
Sep3-09, 01:51 AM
I can solve:

(2x+3y-4z)(2x-3y+4z) = [2x +(3y-4z)] [2x -(3y-4z)] = (2x)^2 -(3y-4z)^2 = (2x)^2 - (9y^2 - 24yz - 16z) = 4x^2 - 9y^2 + 24yz + 16z which is fine, but if I try to solve:

(m^2-m-1)(m^2+m-1) = [m^2 -(m+1)][m^2+(m-1) = (m^2)^ 2 - (m-1)^2 = (m^2)^2 - (m^2 -2m +1) = m^4 - m^2 +2m -1 which is not, and I also tried doing:

[(m^2 - m)-1] [(m^2+m)-1] = (m^4 - m^2) + 1 = this latest one is near, but anyway it should be m^4-3m^2 + 1

Doing normal multiplication I get: m^4 +m^3 -m^2 -m^3 -m^2+ m-m^2-m+ 1 = m^4-3m^2 + 1

So why is it that I have -m^2 when is it really -3m^2?

Thanks

symbolipoint
Sep3-09, 01:58 AM
Since you have factors which are sums of powers of m, use a lattice system to help keep like terms easily found.

VietDao29
Sep3-09, 03:07 AM
You are using the equality: (x + y)(x - y) = x2 - y2, right?

...

(m^2-m-1)(m^2+m-1) = [m^2 -(m+1)][m^2+(m-1) = (m^2)^ 2 - (m-1)^2 = (m^2)^2 - (m^2 -2m +1) = m^4 - m^2 +2m -1 which is not, and I also tried doing:

Notice the bolded part, that's where you went wrong. Since m + 1 does not equal m - 1, so you cannot apply the equality here. Remember that:

(x + y)(x - y) = x2 - y2

[(m^2 - m)-1] [(m^2+m)-1] = (m^4 - m^2) + 1 = this latest one is near, but anyway it should be m^4-3m^2 + 1

This is totally wrong, since m2 - m is not the same as m2 + m.

And you are having 2 minus signs here (the red part). It should be one plus, and one minus instead. Please stick to the formula!!! It's NOT: (x - y)(x - y) = x2 + y2!!!!! This is nowhere near correct!!!

Instead, what we should use here is:

(x + y)(x - y) = x2 - y2

-----------------------

So, back to your problem:

(m2 - m - 1)(m2 + m - 1)

Notice the 2 terms -m, and +m, they are of different signs. Let's see if you can find any way to apply the equality (x + y)(x - y) = x2 - y2 here. :)

HallsofIvy
Sep3-09, 06:12 AM
I can solve:

(2x+3y-4z)(2x-3y+4z) = [2x +(3y-4z)] [2x -(3y-4z)] = (2x)^2 -(3y-4z)^2 = (2x)^2 - (9y^2 - 24yz - 16z) = 4x^2 - 9y^2 + 24yz + 16z which is fine, but if I try to solve:

(m^2-m-1)(m^2+m-1) = [m^2 -(m+1)][m^2+(m-1) = (m^2)^ 2 - (m-1)^2 = (m^2)^2 - (m^2 -2m +1) = m^4 - m^2 +2m -1 which is not, and I also tried doing:

[(m^2 - m)-1] [(m^2+m)-1] = (m^4 - m^2) + 1 = this latest one is near, but anyway it should be m^4-3m^2 + 1

Doing normal multiplication I get: m^4 +m^3 -m^2 -m^3 -m^2+ m-m^2-m+ 1 = m^4-3m^2 + 1

So why is it that I have -m^2 when is it really -3m^2?

Thanks
Because you did it wrong, of course!:wink:
You have [(m^2- m)-1][(m^2+m)-1] and did the first part as a "sum and difference product": (m^2- m)(m^2+ m)= (m^2)^2- m^2= m^4- m^2 which is correct. And, of course, (1)(1)= 1. But you forgot the "middle terms" (the "O" and "I" of "FOIL").
[(m^2- m)- 1][(m^2+m)- 1]= (m^2- m)(m^2+m)+ (m^2-m)(-1)+ (-1)(m^2+m)+(-1)(-1)
= (m^4- m^2)- (m^2- m)- (m^2+ m)+ 1= m^4- 3m^2+ 1
(The "m" and "-m" terms cancel.)

Kys91
Sep4-09, 12:59 AM
Alright guys, thanks. :smile: Studying yourself + this forum is a lethal formula for learning about a lot of things.