Multivariable calculus

Directional derivative of sqrt(x^2 + y^2) at (3, 4)

At (3, 4) the gradient of f(x,y) = sqrt(x^2 + y^2) is (0.6, 0.8), a unit vector pointing straight away from the origin. Dotting with the unit direction (0.352, 0.936) gives 24/25, that is 0.96. For this distance function every directional derivative is a cosine, so it always lies between -1 and 1.

f(x,y)=x2+y2f(x,y) = \sqrt{x^2 + y^2}
Duf(3,4)=2425=0.96D_{\mathbf{u}} f(3,4) = \frac{24}{25} = 0.96

At x = 3, y = 4, in the unit direction (0.352, 0.936).

The gradient of a distance is a unit vector

Write r=x2+y2r = \sqrt{x^2+y^2}. The chain rule on the square root gives xr\frac{x}{r} and yr\frac{y}{r}, so the gradient is the position vector divided by its own length.

f=xr,  yr,f(3,4)=35,45\nabla f = \left\langle \frac{x}{r},\; \frac{y}{r} \right\rangle, \qquad \nabla f(3,4) = \left\langle \frac{3}{5}, \frac{4}{5} \right\rangle

That vector already has length 1, which is the whole character of this function: moving one unit directly away from the origin increases the distance by exactly one unit.

Duf(3,4)=0.6(0.352)+0.8(0.936)=0.2112+0.7488=2425D_{\mathbf{u}} f(3,4) = 0.6(0.352) + 0.8(0.936) = 0.2112 + 0.7488 = \frac{24}{25}

The mistake: normalising the wrong vector

Because the gradient here happens to be a unit vector, some students normalise it again out of habit, or worse, normalise the gradient instead of the direction. The rule is fixed: the direction must be a unit vector, the gradient is whatever it is.

The second trap is at the origin. Both partials involve division by rr, so nothing is defined at (0,0)(0,0); the graph is a cone with a sharp point there, and no directional derivative exists. Every statement on this page is about the point (3,4)(3,4), five units out.

Every answer here is a cosine

Since f=1\lVert \nabla f \rVert = 1 everywhere off the origin, the general formula collapses to a single cosine.

Duf=fcosθ=cosθD_{\mathbf{u}} f = \lVert \nabla f \rVert \cos\theta = \cos\theta
  • 0.96=cosθ0.96 = \cos\theta puts our direction about 16.3 degrees off the outward radial direction
  • The largest value at any point is 1, moving straight away from the origin
  • The smallest is 1-1, moving straight toward it, and 0 means circling at constant radius

The function is not differentiable at the origin, but (3, 4) is five units away from it. The build rebuilds the gradient there by central differences on sqrt(x^2 + y^2) and fails unless the dot product with (0.352, 0.936) is still 0.96.

Frequently asked questions

Why can the answer never exceed 1?

The directional derivative is fcosθ\lVert \nabla f \rVert \cos\theta, and here the gradient has length 1 at every point except the origin. A cosine never exceeds 1, so neither does the rate.

Is (0.352, 0.936) a unit vector?

Yes. It is the 44-117-125 right triangle scaled down, and 0.3522+0.9362=0.123904+0.876096=10.352^2 + 0.936^2 = 0.123904 + 0.876096 = 1 exactly.