calculate the gradient of the vertical force. The gradients due to each mass component add up as $$\begin{aligned}
\frac{dF_{z,\textrm{total}}(R,z)}{dz} &=& \nonumber \\
\frac{dF_{z,\textrm{gas}}(R,z)}{dz}&+&\frac{dF_{z,\textrm{stellar}}(R,z)}{dz}+\frac{dF_{z,\textrm{halo}}(R,z)}{dz} \label{eqn:zresidual}\end{aligned}$$

Following @OBrien2010D, the disc is assumed to be in vertical hydrostatic equilibrium, such that the vertical gas pressure gradient and total vertical gravitational force of the galaxy potential $\Phi_\textrm{total}$ due to all mass components balance perfectly, $$\nabla\left(\sigma_\textrm{gas}^2 \,\rho_\textrm{gas}\right) = \rho_\textrm{gas} \nabla \Phi_\textrm{total}\label{eqn:hydro}\,\,.$$

We next assume that the gas velocity dispersion is isothermal[^3] in $z$. In that case, Equation \[eqn:hydro\] reduces to $$\frac{\sigma_\textrm{gas}^2 \,\partial\left[ \log \rho_\textrm{gas}(R,z)\right]}{\partial z^2} = - \frac{\partial F_{z,\textrm{total}} (R,z)}{\partial z}\,\,.\label{assumption:isothermal}$$

Since our [ <span style="font-variant:small-caps;">HI</span> ]{}disc is modelled as a Gaussian distribution (see Equation 15 of Paper II), this becomes $$\frac{\partial F_{z,\textrm{total}} (R,z)}{\partial z} = -\frac{\sigma^2_\textrm{gas}(R)}{{z_0}^2(R)}\label{eqn:Ftotal}\,\, ,$$ such that the vertical gradient of $F_\textrm{z,total}$ is constant with height $z$.

The gradients of the stellar and gas force components was calculated using the Poisson equation, where we assume the disc is axi-symmetric and the circular rotation is constant with height [@OBrien2010D], $$\frac{\partial F_{z} (R,z)}{\partial z} = -4\pi G \rho(R,z) + \frac{1}{R} \frac{\partial \, v^2(R)}{\partial R},\label{eqn:poissonz}$$ where we use the density $\rho$ and rotation $v$ of each of the two components. The squared velocity gradient is 