Directional Derivative
Definition 1. The derivative of $f$ at $P_0 (x_0, y_0)$ in the direction of the unit vector $\mathbb{u} = u_1 \mathbb{i} + u_2 \mathbb{j}$ is the number $$\left( \frac{df}{ds} \right)_{\mathbb{u}, P_0} = \lim_{s \to 0} \frac{f(x_0 + su_1, y_0 + su_2) - f(x_0, y_0)}{s},$$ provided the limit exists. It is also denoted by $$D_{\mathbb{u}}f(P_0) \text{ or } D_{\mathbb{u}}f \big|_{P_0}$$
Chain Rule에 의해 differentiable function $f(x, y)$가 존재할 때, $x = g(t), y = h(t)$로 paramatrize된 곡선을 따라 $t$에 관해 $f$가 변화하는 비율은 $$\frac{df}{dt} = \frac{\partial f}{\partial x} \frac{dx}{dt} + \frac{\partial f}{\partial y} \frac{dy}{dt}$$로 나타낼 수 있었다. 이제 특정 시점 $t_0$를 고정하고, 그 시점에서 곡선의 방향으로의 단위 벡터 $\mathbb{u}$를 찾으면 그 방향으로의 $f$의 변화량을 기술할 수 있고, 그 결과과 위 정의인 directional derivative, 즉 방향 도함수이다. 위 정의에 의하면 partial derivative $\partial_x f, \partial_y f$는 각각 directional derivative의 $x, y$ 성분이다.
Gradient Vector
Definition 2. The gradient vector (or gradient) of $f(x, y)$ is the vector $$\nabla f = \frac{\partial f}{\partial x} \mathbb{i} + \frac{\partial f}{\partial y} \mathbb{j}.$$ The value of the gradient vector obtained by evaluating the partial derivatives at a point $P_0 (x_0, y_0)$ is written $$\nabla f \big|_{P_0} \text{ or } \nabla f(x_0, y_0).$$
Directional derivative를 조금 더 일반적으로 서술해보자. Differentiable function $f(x, y)$에 대해서 우리는 반드시 $x, y$축 방향이 아닌 임의의 방향으로의 $f$의 변화량을 구해야 한다. 우선 $P_0 = (x_0, y_0)$에서 임의의 방향 $\mathbb{u} = \langle u_1, u_2 \rangle$를 기술하는 line을 다음과 같이 서술하자. $$x = x_0 + su_1, \text{ } y = y_0 + su_2 (s \text{ is the arc length parameter})$$ 그러면 Chain Rule에 의해 $$\left( \frac{df}{ds} \right)_{\mathbb{u}, P_0} = \frac{\partial f}{\partial x} \bigg| _{P_0} \frac{dx}{ds} + \frac{\partial f}{\partial y} \bigg| _{P_0} \frac{dy}{ds} \\ = \frac{\partial f}{\partial x} \bigg| _{P_0} u_1 + \frac{\partial f}{\partial y} \bigg| _{P_0} u_2 \\ = \left \langle \frac{\partial f}{\partial x} \bigg| _{P_0}, \frac{\partial f}{\partial y} \bigg| _{P_0} \right \rangle \cdot \langle u_1, u_2 \rangle$$이 성립한다. 마지막 줄의 왼쪽 벡터를 따로 정의한 것이 gradient vector이다. 따라서 directional derivative는 자연스럽게 위 논의에 따라 다음 정리로 구할 수 있다.
Theorem 1
Theorem 1. If $f(x, y)$ is differentiable in an open region containing $P_0 (x_0, y_0)$, then $$\left( \frac{df}{ds} \right)_{\mathbb{u}, P_0} = \nabla f |_{P_0} \cdot \mathbb{u},$$ the dot product of the gradient $\nabla f$ at $P_0$ with the vector $\mathbb{u}$. In brief, $D_{\mathbb{u}}f = \nabla f \cdot \mathbb{u}$.
내적 중 dot product를 생각하면, $$D_{\mathbb{u}}f = \nabla f \cdot \mathbb{u} = |\nabla f| |\mathbb{u}| \cos \theta = |\nabla f| \cos \theta$$이다. 이 결과를 해석하면 다음과 같다.
Remark
1. The closer function $f$ and $\mathbb{u}$ is, the more rapidly $f$ increases. In other words, $f$ increases most rapidly when $\theta = 0$, which means that $\mathbb{u}$ is the direction of $\nabla f$ and decreases most rapidly when $\theta = \pi$, which means that $\mathbb{u}$ is the opposite of $\nabla f$.
2. Any direction $\mathbb{u}$ orthogonal to a gradient $\nabla f \neq 0$ is a direction of zero change in $f$.
3. At every point $(x_0, y_0)$ in the domain of a differentiable function $f(x, y)$, the gradient of $f$ is normal to the level curve through $(x_0, y_0)$. Furthermore, the tangent line of the level curve is $$\nabla f (x_0, y_0) \cdot \langle x-x_0, y-y_0 \rangle = 0.$$
위 Remark를 한 줄로 요약하면 "$\nabla f$는 $f$가 변화할 수 있는 무수히 많은 방향 중에서 가장 빠르게 변화하는 방향으로의 변화율"이다. 방향 $\mathbb{u}$가 얼마나 $\nabla f$와 방향이 일치하는 지에 따라 그 크기가 결정된다는 사실에서 직관적으로 파악할 수 있다.
3번에 대해서 조금 더 이야기해보자. Differentiable function $f(x, y)$가 smooth한 곡선 $\mathbb{r} = \langle g(t), h(t) \rangle$을 따라 constant value $c$, 즉 level curve를 갖는다고 하자. 그러면 $f(g(t), h(t)) = c$이고, chain rule에 의해 계산하면 $$\frac{d}{dt} f(g(t), h(t)) = \frac{d}{dt} (c) \\ = \frac{\partial f}{\partial x} \frac{dg}{dt} + \frac{\partial f}{\partial y} \frac{dh}{dt} = \nabla f \cdot \frac{d \mathbb{r}}{dt} = \nabla f \cdot \mathbb{r}'(t) 0$$이다. 다시 말해, 영벡터가 아닌 $\nabla f$는 level curve에 대하여 항상 수직 방향이다. 산 꼭대기에서 물은 중력에 의해 가장 빠른 방향으로 흘러내린다는 사실을 이 성질을 이용해 설명할 수도 있다. 위 수식을 일반적으로 서술하면 다음과 같다. $$\frac{d}{dt} f(\mathbb{r}(t)) = \nabla f(\mathbb{r}(t)) \cdot \mathbb{r}'(t).$$
Properties
1. $\nabla (cf \pm g) = c \nabla f \pm \nabla g$ for any number $c$
2. $\nabla (fg) = g \nabla f + f \nabla g$
3. $\nabla (\frac{f}{g}) = \frac{g \nabla f - f \nabla g}{g^2}$