# Proof of equivalence of two ways of calculating directional derivative

I am seeking the connection between two formulas that I saw to compute the directional derivative of function $f$ in the direction of a vector $\vec v$.

One of them is :

$$\nabla_{\vec v} f(\vec x_0) = \lim_{h\to 0} \frac{f(\vec x_0+h\vec v)−f(\vec x_0)}{h}$$

and the other one is

$$\nabla_{\vec v} f(x,y)=\nabla f\cdot \vec v$$

Also, will I have to use a unit vector to compute the directional derivative and the slope?

Thank you and cheers :)

• You say you're looking for a "connection". Do you want a proof (like the one I provide below) or are you looking for intuition? – user137731 Jun 8 '16 at 22:44
• Yeah like ur one but i didn't understand your one – Anas Alaa Jun 8 '16 at 23:11

Let $f: D\subseteq \Bbb R^n \to \Bbb R$ be differentiable. Then

\begin{align}\require{cancel}\nabla_{\vec v} f(\vec x_0) &= \lim_{h\to 0} \frac{f(\vec x_0 + h\vec v)-f(\vec x_0)}{h} \\ &= \lim_{h\to 0} \frac{\left(\color{red}{\cancel {\color{black}{f(\vec x_0)}}}+\nabla f(\vec x_0)\cdot (h\vec v) + o(h)\right) - \color{red}{\cancel {\color{black}{f(\vec x_0)}}}}{h} \\ &= \lim_{h\to 0} \frac{\color{red}{\cancel {\color{black}{h}}}\left[\nabla f(\vec x_0)\cdot (\vec v)\right]}{\color{red}{\cancel {\color{black}{h}}}} + \cancelto{0}{\lim_{h\to 0}\frac{o(h)}{h}} \\ &= \nabla f(\vec x_0) \cdot \vec v\end{align}

You don't have to use a unit vector to calculate the directional derivative, but the dd will only correspond to the geometric idea of slope if you use a unit vector $\vec v$.

Edit: I assume that you are familiar with Taylor's theorem. Recall that the first order Taylor expansion of a function $g: \Bbb R\to \Bbb R$ around $a$ is

$$g(a+h) = g(a) + g'(a)h + o(h)$$

Here $o(h)$ is a stand-in for the remainder function $g(a+h)-g(a)-g'(a)h$. This notation (called little oh notation) tells us that the remainder has the property $$\lim_{h\to 0}\frac{g(a+h)-g(a)-g'(a)h}{h} = 0.$$

For functions of a vector variable, there's a similar Taylor expansion:

$$f(\vec a + \vec h) = f(\vec a) + \nabla f(\vec a)\cdot \vec h + o(\|\vec h\|)$$

So what I'm doing above is replacing $f(\vec x_0 + h\vec v)$ with its first order Taylor expansion. Then two terms cancel, one tends to zero, and we're left with the identity you're looking for.

• where does $∇f(x⃗ 0) ⋅(hv⃗ )$ come and what is $o(h)$ – Anas Alaa Jun 7 '16 at 14:40
• I am sorry , I am beginner , so i want more simple explaination if you can pelase – Anas Alaa Jun 7 '16 at 14:41