I have been struggling with this for the past couple of days now and can't seem to get a solid answer.
Let's say that we are differentiating $f(x)=x^3-3x^2-24x+1$ and we get $3x^2-6x-24$ and we put this equal to zero to find that $x = -2$ and $x = 4$.
The problem I have is after finding these $x$ values and wanting to put them in I can't decide if I put $-2$ as $(-2)^2$ or $-2^2$ if I take the one or the other the signs change from $-12$ to $+12$ and that changes my answer as a whole. Could someone please help me with this one? Thanks
The problem has been resolved in the comments, but I'll put an answer here with brief explanation for completeness.
Say you have an expression $x^2$ where $x=-2$. How do you write the value of the expression explicitly? If you write $-2^2$, this really means $-(2^2)$ because of notational conventions we follow, so this is really $-(2\times2)$. Thus, the correct version is $(-2)^2$, which denotes $(-2)\times(-2)$ to show what you want. You should note that these are completely different things, and the sign isn't just magically changed for no reason, and you should be clear that, when you see something like $-a^b$, we really mean $-(a^b)$ and not $(-a)^b$. This is especially important if you look at powers other than nice integers, and the difference is not just in changing a sign; $-1^{1/2}$ is $-1$ but $(-1)^{1/2}$ has no value in the real numbers!