How would we calculate the density of particles inside a 1 dimensional universe. The particles can only interact with each other through Newtonian gravity and will pass right through each other. the particles inside the universe has an initial speed of zero, but the density is not uniform can can be modeled as a density function. the total mass found when integrating the density is finite. How could we represent the density function $\sigma(x,t)$ using the initial density $\sigma(x,0)$.
The first thing I tried was to find the acceleration of a point $p$ in the mass distribution using this integral $$a = \frac{Gm}{r^2}$$ $$\int_{-\infty}^{\infty}(\frac{Gdm}{(x-p)^2})$$ using the fact that $dm = \sigma(x,t)dx$ I can replace that in the integral. $$\int_{-\infty}^{\infty}(\frac{G\sigma(x-p,t)}{(x-p)^2})dx$$ The problem is I don't know how to move forward with this, I think this has something to do with partial differential equations