Suppose $X = X(t,p)$ is a time dependent vector field on a Riemannian manifold $(M,g)$. How would one compute $\frac{d}{dt}g\big(X, X)?$ I know that the answer should be $2g\big(\frac{\partial}{\partial t}X,X\big)$ and uses the often used identity from basic calculus $$\frac{d}{dt} |f(t)|^2 = 2|f(t)| f'(t)$$ but I'm having some trouble filling in the details.
One way I thought to do this is to use local coordinates so that $$X = \sum_ia^i(t,p)\frac{\partial}{\partial x_i}$$ and so the time derivative amounts to taking the time derivative of the coefficient functions $a^i$.
Is there a coordinate free way of showing this? More generally, how do you take the (coordinate free) time derivative of a time dependent vector field?
Your identity from basic calculus is wrong. It should be $2\langle f(t),f’(t)\rangle$ assuming the norm comes from an inner product. The answer in your case is literally a direct application of this result.
Fix a point $p\in M$, and define $\psi(t)=X(t,p)$ and $f(t)=g_p(\psi(t),\psi(t))$. Note that $g_p$ is the inner product on the single vector space $T_pM$, and $\psi$ is a curve taking values in the single vector space $T_pM$, and $f$ is a composition of such maps. We’re working in a single vector space only so you can call $V=T_pM$ and forget about the manifold $M$ completely. Then, the product rule from elementary calculus (which generalizes immediately to the vector space level) now tells us \begin{align} f’(t)&=g_p(\psi’(t),\psi(t))+g_p(\psi(t),\psi’(t))=2g_p(\psi’(t),\psi(t)). \end{align} Hence, $\frac{\partial}{\partial t}\left(g(X,X)\right)=g\left(\frac{\partial X}{\partial t},X\right)$.
Note, this situation shouldn’t be confused with a more difficult one, which is when you have a curve $\psi:I\to TM$ in the tangent bundle itself rather than a single vector space. In this case, if we set $f(t)=g(\psi(t),\psi(t))$, then we’d have to use the Levi-Civita connection (well technically, we’d have to induce it on the pullback bundle $\gamma^*(TM)$ where $\gamma=\pi\circ\psi:I\to M$ is the base curve) to get \begin{align} f’(t)&=2g(\nabla_t\psi,\psi(t)), \end{align} where $\nabla_t\psi\equiv D_t\psi\equiv\frac{D\psi}{dt}\equiv\frac{\nabla\psi}{dt}$ (these are all common notations for it) is the covariant derivative of $\psi$ along $\gamma$ ($\psi$ can be thought of as a section of the pullback bundle $\gamma^*(TM)$). See Lee or Spivak for more details about this technicality. But essentially, this comes from the Leibniz rule and metric compatibility: for any vector fields $X,Y,Z$ on $M$, we have \begin{align} \nabla_{X}\bigg(g(Y,Z)\bigg)&= g(\nabla_XY,Z)+g(Y,\nabla_XZ). \end{align}