Multivariable calculus
Directional derivative of ln(x^2 + y^2) at (1, 2)
At (1, 2) the gradient of f(x,y) = ln(x^2 + y^2) is (2/5, 4/5). Dotting with the unit direction (0.8, -0.6) gives -4/25, that is -0.16. The value is negative, so f decreases as you step away from (1, 2) in that direction.
At x = 1, y = 2, in the unit direction (0.8, -0.6).
Log outside, chain rule inside
For the partial is , so the inner derivative sits on top. With that gives over in the slot and over in the slot.
At the denominator is . Dotting with takes one line.
The mistake: dropping the inner derivative
The usual slip is writing , as though of a lump differentiates like . That halves the component here and quarters the component, giving , a positive number where the truth is negative.
A sign check catches it. The gradient always points away from the origin here, because grows with distance, so the sign of the answer is the sign of the direction's component along the outward radial vector . For that component is , pointing inward, so a negative answer is what you should expect. A negative part on its own proves nothing: also tilts downward and gives .
Reading the negative sign
The level curves of are circles centred at the origin, and the gradient is perpendicular to them. The angle between and is about 100.3 degrees, just past the right angle that would give zero.
- Angle under 90 degrees: increases along that direction
- Angle exactly 90 degrees: you are moving along the level circle and the rate is 0
- Angle over 90 degrees, as here: decreases, and the value is negative
The size is small because and the cosine is only about .
The function is defined everywhere except the origin, and (1, 2) is well inside its domain. The build rebuilds the gradient there by central differences on ln(x^2 + y^2) and fails unless the dot product with (0.8, -0.6) is still -0.16.
Frequently asked questions
Does the answer depend on the base of the logarithm?
Yes. This page uses the natural log. For every component and the final answer are divided by , giving about .
What is the fastest rate of decrease at (1, 2)?
It is , in the direction , which points back toward the origin along .