i need to find the derivative using chain rule:

(x^2 + 2x - 6)^2 (1-x^3)^2

i got the answer from a site but the problem is i cannot get my work to match up with the answer, i don't know what im doing wrong.

answer: 10x^9 + 36x^8 − 64x^7 − 182x^6 + 168x^5 + 80x^4 + 196x^3 − 204x^2 − 16x−24

my work:
f'(x) = [2(x^2 + 2x - 6)*(2x + 2)]*(1-x^3)^2 + [2(1-x^3)*(3x^2)]*(x^2 +2x-6)^2

f'(x)=2(2x^3 +6x^2 -8x-12)*(1-x^3)^2 +[2(3x^2 -3x^5)]*(x^2 +2x-6)(x^2 +2x-6)

f'(x)= (4x^3 +12x^2 -16x-24)*(1-2x^3 +x^6) +(6x^2 -6x^5)*(x^4 +4x^3 -8x^2 -24x+36)
f'(x)=4x^9 +12x^8 -16x^7 -32x^6 -24x^5 +32x^4 +52x^3 +12x^2 -16x-24)+(-6x^9 -24x^8 +48x^7 -138x^6 -198x^5 -48x^4 -144x^3 +216x^2)

f'(x)=-2x^9 -12x^8 +32x^7 -170x^6 +222x^5 -16x^4 -92x^3 +228x^2 -16x -24

its 1am and i could have made some arithmetic errors but im fairly certain there accurate for the most part

2 answers

well, maybe they're as accurate as your spelling...

Your very first line is in error: should be -3x^2 toward the end.

Fix that, and everything's ok.

If you visit wolframalpha.com and enter

derivative (x^2 + 2x - 6)^2 (1-x^3)^2

you will get several different ways of writing it.

If you enter

your corrected first step:

[2(x^2 + 2x - 6)*(2x + 2)]*(1-x^3)^2 + [2(1-x^3)*(-3x^2)]*(x^2 +2x-6)^2

you will get the same answer.

Devil's in the details, as usual. Unless otherwise instructed, I'd probably not take it all the way to a single expanded expression.
Y=2x^3-16x^2+64x+1