On the gravitational potentials and the Riccati like equations