How do you find the derivative of this function:

G(x) = (x^4 - x +1)^2 * (x^2 - 2)^3

2 answers

d/dx [f(x)g(x)= f d/dx g(x)+ d/dx [f(x)] 2(x^2-2)^2 (3(x^4-x+1) x+(x^2-2) (4x^3-1)) (x^4-x+1)
y = (x^4 - x +1)^2 * (x^2 - 2)^3
Using the product rule and chain rule,
y' = 2(x^4-x+1)(4x^3-1)(x^2-2)^3 + (x^4-x+1)^2*3(x^2-2)^2 (2x)
= (x^4-x+1)(x^2-2)^2 (2(4x^3-1)(x^2-2)+(x^4-x+1)*3*2x)
= x^14 - 6x^12 - 2x^11 + 14x^10 + 12x^9 - 19x^8 - 26x^7 + 19x^6 + 28x^5 - 10x^4 - 24x^3 + 4x^2 + 16x - 8

Homework helper's expression looks good, but yields
14x^13 - 72x^11 - 22x^10 + 140x^9 + 108x^8 - 152x^7 - 182x^6 + 114x^5 140x^4 - 40x^3 - 72x^2 - 8x + 16
Can you spot the error?