On minimization of a non-convex functional in variable exponent spaces