A general approach for the evaluation of strain energy extrema in anisotropic elasticity