# Differentiating a tensor expression

If we have a simple tensorial expression,

$$H = \frac{1}{2} g_{\mu \nu} x^{\mu} x^{\nu}$$

I understand that we can differentiate this w.r.t $x^{\mu}$ as,

$$\frac{\partial H}{\partial x^{\mu}} = g_{\mu \nu} x^{\nu}$$

That's OK. Now, what about a higher order tensor expression in the momenta:

$$H = A^{\mu \nu \alpha \beta}(x^{\mu})p_{\mu} p_{\nu} p_{\alpha} p_{\beta}$$

How would one calculate $\frac{\partial H}{\partial p_{\mu}}$? Is is simply,

$$\frac{\partial H}{\partial p_{\mu}} = A^{\mu \nu \alpha \beta}(x^{\mu}) p_{\nu} p_{\alpha} p_{\beta} ~?$$

• Don't forget that you are using Einstein's summation convention, so really $p_\mu$ appears in $4$ different places, so to speak. – Malkoun Mar 15 '17 at 10:33
• Consider to add context and/or references to the post. Is $x^{\mu}$ supposed to be a 4-velocity? A vector field? – Qmechanic Mar 15 '17 at 12:10

First, note that $$\frac{\partial x^\mu}{\partial x^\nu} = \frac{\partial p_\nu}{\partial p_\mu} = \delta^\mu_\nu$$

If $g$ is independent of $x$, $$\begin{eqnarray} \frac{\partial}{\partial x^\mu}\left(g_{\rho \nu} x^\rho x^\nu\right) &=& g_{\rho \nu} \frac{\partial x^\rho}{\partial x^\mu} x^\nu + g_{\rho \nu} x^\rho \frac{\partial x^\nu}{\partial x^\mu} \\ &=& g_{\rho \nu} \delta^\rho_\mu x^\nu + g_{\rho \nu} x^\rho \delta^\nu_\mu \\ &=& g_{\mu \nu} x^\nu + g_{\rho \mu} x^\rho \\ &=& \left(g_{\mu \nu} + g_{\nu \mu}\right) x^\nu \end{eqnarray}$$ If $g$ is symmetric, this simplifies to $2 g_{\mu \nu} x^\nu$, as you said.

Similarly, with $$H = A^{\rho \nu \alpha \beta}(x)\left(p_{\rho} p_{\nu} p_{\alpha} p_{\beta}\right)$$ note that $$H = A^{\left(\rho \nu \alpha \beta\right)}(x)\left(p_{\rho} p_{\nu} p_{\alpha} p_{\beta}\right)$$ where $A^{\left(\rho \nu \alpha \beta\right)}$ is the symmetric part of $A^{\rho \nu \alpha \beta}$, since $p_\rho p_\nu p_\alpha p_\beta$ is symmetric.

Now, $$\begin{eqnarray} \frac{\partial H}{\partial p_\mu} &=& A^{\left(\rho \nu \alpha \beta\right)}(x) \frac{\partial}{\partial p_\mu} \left(p_{\rho} p_{\nu} p_{\alpha} p_{\beta}\right) \\ &=& A^{\left(\mu \nu \alpha \beta\right)}(x) p_{\nu} p_{\alpha} p_{\beta} + A^{\left(\rho \mu \alpha \beta\right)}(x)p_{\rho} p_{\alpha} p_{\beta} + A^{\left(\rho \nu \mu \beta\right)}(x)p_{\rho} p_{\nu} p_{\beta} + A^{\left(\rho \nu \alpha \mu\right)}(x)p_{\rho} p_{\nu} p_{\alpha} \\ &=& A^{\left(\mu \nu \alpha \beta\right)}(x) p_{\nu} p_{\alpha} p_{\beta} + A^{\left(\nu \mu \alpha \beta\right)}(x)p_{\nu} p_{\alpha} p_{\beta} + A^{\left(\alpha \nu \mu \beta\right)}(x)p_{\alpha} p_{\nu} p_{\beta} + A^{\left(\beta \nu \alpha \mu\right)}(x)p_{\beta} p_{\nu} p_{\alpha} \\ &=& \left[A^{\left(\mu \nu \alpha \beta\right)}(x) + A^{\left(\nu \mu \alpha \beta\right)}(x) + A^{\left(\alpha \nu \mu \beta\right)}(x) + A^{\left(\beta \nu \alpha \mu\right)}(x)\right]p_{\nu} p_{\alpha} p_{\beta} \\ &=& 4 A^{\left(\mu \nu \alpha \beta\right)}(x) p_{\nu} p_{\alpha} p_{\beta} \end{eqnarray}$$

• I made edits showing the steps of the first calculation and showed explicitly how the momentum derivative involves the symmetric part of $A$. Feel free to roll either of these changes back if you want. – Brian Moths Mar 16 '17 at 3:27
• What about the case where $A = A(x,p)?$ – user1887919 Mar 16 '17 at 11:47
• Thank you @NowIGetToLearnWhatAHeadIs, those are good edits. – Eric Angle Mar 16 '17 at 13:33
• @user1887919 If $A$ is a function of $x$ and $p$, then there would be an additional term, $\left[ \partial A^{\rho \nu \alpha \beta}(x,p) / \partial p_\mu \right]\left(p_{\rho} p_{\nu} p_{\alpha} p_{\beta}\right)$. – Eric Angle Mar 16 '17 at 13:36
• I should have added more explanation. The easiest way to see it is to start with the original function $H$ where the replacement of $A^{\mu \nu \alpha \beta} \to A^{\left(\mu \nu \alpha \beta\right)}$ is clearly valid. Then you do the math with the symmetrized $A$, and you must get the same answer, since if the derivation works for any tensor, it must work for a symmetric tensor. But now since you can rearrange your indices at will, the line with four $A$'s in square brackets can be simplified to $4A^{(\cdots)}$. – Brian Moths Mar 17 '17 at 1:21

When in the first example you go from $\frac12 g(x,x)$ to $\iota_x g$ you have used the product rule for tensors, i.e. the tensor-analogue of $D(\frac12x^2) = x$ and the symmetry of $g$. You should then expect at least a factor 4 appearing in your second example, since the expression is a tensor-analogue of $p^4\stackrel{D}{\leadsto}4p^3$, assuming that $A$ is totally symmetric. If this is not the case you would still have 4 "cubic" terms, which do not necessarily coincide.

Also, in order to avoid confusion when using the index notation, it is best not to reuse the same index for both a free and a contracted one in the same expression.