# Covariant derivative of stress-energy tensor for a scalar field [closed]

In order to prove that $$\nabla ^\mu T_{\mu\nu} =0$$ I want to find the covariant derivative of $$T_{\mu\nu} = \partial_\mu\phi \partial_\nu \phi -\frac{1}{2}g_{\mu\nu}(g ^{\lambda\sigma}\partial_\lambda\phi \partial_\sigma \phi +m^2\phi^2)$$

in which I am finding difficult at.

$$T_{\mu\nu} = \partial_\mu\phi \partial_\nu \phi + g _{\mu\nu} (-1/2) (\partial_\nu\phi \partial^\nu \phi +m^2\phi^2)$$
$$\partial^\mu T_{\mu\nu}=\partial_\mu\partial^\mu\phi \partial_\nu \phi+\partial_\mu\phi\partial_\nu\partial^\mu \phi-\frac{1}{2}\partial_\nu(\partial_\tau\phi \partial^\tau \phi +m^2\phi^2)$$ We have equation of motion $\partial_\mu\partial^\mu\phi=m^2\phi$ After substituting equation of motion we will get: $$m^2\phi \partial_\nu \phi+\partial_\mu\phi\partial_\nu\partial^\mu \phi-\frac{1}{2}\partial_\nu(\partial_\tau\phi \partial^\tau \phi)-m^2\phi \partial_\nu \phi$$ but I can substitute $\tau$ on $\mu$ or some another index and rewrite this term in the other form
$-\frac{1}{2}\partial_\nu(\partial_\tau\phi \partial^\tau\phi)=-\frac{1}{2}\partial_\nu(\partial_\tau\phi \partial_\xi\phi g^{\tau\xi})=-\frac{1}{2}g^{\tau\xi}(\partial_\nu\partial_\tau\phi \partial_\xi\phi+\partial_\tau\phi \partial_\nu\partial_\xi\phi)=-g^{\tau\xi}(\partial_\tau\phi \partial_\xi\partial_\nu\phi)=-\partial_\mu\phi\partial_\nu\partial^\mu \phi$
Thus we get the following identity identity $\partial^\mu T_{\mu\nu}=0$.