# How do I find the directional derivative?

1. Jul 13, 2008

### mnky9800n

Find the directional derivative of f(x,y)= ln sqrt(x^2+y^2) at (x,y) does not = (0,0) toward the origin

I found the gradient: grad f(x,y)=1/(x^2+y^2)*(xi+yj) but I have no idea what to do after that.

2. Jul 13, 2008

### HallsofIvy

Staff Emeritus
How are you given the direction? The directional derivative of f(x,y) in the direction of the unit vector $\vec{u}$ is $\nabla f\cdot \vec{u}$.

The directional derivative of of f(x,y) in the direction of any vector $\vec{v}$ can be done by finding a unit vector in that direction first: $\vec{v}/|\vec{v}|$ and is $\nabla f\cdot \vec{v}/|\vec{v}|$.

If the direction is at angle $\theta$ with the x-axis (whether the point at which you are finding the derivative is (0,0) or not), then a unit vector in that direction is $cos(\theta)\vec{i}+ sin(\theta)\vec{j}$ and so the directional derivative is
$$\nabla f(x,y)\cdot (cos(\theta)\vec{i}+ sin(\theta)\vec{j})= \frac{\partial f}{\partial x}cos(\theta)+ \frac{\partial f}{\partial y}sin(\theta)$$

Of course, if the angle $\theta$ is with the y-axis, just swap "sine" and "cosine".

3. Jul 13, 2008

### mnky9800n

When re-examining the problem I solved for grad f*u/|u| which gives (xi+yj)/[sqrt(x^2+y^2)]*[1/(x^2+y^2)*(xi+yj)] which when solved gives: (x^2+y^2)^(-1/2) which I believe is the correct answer.