# Directional derivative of differentiable function on a line segment

Let the function $$f: U \subseteq \mathbb{R}^n \rightarrow \mathbb{R}$$ be differentiable on open set $$U$$. Let $$x,y \in U$$ be such that the line segment $$[x,y] \subset U$$. Define the function $$g : [0,1]\rightarrow \mathbb{R}$$ as $$g(t):=f(x+t(y-x))$$ Show that for any $$t_* \in [0,1]$$, $$g'(t_*) = \langle \nabla f(x+t_*(y-x)),y-x\rangle$$.

The solution for $$t_*=0$$ is already here Why is any arbitrary directional derivative always recoverable from the gradient?

However, I do not know how to use that trick and generalize it for all points on the line segment?

$$\partial g(t)=\partial[f(x+t(y-x))]=\partial f(x+t(y-x))\partial[x+t(y-x)]\\=\partial f(x+t(y-x))(y-x)=\langle\nabla f(x+t(y-x)),y-x\rangle$$
where $$\partial$$ means "Fréchet derivative of".
• Actually, my first question was not answered which was math.stackexchange.com/questions/2931023/…. In the original question, $f$ was Gateaux differentiable. Could you prove the question posted on the link for me. – Saeed Nov 9 '18 at 0:49