Multivariable calculus

Directional derivative of x/y at (2, 1)

At (2, 1) the gradient of f(x,y) = x/y is (1, -2). Dotting with the unit direction (0.96, 0.28) gives 2/5, that is 0.4. The x partial treats 1/y as a constant multiplier, while the y partial needs the power rule on y to the power -1, which is where the minus sign comes from.

f(x,y)=xyf(x,y) = \frac{x}{y}
Duf(2,1)=25=0.4D_{\mathbf{u}} f(2,1) = \frac{2}{5} = 0.4

At x = 2, y = 1, in the unit direction (0.96, 0.28).

No quotient rule needed

For the xx partial, 1/y1/y is just a constant, so the derivative is 1/y1/y. For the yy partial, rewrite the function as xy1x\,y^{-1} and use the power rule with xx held fixed.

y(xy1)=xy2=xy2\frac{\partial}{\partial y}\left(x\,y^{-1}\right) = -x\,y^{-2} = -\frac{x}{y^2}

At (2,1)(2,1) those give 11 and 2-2. Dot with the unit direction u=0.96,0.28\mathbf{u} = \langle 0.96, 0.28 \rangle, which is the 24-7-25 triple in unit form.

Duf(2,1)=1(0.96)+(2)(0.28)=0.960.56=25D_{\mathbf{u}} f(2,1) = 1(0.96) + (-2)(0.28) = 0.96 - 0.56 = \frac{2}{5}

The mistake: the sign and the square on the y partial

Three wrong versions show up again and again, and each one changes the final answer.

  • fy=xy2\frac{\partial f}{\partial y} = \frac{x}{y^2}, sign dropped, which turns the answer into 1.521.52
  • fy=1y2\frac{\partial f}{\partial y} = -\frac{1}{y^2}, the xx dropped, which gives 0.680.68
  • fy=1y\frac{\partial f}{\partial y} = \frac{1}{y}, differentiating the wrong variable, which gives 1.241.24

The sign is easy to confirm without algebra. Increase yy while holding x=2x = 2 and the fraction 2/y2/y gets smaller, so fy\frac{\partial f}{\partial y} has to be negative.

Why 0.4 is small compared with the gradient

The gradient has length 1,2=52.236\lVert \langle 1, -2 \rangle \rVert = \sqrt{5} \approx 2.236, but our answer is only 0.4. The direction is about 79.7 degrees from the gradient, close to the 90 degrees that would give nothing at all.

That is the tension in this direction: it increases xx, which pushes the quotient up, and it increases yy, which pulls it down. The two effects nearly cancel, and 0.4 is what survives.

Duf(2,1)=5cosθ,cosθ0.1789D_{\mathbf{u}} f(2,1) = \sqrt{5}\,\cos\theta, \qquad \cos\theta \approx 0.1789

The quotient is undefined on the line y = 0, and (2, 1) is one unit clear of it. The build rebuilds the gradient there by central differences on x/y and fails unless the dot product with (0.96, 0.28) is still 0.4.

Frequently asked questions

Which unit direction gives zero change at (2, 1)?

Any direction perpendicular to 1,2\langle 1, -2 \rangle, so 2,1/50.894,0.447\langle 2, 1 \rangle / \sqrt{5} \approx \langle 0.894, 0.447 \rangle or its opposite. Along those, xx and yy scale together and the quotient holds steady.

Does this work near y = 0?

No. Both the function and its partials blow up as yy approaches 0, so a directional derivative there does not exist. Every claim on this page is local to (2,1)(2,1).