# Directional derivative

#### shorty

##### New member
Let f(x,y) = (x-y)/(x+y). find the directions u and the values of $D_{u}f$ (-1/2 , 3/2) for which $D_{u}f$ (-1/2 , 3/2) is largest, and is smallest.

How do i go about that? I did it for when $D_{u}f$ (-1/2 , 3/2) = 1 and got $D_{u}f$ (-1/2 , 3/2) = 1 and got u=j and -i. This was after i equated partials for x and y at the point (-1/2, 3/2) and then substituted that into the formula for directional derivative, letting u = $u_{1}i + u_{2}j$

i assume i can do the same to calculate when $D_{u}f$ (-1/2 , 3/2) = 0 and -2, can i? but i am not sure how to work it for when it is largest and smallest.

Any help will be appreciated.

#### HallsofIvy

##### Well-known member
MHB Math Helper
For a function of two variables, f(x,y), its gradient is $$\nabla f= f_x\vec{i}+ f_y\vec{j}$$. It is also true that a unit vector in a direction that makes angle $$\theta$$ with the x-axis is $$cos(\theta)\vec{i}+ sin(\theta)\vec{j}$$. The directional derivative of f, in the direction of the unit vector $$\vec{u}$$ is $$D_{\vec{u}}f= \nabla f\cdot\vec{u}= f_xcos(\theta)+ f_ysin(\theta)$$.

Now, find the direction in which that is maximum or minimum by taking the derivative with respect to $\theta$ and setting it equal to 0:
$$-f_xsin(\theta)+ f_ycos(\theta)= 0$$.
That is the same as $$\frac{f_y}{f_x}= \frac{sin(\theta)}{cos(\theta)}= tan(\theta)$$. That is, the max and min lie in the direction $$\theta$$ such that $$tan(\theta)= \frac{f_y}{f_x}$$. But, looking at the right triangle having legs $$f_x$$ and $$f_y$$ and so hypotenuse $$\sqrt{f_x^2+ f_y^2}$$. That is, the direction in which the derivative is largest is precisely the direction in which the gradient is pointing. And the direction in which the derivative is least is just the opposite direction. (Of course, $$D_u f= \nabla f\cdot \vec{u}= 0$$ just says the vector $$\vec{v}$$ is perpendicular to the gradient.

Last edited by a moderator: