To ensure that the calculated maximum variance is indeed a maximum, and not a minimum, you must take the second derivative. The second derivative at the "zero" (found in the first derivative) must be less than zero in order for the "zero" to be a maximum. If it's > 0, then it's a minimum and not a maximum