# Differentiation of tensors in lagrangian formalism: two questions

I think I have this right, but I have no way to check it and would appreciate a second opinion.

I want to calculate the following:

$$\frac{\partial}{\partial\rho_\nu}\left[\left(\partial_\mu\rho_\nu-\partial_\nu\rho_\mu\right)\left(\rho^\nu-\rho^\mu\right)\right] = \frac{\partial}{\partial\rho_\nu}\left(\partial_\mu\rho_\nu\rho^\nu-\partial_\mu\rho_\nu\rho^\mu-\partial_\nu\rho_\mu\rho^\nu+\partial_\nu\rho_\mu\rho^\mu \right)$$

We work with lagrangian formalism, so $$\rho_\nu$$ and $$\partial_\mu\rho_\nu$$ are independent.

Question 1: Terms 1, 4 and terms 2, 3 of this last expression are not equal, right? We can set the repeated indices to whatever we want, but not the free ones, so $$\partial_\mu\rho_\nu\rho^\nu\neq\partial_\nu\rho_\mu\rho^\mu$$

Question 2: The derivation of the first term should go like the following:

$$\frac{\partial}{\partial\rho_\nu}(\partial_\mu\rho_\nu\rho^\nu)= \partial_\mu\rho_\nu\frac{\partial\rho^\nu}{\partial\rho_\nu}=\partial_\mu\rho_\nu\eta^{\nu\kappa}\frac{\partial\rho_\kappa}{\partial\rho_\nu}=\partial_\mu\rho^\kappa\delta_{\kappa\nu}=\partial_\mu\rho^\nu$$

I'm fairly sure this is correct so far. On to the second term, we have

$$\frac{\partial}{\partial\rho_\nu}(\partial_\mu\rho_\nu\rho^\mu)= \partial_\mu\rho_\nu\frac{\partial\rho^\mu}{\partial\rho_\nu}=\partial_\mu\rho_\nu\eta^{\mu\kappa}\frac{\partial\rho_\kappa}{\partial\rho_\nu}=\partial_\mu\rho_\nu\eta^{\mu\kappa}\delta_{\kappa\nu}=\partial_\mu\rho_\nu\eta^{\mu\nu}=\partial_\mu\rho^\mu$$ This calculation is a bit more involved, and I am unsure whether it's correct. I would like a correction if I missed something.

Provided the two above are correct, the rest should follow in the same fashion, so we don't need to go through the whole calculation.

• Comment to the post (v1): The indices in eq. (1) are not compatible with the standard Einstein notation. Consider to write summations explicitly to make the post understandable for the reader. Commented Oct 31, 2021 at 11:18
• That's true, and it was misinterpretation on my part. Following JulianDeV's answer, it's true that the first derivative should have a different index, eg $\frac{\partial}{\partial\rho_\sigma}$. Thanks for the input! Commented Oct 31, 2021 at 11:22

Yes, you are correct that they are not the same. In general, be careful though because this might change the structure of whatever is on the LHS of the equation. Because with what you're writing, you change the object $$A_\mu \to A_\nu$$. However, the total expression is actually $$\frac{\partial}{\partial \rho_\nu} \partial_\mu \rho_\nu \rho^\nu$$ which is a total contraction of all Lorentz indices resulting in a scalar. So regarding this term, you are able to switch $$\mu \leftrightarrow \nu$$ without concern.
Your derivation is almost correct, there is a small subtlety. You should remember that a lower index in the denominator translates to an upper index, so you could set $$B^\mu = \frac{\partial}{\partial \rho_\mu}$$ as an operator. From this, the derivative should actually be $$\delta^\nu_\kappa$$. Now in your last step, the Kronecker-delta leaves the upper index unchanged because else you end up with $$\partial_\mu \rho_\nu$$ which has not the correct index structure when comparing with the LHS. The same can be said about your other derivation.
However, I am a bit concerned about your first expression since some terms have 3 $$\nu$$-indices? I would think the derivative should be $$\frac{\partial}{\partial \rho_\sigma}$$ or something.
• First off, your last comment was invaluable! My mindset was wrong from the start. Your answer to the second question helps a lot as well, but I still have a question about the first answer. How is it a total contraction since the upper and lower indices are different? If we use $\sigma$ instead of $\nu$ in the derivative, we have $B^\sigma\partial_\mu\rho_\nu\rho^\nu$, which isn't a total contraction unless I am missing something else. Commented Oct 31, 2021 at 11:14
• Indeed, then it's different. But I was looking at it from the terms you wrote down, so without regarding the last comment I made. I also just edited a small mistake I made. The Kronecker-delta leaves the position of the index unchanged, so $\rho^\kappa \delta_\kappa^\nu = \rho^\nu$. You would probably have $\rho^\kappa \delta_{\kappa \nu} = \rho^\kappa \delta_\kappa^\sigma \eta_{\sigma \nu} = \rho^\sigma \eta_{\sigma \nu} = \rho_\nu$. Commented Oct 31, 2021 at 11:18