The value of the second derivative for [tex]x=0[/tex] is neither positive nor negative, so you can't tell whether this point is a minimum or a maximum. You need to check the values of the first derivative around the point. But the value of [tex]5x^4[/tex] is always positive for [tex]x\in\mathbb{R}\setminus \{0\}[/tex]. That means at [tex]x=0[/tex] there's neither minimum nor maximum. The maximum must be then at either of the endpoints of the interval [tex][-2,1][/tex]. The function [tex]y[/tex] is increasing in its entire domain, so the maximum value is at the right endpoint of the interval.