# Could you give boundary conditions to the gravitational potential given the density distribution?

We´re doing a project that's all about solving differential equations with separation of variables. We´re trying to find the gravitational potential given the density distribution (that has azimuthal density) but we don't know how to define the boundary conditions.

Every differential equation problem has two parts: the differential equation itself, and the boundary condition. Neither can tell you the other in and of itself. Consider $y'' = -k^2 y$. Is the solution sine or cosine? The answer depends on boundary conditions, and I have to specify them. I can't get them by specifying anything in the equation.
So, say your differential equation is something along the lines of $\nabla^2 \phi = \rho$, where $\phi$ is a potential and $\rho$ is some source. (Your actual equation may differ from this in constants--but I assume you're solving Poisson's equation anyway.) You're going to need conditions for each coordinate, and the form of it depends on the coordinates you use. If you're in cylindrical or spherical, you have some radius $r$. Usually people take the potential to go to zero at $r \to \infty$, and/or require that $\phi$ be regular at $r = 0$. These tend to pick either $r^\ell$ or $r^{-(\ell + 1)}$ solutions, depending on which one you impose. For angular coordinates, the important thing is often to preserve periodicity, so you want to make sure that $\phi(\theta) = \phi(\theta + 2 \pi)$.