# Am I evaluating this expression rightly ? Derivation of multiplied function

How do I evaluate: $$\nabla \cdot K(h)\frac{\partial h}{\partial z}$$

I am applying: $(fg)'=f'g+g'f$

and I am getting: $$\frac{K(h)}{dz}\frac{\partial h}{\partial z}+K(h)\frac{d^2h}{dz^2}$$ now comes the question, am I allowed to do that? $$\frac{K(h)}{dz}\frac{\partial h}{\partial z}+K(h)\frac{d^2h}{dz^2}=\frac{K(h)}{dz}\frac{\partial h}{\partial z}+\frac{K(h)}{dz}\frac{\partial h}{\partial z}$$ So that in the end: $$\nabla \cdot K(h)\frac{\partial h}{\partial z}=2\frac{K(h)}{dz}\frac{\partial h}{\partial z}\ ?$$

I am quite rusty in my Calculus ... sorry if the question seems trivial.

Just to be clear, I am trying to compare the equation from Celia et. al, 1990 to Wikipedia (the original equation from Richards). The form by Richards seems to me like the mixed equation... I just don't know how they get it ... (To non hydrogeologists: $h=\psi + z$)

Richards' Equation in Wikipedia

-
By $\frac{K(h)}{d z}$ are you meaning $\frac{dK}{dz}\circ h$? or else what? – Giuseppe Apr 2 '12 at 18:25
I would have thought he means $dK/dh$? Something is definitely fishy here. – Alex R. Apr 2 '12 at 18:27

First let us state that we are using standard caterisan coordinates x,y,z. Then note that $\nabla \cdot v$ for some vector $v$ is equivalent ot taking the divergence of $v$, div$v$. So if $v=(v_{1},v_{2},v{3})$, $\nabla \cdot v=(\frac{\partial v}{\partial x},\frac{\partial v}{\partial y},\frac{\partial v}{\partial z})$.
However, $v$ is a vector, and I am not seeing how $K(h)\frac{\partial h}{\partial v}$ is a vector quantity unless $\frac{\partial h}{\partial v}$ is actually $\frac{\partial}{\partial v}$ i.e. $v=(0,0,K(h))$, or $K(h)$ is a vector valued function such that $v=(\frac{\partial h}{\partial z} K_{x}(h),\frac{\partial h}{\partial z} K_{y}(h), \frac{\partial h}{\partial z} K_{z}(h)).$ Eitherway, we would still apply the above notion of divergence to these vectors to find the result. For the latter case, the product rule would be used; however, not for the former case.
OK, sorry, $h$ is the scalar field, K is really a vector field ($K_z$ can be different from $K_x$ for example). So according do your answer, the product rule does not apply... – Oz123 Apr 2 '12 at 19:01