We present Z. Naniewicz method of optimization a coercive integral functional 𝒥 with integrand being a minimum of quasiconvex functions. This method is applied to the minimization of functional with integrand expressed as a minimum of two quadratic functions. This is done by approximating the original nonconvex problem by appropriate convex ones.