Can someone please check my working, as I am new to Einstein notation:
\begin{align*} \partial^\mu x^2 &= \partial^\mu(x_\nu x^\nu) \\ &= x^a\partial^\mu x_a + x_b\partial^\mu x^b \ \ \text{(by product rule and relabelling indices)} \\ &=x^a\delta_\mu^a + x_b\delta_\mu^b \\ &=2x_\mu. \end{align*} I'm not sure is the expression in the second term of the second line is correct, as the partial is with respect to the covariant vector but the argument is a contravariant vector.