Prove that the directional derivative of a composition exists. Let $E \subseteq \mathbb{R}^{n}$ and $D \subseteq \mathbb{R}^{m}$ be two open sets, and let $f : E \rightarrow \mathbb{R}^{m}$ and $g : D \rightarrow \mathbb{R}^{k}$
be functions such that $f(E) \subseteq D$. Suppose that $g$ is differentiable at $f(x)$ for some $x \in E$, and
that for some $v \in \mathbb{R}^{n}$ with $\vert \vert v
\vert\vert= 1$ the directional derivative $D_{v}f(x)$ exists. Show that the
directional derivative $D_{v}(g \circ f)(x)$ exists and give a formula to compute it.
I tried to begin by applying the definition of differentiability for $g$, but I'm not sure how to do that with $f(x)$. I am also not sure what exactly I am supposed to prove, i.e, what does "show that the
directional derivative $D_{v}(g \circ f)(x)$ exists" require? Would greatly appreciate any help!
 A: @mathscounterexamples.net I am just wondering what the necessity is of formulating f(x+tv) in the way you did it. Would it also be sufficient to structure the proof in the following way.
By definition of partial derivative and the mean value theorem we find that
$$D_{v}(g \circ f)(x) = \lim_{t\to 0}\frac{g(f(x+tv))-g(f(x))}{t} = \lim_{t\to 0}g'(z_{t})\frac{f(x+tv)-f(x)}{t}$$
Where $z_{t}$ is on the line segment between f(x) and f(x+tv). Notice that $\lim_{t \to 0} g'(z_{t}) = g'(f(x)$ due to continuity of f and g' and $ D_{v}f(x) := \lim_{t \to 0}[f(x+tv) - f(x)]/t$. Thus, we find that
$$ D_{v}(g \circ f)(x) = g'(f(x))D_{v}f(x), where ||v|| = 1$$
Note that this directional derivative should exist given the assumptions mentioned in the question.
In this prove, we hence do not need the sophisticated understanding of f(x+tv). I am, however, not sure whether this proof is entirely correct... Any tips would be welcome! :)
A: A multivariable function $\phi$ is differentiable at $y$ with  derivative $D\phi(y)$ (which is a linear map) iff
$$\phi(y + h) = \phi(y) + D\phi(y)(h) + \lVert h \rVert r_\phi(h)\tag{1} $$
with a function $r_\phi$ such that $\lim_{h \to 0} r_\phi(h) = 0$.
Similarly $f$ has directional derivative $D_vf(x)$ (which is a vector) at $x$ iff
$$f(x+tv) = f(x) + tD_vf(x) + t s_f(t) \tag{2}$$
with a function $s_f$ such that $\lim_{t \to 0} s_f(t) = 0$.
Taking $\phi = g$, $y = f(x)$ and $h = tD_vf(x) + ts_f(t)$ we get
$$g(f(x+tv)) = g(f(x)) + Dg(f(x))(tD_vf(x) + ts_f(t)) + \lVert tD_vf(x) + ts_f(t) \rVert r_g(tD_vf(x) + ts_f(t)) \\
g(f(x)) + tDg(f(x))(D_vf(x)) + tDg(f(x))(s_f(t)) + \lvert t \rvert \lVert D_vf(x) + s_f(t) \rVert r_g(tD_vf(x) + ts_f(t)) \\
g(f(x)) + tDg(f(x))(D_vf(x)) + t(Dg(f(x))(s_f(t)) +  \operatorname{sign} t \lVert D_vf(x) + s_f(t) \rVert r_g(tD_vf(x) + ts_f(t))
.$$
The function
$$\rho(t) = Dg(f(x))(s_f(t)) +  \operatorname{sign} t \lVert D_vf(x) + s_f(t) \rVert r_g(tD_vf(x) + ts_f(t))$$
has the property $\lim_{t \to 0} \rho(t) = 0$. Thus $g \circ f$ has directional derivative $Dg(f(x))(D_vf(x))$ at $x$.
