What is $f '(x)$ for $f(x)=(x-3)^3$? 
What is $f '(x)$ for $f(x)=(x-3)^3$?

I'm thinking it is $3x^2 - 18x + 27$
but my textbook says it is $3x^2 - 18x - 27$

Note that
$$
f(x)=U^n\\
f^{\prime}(x)=nU^{\prime}U^{n-1}
$$
Then
$$\begin{align}
f^{\prime}(x)&=3(x-3)^{2}\\
&=3(x-3)(x-3)\\
&=3(x(x-3)-3(x-3))\\
&=3(x^2-3x-3x+9)\\
&=3(x^2-6x+9)\\
&=3x^2-18x+27\\
\end{align}$$
