Abstract. We solve variationally certain equations of stellar dynamics of thein a domain Ω of ℝ , where is a proper linear subspace of ℝ . Existence problems are related to the question of attainability of the best constant in the following inequality due to Maz'ya (1985):and where is the orthogonal projection on a linear space , where dim ℝ ≥ 2 (see also Badiale-Tarantello (2002)). We investigate this question and how it depends on the relative position of the subspace ⊥ , the orthogonal of , with respect to the domain Ω, as well as on the curvature of the boundary ∂Ω at its points of intersection with ⊥ .