My question is very much related to this other question: Gradient on product manifold
Let $(M_1, g_1) \times (M_2, g_2)$ be a product manifold and let $f : M_1 \times M_2 \rightarrow \mathbb{R}$ be a function defined as $f(x,y) = h_1(x) h_2(y)$ where $h_i : M_i \rightarrow \mathbb{R}$.
Is it true that $df_{(x,y)}(V, W) = d(h_1)_x (V) h_2(y) + h_1(x) d(h_2)_y (W)$ for any two vectors $(V, W) \in T_x M_1 \times T_y M_2$?
How does this relate to the case of $M_1 = M_2 = \mathbb{R}$ with the standard metric, where $\nabla f = (h_1'(x)h_2(y), h_1(x) h'_2(y))$?
Thank you very much for your help!
So I think I figured out the answer. From the definition of $\nabla f$ as the unique vector field such that $g(\nabla f(x,y), W) = df_{(x,y)}(W)$ for any $W \in T_{(x,y)} M_1 \times M_2$ we know that, writing $W = (U, V)$ for some $U \in T_x M_1$ and $V \in T_y M_2$ then
$g(\nabla f(x,y), W) = df_{(x,y)}(W) = d(h_1)_x(U)h_2(y) + h_1(x)d(h_2)_y(V) = g_1(\nabla h_1(x), U)h_2(y) + h_1(x)g_2(\nabla h_2(y), V) = g((h_2(y)\nabla h_1(x), h_1(x)\nabla h_2(y)), (U, V))$
and so $\nabla f(x,y) = (h_2(y)\nabla h_1(x), h_1(x)\nabla h_2(y))$