The Student Room Group

quick way of expanding a cubic (3 brackets)

does anyone know a quick way of expanding a cubic (3 brackets)?

for example: a quadratic (x+a)(x+b)=x2+(a+b)x+(ab)(x+a)(x+b) = x^2+(a+b)x+(ab) is quicker than multiplying each term by eacher other term in the other bracket individually. what about if you have 3 brackets?

i'm doing some work on Lagrange interpolation polynomials and a particular question i have to find a polynomial of degree 3, which is taking bare long as i have to expand 3 brackets every time.

Scroll to see replies

Reply 1
Expand out (x - a)(x - b)(x - c) and collect all the x^2 and x terms together. What do you notice?
Pascal's triange?
Reply 3
super-emily
Pascal's triange?


Only really useful when all 3 brackets are the same, i.e.

(a+b)(a+b)(a+b) = (a+b)^3

Not when they're different.
ahhh...I see. I wasn't exactly sure what 'Lagrange interpolation polynomials' were, so Pascal would only work for (a+b)(a+b)(a+b) = (a+b)^3.

but it is a good way of doing it, if it works out like that :biggrin:
Could look at the sum of roots, sum of paired roots ,product of roots.
Expanding 3 brackets shouldn't take that long. Definitely not worth considering sums of roots and things.
Swayum
Expand out (x - a)(x - b)(x - c) and collect all the x^2 and x terms together. What do you notice?


x3(a+b+c)x2+(ab)x+(a+b)cabcx^3-(a+b+c)x^2+(ab)x+(a+b)c-abc?
Reply 8
Prokaryotic_crap
x3(a+b+c)x2+(ab)x+(a+b)cabcx^3-(a+b+c)x^2+(ab)x+(a+b)c-abc?


Nope, try again.
Prokaryotic_crap
x3(a+b+c)x2+(ab)x+(a+b)cabcx^3-(a+b+c)x^2+(ab)x+(a+b)c-abc?


hmmm.


May I humbly suggest you read this file to improve some of the more fundamental things you should know;
Swayum
Nope, try again.


x3(a+b+c)x2+(ab+bc+ac)xabcx^3-(a+b+c)x^2+(ab+bc+ac)x-abc?
DeanK22
hmmm.


May I humbly suggest you read this file to improve some of the more fundamental things you should know;


thank you
Reply 12
Prokaryotic_crap
x3(a+b+c)x2+(ab+bc+ac)xabcx^3-(a+b+c)x^2+(ab+bc+ac)x-abc?


I don't have it memorised but that looks right. Ok, so if you memorise that above result, it becomes easyish to expand a cubic:

(x - 1)(x - 2)(x - 3)

-(a + b + c) = -6
ab + bc + ac = 2 + 6 + 3 = 11
-abc = -6

And so it's x^3 - 6x^2 + 11x - 6. I don't know if you consider that faster than just doing the expansion - I think it is (but Daniel Freedman doesn't).
Reply 13
If you expand (x+α)(x+β)(x+γ)(x + \alpha)(x + \beta)(x + \gamma) you'll find a general term.

Spoiler

to swayum:
does that work also for (x+a)(x+b)(x+c) or is it just for (x-a)(x-b)(x-c)? and also did you suggest expanding (x-a)(x-b)(x-c) because in the formula for Lagrange interpolation polynomials its most - inside the brackets and not +?
DeanK22
hmmm.


May I humbly suggest you read this file to improve some of the more fundamental things you should know;

don't you go stealing our lecture notes!
Reply 16
Prokaryotic_crap
to swayum:
does that work also for (x+a)(x+b)(x+c) or is it just for (x-a)(x-b)(x-c)? and also did you suggest expanding (x-a)(x-b)(x-c) because in the formula for Lagrange interpolation polynomials its most - inside the brackets and not +?


Well, if you have (x + 5), then a = -5 so it works for both really. I suggested it in that form because it relates well to roots of polynomials.
thanks to whoever repped me :five:
Reply 18
Prokaryotic_crap
to swayum:
does that work also for (x+a)(x+b)(x+c) or is it just for (x-a)(x-b)(x-c)? and also did you suggest expanding (x-a)(x-b)(x-c) because in the formula for Lagrange interpolation polynomials its most - inside the brackets and not +?

The reason why it's normally given as (x - a)(x - b)(x - c) is because if a polynomial is given by this, then it has roots at a, b and c. So, the function
Unparseable latex formula:

\mbox{f}(x) = (x + a)(x + b)(x + c)

has roots at x=a,x=b,x=cx = -a, x = -b, x = -c. It's just a convention to put the - in the brackets when dealing with unknown roots (or roots not given numerically).
Only for positives:

(x+a)(x+b)(x+c) = x^3 + (a+b+c)x^2 + ((a*b)+(a*c)+(b*c))x + ABC.

Eg, (x+1)(x+3)(x+3) = x^3 + (1+3+3)x^2 + ((1*3)+(1*3)+(3*3))x + (1*3*3) = x^3 + 7x^2 + 15x + 9.

Probably some flaws in this, I only got this when my maths teacher made us do over 25 of them. Seemed to work for me though. If someone's bothered, try and figure out how to make this work for negatives, or when the coefficient of x is more than one.
(edited 8 years ago)