Given a function, trace the first and second derivative

This program will trace the first and second derivative for a pre defined function.

When is the first derivative equal to zero? When is the second derivative equal to zero? If the first derivative is at a maximum value then what is the value of the second derivative and why?