In Pure Aloha, efficiency is defined as $\eta (G) = Ge^{-2G}.$ And, for a moment, you can write it as $f (x) = xe^{-2x}.$

The reason why we do second derivative test is that it might be possible that $f’$ is zero at a critical point but neither local maxima nor local minima exist at that critical point.

For example, $f(x) = x^3,$ here $f’(x)=0$ at $x=0$ but you will get neither local maxima nor local minima.

The reason is that $f’$ has the same sign both sides of critical point(s). For example, if you draw the graph of $x^3,$ you get $f’>0$ on both sides of zero. So, you have to do second derivative test and there is a proof (if you want, I will add it here) which tells that suppose $f’(a) = 0$ and If $f’’(a) > 0$ then $f$ has local minimum at $a$ and if $f’’(a) < 0$ then $f$ has local maximum at $a.$

It is not necessary that you have to do second derivative test unless you sketch the graph.

The reason why we do second derivative test is that it might be possible that $f’$ is zero at a critical point but neither local maxima nor local minima exist at that critical point.

For example, $f(x) = x^3,$ here $f’(x)=0$ at $x=0$ but you will get neither local maxima nor local minima.

The reason is that $f’$ has the same sign both sides of critical point(s). For example, if you draw the graph of $x^3,$ you get $f’>0$ on both sides of zero. So, you have to do second derivative test and there is a proof (if you want, I will add it here) which tells that suppose $f’(a) = 0$ and If $f’’(a) > 0$ then $f$ has local minimum at $a$ and if $f’’(a) < 0$ then $f$ has local maximum at $a.$

It is not necessary that you have to do second derivative test unless you sketch the graph.