A local maximum of a smooth function $f:M\rightarrow \mathbb{R}$ is a critical point of $f$.
Attempt: Let $p\in M$ be a local maximum of $f$. Let $X_p\in T_pM$. Let $c:(-\epsilon,\epsilon)\rightarrow M$ be curve in $M$ such that $c(0)=X_p$ and $c'(0)=X_p$. Note, $0\in c^{-1}(U)$. Moreover, for any $q\in c^{-1}(U)$, $(f\circ c)(0)=f(p)\geq f(c(q))$ . Therefore $0$ is a local maximum of $f\circ c$ and therefore, $(f\circ c)'(0)=0$. (This is the standard, high school derivative)
Now, let $f_{*,p}: T_pM\rightarrow T_{F(p)}M$ be the differential of $f$ at $p$. Observe that
$f_{*,p}(X_p)=f_{*,p}(c'(0))=(f_p\circ c_0)_*(\frac{d}{dt}|_0)$ by the standard chain rule.
We can easily show that $(f_p\circ c_0)_*(\frac{d}{dt}|_0)=f_{*,p}(X_p)=0$ (linear map).
How can I conclude that the partial derivatives are 0 given a chart $(U,\phi)$ about $p$?