# Comparing expressions for Ertel Potential Vorticity and Quasi Geostrophic Potential Vorticity

In Meteorology there is a quantity called "Ertel Potential Vorticity" $$q_e$$ which is conserved considering isentropic flow ($$\theta=const)$$:

$$\frac{d}{dt}\left(\frac{1}{\rho} \vec \eta \cdot \vec \nabla \theta \right)= \frac{dq_e}{dt}=0$$

Since the gradient is nearly vertical, we have

$$q_e \approx \left( \zeta_z+f\right)\cdot \left( \frac{1}{\rho}\frac{\partial \theta}{\partial z}\right)$$

So, the conserved quantity is the total vorticity times a stability factor.

On the other hand, applying quasi geostrophic approximation the following conserved quantity, called "quasi geostrophic potential vorticity):

$$q_g = \frac{1}{f_0} \vec \nabla ^2 \phi + f + \frac{f_0}{\sigma} \frac{\partial^2 \phi}{\partial p^2}$$

In this case the conserved quantity is the sum of total vorticity plus some other term, since

$$\frac{1}{f_0} \vec \nabla ^2 \phi = \zeta_g$$

I wonder, how the second form $$q_g$$is derived as a limit of the first form $$q_e$$. I'm not able to transform the sum into a factorized form.