F(x) = (x^3 - x + 1)^4

f'(x)=

Just use the chain rule

d/dx (u^n) = n u^(n-1) du/dx
so, we get

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