We will consider the elliptic problem −∆u + αχ D u = λu in Ω, where Ω is a domain in R n with regular boundary, and D ⊂ Ω is a closed subset with prescribed Lebesgue measure. The motivation for this problem comes from Mechanics, where this equation models the vibrations of a composite membrane. Let λ 1 (D) be the first eigenvalue of the problem, which is seen as a function of the set D. In this work, we will show that λ 1 is a simple eigenvalue, and we will study the problem of minimizing λ 1 (D) when D varies in the family of all closed subsets of Ω with a given Lebesgue measure. More precisely, we will determine formulas for the first and the second variation of λ 1 .