Mathwizurd.com is created by David Witten, a mathematics and computer science student at Stanford University. For more information, see the "About" page.

Directional Derivatives

Single-Variable Calculus Derivative

MathJax TeX Test Page Recall that the definition of a single-variable calculus derivative is this $$\lim_{h \to 0} \dfrac{f(x + h) - f(x)}{h} = f'(x)$$ What does this mean? When you move a very very small amount in the x-direction, what is the slope? As this increment gets smaller and smaller, you get the slope at that point.

Directional Derivative

MathJax TeX Test Page The directional derivative at p in the direction v equals $$D_vf(p) = \lim_{t \to 0} \dfrac{f(p + tv) - f(p)}{t}$$ The magnitude of the vector has to be 1, otherwise we would get different answers in the same direction, which is undesirable.

Understanding this

MathJax TeX Test Page Relating it back to $\mathbb{R}$, we get $$\lim_{t \to 0} \dfrac{f(p + t*1) - f(p)}{t}$$ More generally, imagine you're moving in the direction $<1,1>$.What is the slope in that specific direction? That is the directional derivative.

Partial Derivative

MathJax TeX Test Page The partial derivative is a special case of the directional derivative. These are just directional derivatives in the direction of the basis vectors. They are written like this $$\dfrac{\partial f}{\partial x_n}(p) = D_{e_n}f(p)$$ These are easy to calculate. Take this for example $\dfrac{\partial f}{\partial x} x^2y + y^2x$. In this example, you could plug it into the directional derivative equation, which would be $$\lim_{t \to 0}\dfrac{(x+t)^2y + y^2(x+t) - x^2y - y^2x}{t} = \dfrac{x^2y - x^2y + 2txy + t^2y + xy^2 - xy^2 + ty^2}{t}$$ $$=\lim_{t \to 0}2xy + y^2 + ty = \boxed{2xy + y^2}$$ That was annoying. Now, how you would actually do it is consider y as a constant. For this example, we can rename $y$ to $c$ to make it clearer and do a normal derivative. $$\dfrac{d}{dx}x^2c + c^2x = 2xc + c^2 = 2xy + y^2$$

Computing Directional Derivatives

MathJax TeX Test Page It turns out that we have this equation: $$D_vf(p) = Df(p)(v)$$ In other words, the directional derivative in the direction of v equals the total derivative at p of the vector. Therefore, we have an easy way of calculating this. $$D_vf(p) = Df(p)(v) = \begin{bmatrix}\dfrac{\partial f}{\partial x_1}(p) & \dfrac{\partial f}{\partial x_2}(p) & ... & \dfrac{\partial f}{\partial x_n}(p)\end{bmatrix}\begin{bmatrix}v_1 \\ v_2 \\ ... \\ v_n\end{bmatrix}$$ $$= \dfrac{\partial f}{\partial x_1}(p) * v_1 + \dfrac{\partial f}{\partial x_2}(p) * v_2 + ... + \dfrac{\partial f}{\partial x_n}(p) * v_n$$ Because partial derivatives are fairly easy to calculate, this means you don't have to use the limit definition whenever you want to find a directional derivative.

Examples: Partial Derivatives

MathJax TeX Test Page $$\frac{\partial}{\partial x} e^{x^2 + cos(xy)}$$

Examples: Directional Derivatives

MathJax TeX Test Page $$f(x,y) = x^2 - 5xy \text{ in the direction of } <3, 4>$$


David Witten

Multivariable Derivative

Converting Between Coordinate Systems