Why does the $\partial P/\partial y$ and $\partial Q/\partial x$ do not matter while calculating divergence?

74 Views Asked by At

Intuition of Divergence

Given a vector field $A=[P,Q]$, the divergence $\nabla.A = \partial P/\partial x + \partial Q/\partial y.$

Why do the change of $P$ in the $Y$ direction and the change of $Q$ in the $X$ direction not affect the divergence? Why is it not included in the formula? I get the visual reason (whatever comes in is pushed out with the same intensity so the density within the box is not disturbed) for a field like $[y,0]$ but I'm not able to justify it mathematically. enter image description here

And even my visual reasoning fails for a field like $[x+y,0]$ where both $\partial P/\partial y$ and $\partial P/\partial x$ are non zero.