Find directional derivative in (0,0,0) Hi i have a problem with finding $g'_{w}$in $(0,0,0)$ where $w=[2,1,1] $of $g(x,y,z)=f(e^{-x}+y,e^{y}-z,e^{-z}-x) $ where $f$ is differentiable and its gradient in $(0,0,0) $ is $[1,2,3]$ and in $(1,1,1) $ it is $[-1,-2,-3]$  so $g'_{w}=<grad(g),w>$ according to it i only need to find $grad(g)$ in $(0,0,0)$. $g(0,0,0)=f(1,1,1)$ as we know $grad (g)=(g'_{x},g'_{y},g'_{z})$ So $grad (g)$ in $(0,0,0) $ is $grad (f)$ in $(1,1,1)$? I am not certain of it as i am not sure whether $g$ is differentiable in (0,0,0)
 A: I can tell you that $g$ is differentiable at $(0,0,0)$, but your approach is somewhat broken.
What you basically uses is the chain rule, but your approach you seem to have forgotten to differentiate the inner function. To make it clearer you could set
$$h(x,y,z) = (e^{-x}+y, e^y-z, e^{-z}-x)$$
Then $g(x,y,z) = f(h(x,y,z))$, the chain rule says that $g' = f'(h)\cdot h'$. Now
$$h' = \begin{pmatrix}-e^{-x} & 1 & 0 \\
0 & e^y & -1 \\
-1 & 0 & -e^{-z}
\end{pmatrix}$$
that is the rows are the gradients of each component of $h$. Especially at zero we have:
$$h'(0,0,0) = \begin{pmatrix}-1 & 1 & 0 \\
0 & 1 & -1 \\
-1 & 0 & -1
\end{pmatrix}$$
And we know that $h(0,0,0)=(1,1,1)$ so $g'(h(0,0,0)) = g'(1,1,1) = (-1, -2, -3)$ so the gradient of $f$ at zero becomes
$$f'(0,0,0) = \begin{pmatrix}-1 -2 -3\end{pmatrix} \begin{pmatrix}
-1 & 1 & 0 \\
0 & 1 & -1 \\
-1 & 0 & -1 
\end{pmatrix} = \begin{pmatrix}4 & -3 & 5\end{pmatrix}$$
You could also use the more direct approach and consider the function $\phi(t) = g(wt) = f(h(wt))$ at $t=0$:
$$\phi(t) = f(e^{-2t}+t, e^t-t,e^{-t}-2t)$$
Now the inner derivate is $(-2e^{-2t}+1, e^t-1, -e^{-t}-2)$ that is $(-1, 0, -3)$ at $t=0$ so the derivate of $\phi$ is $f'_{(-1,0,1)} = \nabla f(0)\cdot(-1, 0, -3) = (-1, -2, -3)\cdot(-1, 0, -3) = 10$
