Why's the derivative of $f(x) = x^3-5x-2 $ not $3x^2-7$? I wanted to resolve this problem :
$$
f(x) = 3 x^2 - 5 x - 2
$$
to a derivative, and I did it like this : 


$
\begin{align}
f(x) &= x^3-5x-2 \\
f'(x) &= 3x^2-5-2 \\
      &= 3x^2-7
\end{align}
$

but once I checked the correction, I found this:
$$
f'(x) = 3 x^2 - 5
$$ 
And I really don't know how they manage to get $3x^2 -5$ instead of $3x^2-7$.
Thanks for you time 

The derivative of a constant is zero, so if $$f(x) = x^3 - 5x - 2 = x^3 - 5 x^1 - 2,$$ the correct derivative is $$f'(x) = 3x^{3-1} - 5 \cdot 1 x^{1-1} - \color{red}{0} = 3x^2 - 5x^0 - 0 = 3x^2 - 5.$$
