In literature I read:
$$\tag{1} \mathbf{q}=(Nd^2)(\rho/\mu)[\mathbf{g}-(1/\rho) \nabla p]=\sigma \mathbf{E}$$ which is valid for liquid generally, and for gases at pressures higher than about 20 atmospheres. $\mathbf{E}=[\mathbf{g}-(1/\rho) \nabla p]$ is the impelling force per unit mass acting upon the fluid. So long as the fluid density is constant or is a function of the pressure only, $$\tag{2} \nabla \times \mathbf{E}=0, \mathbf{E}=-\nabla \Phi$$ where $$\tag{3} \Phi = gz+\int \frac{dp}{\rho}$$
In quoting the literature above, I note they did not emphasize how the density can be compressible and a function of the pressure only. I.e., I suppose they could have wrote: $$\tag{4} \Phi = gz+\int \frac{dp}{\rho(p)}$$
According to Eqn(2), taking the negative gradient of $\Phi$ as defined in Eqn(3) or Eqn(4), I should end up with the relation given for $\mathbf{E}=[\mathbf{g}-(1/\rho) \nabla p]$.
I can see that for the first term on the right, the gravity term $gz$, when taking its gradient I get $\frac{\partial (gz)}{\partial z}=g\hat k=\mathbf{g}$. What I don't understand is how to take the gradient of the second term on the right of Eqn(3) or Eqn(4). How is this done? How does one show that:
$$\tag{5} \nabla \left(\int \frac{dp}{\rho}\right)=(1/\rho) \nabla p$$ or $$\tag{6} \nabla \left(\int \frac{dp}{\rho(p)}\right)=(1/\rho) \nabla p$$