In many physical models, internal energy will run out without external energy sources. Therefore, finding optimal energy sources and studying their behavior are essential issues. In this article, we study the following variational problem: Gϵ∗=sup∫ΩG(u)ϵq(x)dx:∥∇u∥Lp(.)≤ϵ,u=0 on ∂Ω, with the help of Γ-convergence, where G:R→R is upper semicontinuous, non zero in the L1 sense, 0≤G(u)≤c|u|q(.), Ω is a bounded open subset of Rn, n≥3, 1<p(.)<n, and p(.)≤q(.)≤p∗(.). For special choices of G, we can study Bernoulli’s free-boundary and plasma problems in variable exponent Lebesgue spaces.