# How come the pressure gradient is equal to the divergence of pressure in incompressible fluids?

The net force due to pressure on a surface can be calculated by integrating the pressure over the surface. The equation for the surface integral of pressure is:

$$\vec{F} = \iint_S p\hat{n} dS$$

where $$\vec{F}$$ is the net force due to pressure, $$p$$ is the pressure, $$\hat{n}$$ is the unit normal vector to the surface, and $$dS$$ is the differential area of the surface.

The pressure gradient and weight per unit volume are related through the hydrostatic equation, which is given by:

$$\frac{\partial p}{\partial z} = -\rho g$$

where $$\frac{\partial p}{\partial z}$$ is the pressure gradient (∇p) in the vertical direction, $$\rho$$ is the density of the fluid, $$g$$ is the acceleration due to gravity. The equation for the divergence theorem is:

$$\iint_S \vec{F} \cdot \hat{n} dS = \iiint_V \nabla \cdot \vec{F} dV$$

where $$\vec{F}$$ is a vector field, $$\hat{n}$$ is the unit normal vector to the surface $$S$$, and $$\nabla \cdot \vec{F}$$ is the divergence of the vector field $$\vec{F}$$. The divergence theorem relates the flux of a vector field through a closed surface to the divergence of the field in the volume enclosed.

So, from here, the gradient of the pressure is equal to the divergence of the pressure and the final buoyant force is determined as $$F_b = -\rho V g$$

where $$F_b$$ is the buoyant force, $$\rho$$ is the density of the fluid, $$V$$ is the volume of the fluid displaced by the object, and $$g$$ is the acceleration due to gravity.

Your use of the same notation $$\vec F$$ is confusing. But yes, you are correct, the divergence is essentially replaced by a gradient. This is because you are integrating vector fields: $$\oint p d^2x = \int \nabla p d^3x$$ You can derive it from the divergence theorem by taking the dot product with an arbitrary constant vector $$u$$, or more pedestianly by looking at the coordinates. You'll need for any constant vector $$u$$: $$\nabla\cdot (pu) = u\cdot \nabla p$$