Taking a derivative involving Einstein summation

Suppose I have something like $f = g_{\mu \nu} x^{\mu} x^{\nu}$, where the Einstein summation convention is implied. Now suppose I want to to take the derivative $\partial_{\mu}f = \frac{\partial f}{\partial x^{\mu}}$. How would I go about doing this? I figure it's not just going to be $\partial_{\mu} f = g_{\mu \nu} x^{\nu}$.

-

Use the product rule: \begin{align*} \partial_\lambda(g_{\mu\nu} x^\mu x^\nu) &= g_{\mu\nu,\lambda} x^\mu x^\nu + g_{\mu\nu} x^\mu_{,\lambda} x^\nu + g_{\mu\nu} x^\mu x^\nu_{,\lambda} \\&= g_{\mu\nu,\lambda} x^\mu x^\nu + g_{\mu\nu} \delta^\mu_\lambda x^\nu + g_{\mu\nu} x^\mu \delta^\nu_\lambda \\&= g_{\mu\nu,\lambda} x^\mu x^\nu + g_{\lambda\nu} x^\nu + g_{\mu\lambda} x^\mu \\&= g_{\mu\nu,\lambda} x^\mu x^\nu + 2 g_{\lambda\nu} x^\nu \end{align*} where I've used the convention $T^{\mu...}_{\nu...,\lambda} \equiv \partial_\lambda T^{\mu...}_{\nu...}$, the fact that $x^\mu_{,\lambda}=\delta^\mu_\lambda$ and the symmetry of $g_{\mu\nu}$.

-

This is a little expansion on the accepted answer. The Einstein summation convention works because summation commutes with all linear operators including other summations because of distributivity. Therefore it does not matter where you put the summation sign as long as its scope includes all the occurrences of the summed index and you can do all calculations as if the summations were not there. You just need a way to keep track what is being summed over. This avoids a lot of trivial steps that just move summations within expressions. So you can proceed with differentiation as if the summation was not there. There is one subtlety though and it comes up in your question: contraction effectively binds and hides variables being contracted like quantifiers do in logic and $\lambda$ does in the $\lambda$-calculus and as do most indexed operators like $\sum_i$, $\prod_i$, $\bigcup_i$ and $\bigcap_i$. This means that if you define $f = g_{\mu\nu} x^\mu x^\nu$ then it is somewhat misleading to use $\mu$ again in $\partial_\mu f$ since the $\mu$ in the definition of $f$ is really bound so the index in the differentiation should be fresh. That is why you should write $\partial_\lambda f = \partial_\lambda (g_{\mu\nu} x^\mu x^\nu)$ and then proceed with ordinary algebraic manipulation as in Christoph's answer.

-

Assuming that $g_{\mu \nu}$ is the Minkowski metric. One can say that

$\partial_{\mu}x^{\alpha} = \frac{\partial x^{\alpha}}{\partial x^{\mu}} =\delta_{\mu}^{\alpha}$

Therefore $\partial_{\mu} f = 2 g_{\mu \nu} x^{\nu}$

If $g_{\mu \nu}$ is not a constant there is another term containing derivative of $g_{\mu \nu}$.

-
you're missing a factor of 2 – Christoph Oct 6 '12 at 12:59
yes I noticed it – Prathyush Oct 6 '12 at 13:00