WEIERSTRASS CONDITION FOR THE GENERAL BASIC VARIATIONAL PROBLEM