How does this relationship between partial derivatives work?

22 Views Asked by At

Let $f$ be a scalar field then,

$\frac{\partial}{\partial x_j}(f \frac{\partial f}{\partial x_k}) = \frac{\partial }{\partial x_j} \frac{\partial }{\partial x_k}(\frac{1}{2}f^2)$.

How do you get from the LHS to the RHS?

I've tried applying the product rule to the LHS but I still couldn't arrive at the RHS. What am I missing?