  The Pompeiu problem is considered as shape optimization problem. We show
stability of the ball which is the minimum point of related domain functional.
The proof is based on shape derivative method. Stability of the ball for
general domain functionals invariant under the rigid motions is discussed.
