# The Hydrostatic Equation
$\rho_{r} \frac{d^2r}{dt^2} = -\frac{dP_{r}}{dr} - G \frac{M_{r}\rho_{r}}{r^2}$
or:
$\frac{dp}{dz} = -g\rho$
Where $dz$ is the change in depth within a fluid.
>[!Success]- Proving the Hydrostatic Equation
>
>Sure, the partial derivative might seem intimidating at first, but it's actually not that bad!
>
>When thinking about hydrostatics, we have to think in 'shells'. Before heading it, it's important that we provide ourselves with a method to visualise this - such as in this diagram below!
>
>
>
>The term '**hydrostatic equilibrium**' refers to the equilibrium between the pressure from the air above this imaginary slab and of the upward pressure caused by the air below the slab pushing against it. If we let the density of the air be a constant '$\rho