Let $P$ and $Q$ be functions of $r$ and $r$ be a function of $(x,y,z)$. Also let $f$ be a function of $(x,y)$.
If: $$P(x,y,z) + f (x,y)= Q(x,y,z) \tag{1} $$ By $(1)$ $$\dfrac{\partial P}{\partial x} \neq \dfrac{\partial Q}{\partial x} \Rightarrow \dfrac{dP}{dr} \dfrac{\partial r}{\partial x} \neq \dfrac{dQ}{dr} \dfrac{\partial r}{\partial x}\Rightarrow \dfrac{dP}{dr} \neq \dfrac{dQ}{dr} \tag{2} $$ Also by $(1)$ $$\dfrac{\partial P}{\partial z} = \dfrac{\partial Q}{\partial z}\Rightarrow \dfrac{dP}{dr} \dfrac{\partial r}{\partial z} = \dfrac{dQ}{dr} \dfrac{\partial r}{\partial z} \Rightarrow \dfrac{dP}{dr} = \dfrac{dQ}{dr} \tag{3}$$
$(2)$ and $(3)$ contradict. Why is this so?