Answer :

irspow
x^3-5x^2-25x+125

(x^3+125)-5x^2-25x

(x+5)(x^2-5x^2+25)-5x^2-25x

(x+5)(x^2-5x^2+25)-5x(x+5)

(x+5)(x^2-5x+25-5x)

(x+5)(x^2-10x+25)

(x+5)(x-5)(x-5)

x= -5 and 5

So there are two roots when x= ±5

df/dx=3x^2-10x-25

d2f/dx2=6x-10

So when x=-5, acceleration is negative and this is a local maximum for f(x) and when x=+5, acceleration is positive and this is a local minimum for f(x).