Bracket expansion, keeps failing tests.

58 Views Asked by At

It's $((a + b)c - bc)a - a^2(c - a)$.

I rearrange to make it easier to see:

$a(c(a + b) - bc) - a^2(c - a)$

Expand the term on the left:

$a(ac + bc) - abc - a^2(c - a)$

Again:

$aac + abc - abc - a^2(c - a)$

Remove the like terms which cancel:

$aac - a^2(c - a)$

Expand:

$aac - a^2(c - a)$

$aac - a^2c + a^2a$

Organise:

$a^2c - 2ac + 2a^2$

But it looks like the game is already lost because this result already disagrees with some of the programs I'm using to check it.

In fact, Alpha claims it goes down to $ a^3$

What am I doing wrong?

3

There are 3 best solutions below

1
On

I think it should be $a^2$ instead of $a2$ in the problem. Then, your second to last line reads $aac - a^2c + a^2a = a^3$ as claimed by Wolfram alpha.

0
On

hint: $(a+b)c - bc = ac + bc - bc = ac$, and $a^2(c-a) = a^2c- a^3$

2
On

we have $$((a+b)c-bc)a-a^2(c-a)=(ac+bc-bc)a-a^2c+a^3=a^2c-a^2c+a^3=a^3$$