For my physics research course I am supposed to get the equation of motion from a given action $S$:
$$ S = \frac{-1}{2} \int d^4x \sqrt{-g} (g^{\mu\nu} \frac{\partial \phi}{\partial x^\mu} \frac{\partial \phi}{\partial x^\nu} - m^2\phi^2).\tag{1} $$
I take the variations according to the following rules:
$$ \phi \rightarrow \phi + \delta \phi $$ $$ \partial_\mu \phi \rightarrow \partial_\mu \phi + \delta(\partial_\mu \phi) = \partial_\mu \phi + \partial_\mu (\delta \phi). $$
And I find that the solution is:
$$ \frac{\delta S}{\delta \phi} = -g^{\mu\nu} \partial_\mu (\frac{\partial\mathcal{L}}{\partial(\partial_\mu \phi)}) -g^{\mu\nu} \partial_\nu (\frac{\partial\mathcal{L}}{\partial(\partial_\nu\phi)}) - 2m^2 \frac{\partial\mathcal{L}}{\partial\phi} = 0. $$
But my professor said the solution has also need to contain metric. How can I get to right solution? I'm an undergrad student trying to improve myself in theory bu this is kinda hard for me.