Introduction
An object moving through a region may experience a changing temperature, pressure, or elevation. To find the instantaneous rate of that change, we need both a description of the field and a description of the object’s motion.
A scalar field assigns one number to each position. A path describes how position changes with time. The gradient records how the field changes with position, while velocity records how position changes with time. Their dot product gives the field’s rate of change along the motion.
Scalar Fields and Motion
For a field in two or three spatial dimensions, write \(f:\mathbb{R}^n\to\mathbb{R}\), where \(n=2\) or \(n=3\). A path is a vector-valued function \(\mathbf{r}(t)\) that gives the object’s position at time \(t\). The value of the field experienced by the moving object is the composite function \(f(\mathbf{r}(t))\).
For example, if \(T(x,y)\) gives temperature at each point in a region and \(\mathbf{r}(t)=(x(t),y(t))\) describes an object’s position, then \(T(\mathbf{r}(t))\) is the temperature experienced by the object over time. The related-rates question asks for the derivative of this quantity with respect to time.
The Gradient–Velocity Formula
The gradient contains the spatial partial derivatives of the field. The path’s velocity gives the rates of change of its spatial coordinates. Combining them by the chain rule gives the desired rate.
In two variables, this says that if \(\mathbf{r}(t)=(x(t),y(t))\), then the rate is \(f_x x'(t)+f_y y'(t)\), with the partial derivatives evaluated at the current position. In three variables, the corresponding sum has three terms. The formula requires differentiability of the field at the position in question and differentiability of the path at the time in question.
Why the Formula Works
The formula follows because a small change in position produces, to first order, a change in the field given by the gradient dotted with that displacement. The path’s velocity is the displacement per unit time in the limit.
At a differentiability point, a small spatial displacement \(\Delta\mathbf{r}\) changes the field by \(\nabla f(\mathbf{r}(t_0))\cdot\Delta\mathbf{r}\), up to an error that is smaller than the displacement.
For a time increment \(h\), differentiability of the path gives \(\mathbf{r}(t_0+h)-\mathbf{r}(t_0)=h\mathbf{r}'(t_0)+o(|h|)\).
Substitute the path displacement into the field approximation and divide by \(h\). As \(h\) tends to zero, the error divided by \(h\) tends to zero, leaving \(\nabla f(\mathbf{r}(t_0))\cdot\mathbf{r}'(t_0)\).
More explicitly, differentiability of \(f\) gives a remainder \(o(\|\Delta\mathbf{r}\|)\), meaning that the remainder divided by \(\|\Delta\mathbf{r}\|\) tends to zero as the displacement tends to zero. Since \(\Delta\mathbf{r}/h\) tends to the finite vector \(\mathbf{r}'(t_0)\), the displacement is \(O(|h|)\). Therefore the remainder divided by \(h\) tends to zero, which justifies the limit and the formula.
Worked Examples
Worked Example: Temperature Along a Moving Path
Suppose the temperature field is \(T(x,y)=100-x^2-2y^2\) degrees Celsius, with \(x\) and \(y\) measured in kilometres. At time \(t=0\), an object is at \((1,2)\) and has velocity \((3,-1)\) kilometres per hour. Find the instantaneous rate of change of temperature.
First find the gradient:
Evaluate it at the object’s position:
Now take the dot product with the velocity:
The temperature is increasing at \(2\) degrees Celsius per hour at that instant. Check by writing the path as \(x(t)=1+3t\), \(y(t)=2-t\). Then
so differentiation gives \(\frac{dT}{dt}=-6(1+3t)+4(2-t)\). At \(t=0\), this is \(-6+8=2\), matching the gradient–velocity calculation.
Worked Example: Pressure in Three Dimensions
Consider a pressure model \(P(x,y,z)=x^2y+3z\), measured in kilopascals, with dimensionless spatial coordinates. At \(t=0\), an object is at \((1,2,0)\) and moves with velocity \((2,-1,3)\) coordinate units per hour. Find the pressure’s instantaneous rate of change.
The gradient is
At the specified position,
Thus
The pressure is increasing at \(16\) kilopascals per hour. To check, the path is \((1+2t,2-t,3t)\), so the pressure along it is \((1+2t)^2(2-t)+9t\). Differentiating the product gives \(4(1+2t)(2-t)-(1+2t)^2+9\). At \(t=0\), the result is \(8-1+9=16\), as required.
Worked Example: Elevation and a Change of Direction
Let \(H(x,y)=x^2+xy+2y^2\) be an elevation model in metres, where the horizontal coordinates are measured in kilometres. At the position \((2,1)\), an object moves with velocity \((-1,2)\) kilometres per hour. Find its instantaneous elevation rate.
Compute the partial derivatives and evaluate them at the position:
The rate is
Although the object moves in the negative \(x\)-direction, its motion in the positive \(y\)-direction contributes more to the elevation change, so the net rate is positive. For a direct check, use \(x(t)=2-t\) and \(y(t)=1+2t\). The derivative of \(H(x(t),y(t))\) at \(t=0\) is \(H_x(2,1)(-1)+H_y(2,1)(2)=-5+12=7\) metres per hour.
Interpreting the Rate and Its Units
The dot product combines the contributions of all coordinate directions. A positive result means the field value is increasing along the motion at that instant; a negative result means it is decreasing. A zero result means there is no instantaneous first-order change along that velocity, though the field may change at later times.
Units provide an important check. If the field is measured in degrees Celsius and position in kilometres, then the gradient is measured in degrees Celsius per kilometre. If velocity is measured in kilometres per hour, the dot product is in degrees Celsius per hour. The velocity should be the actual rate of motion, not merely a direction.
When the velocity is nonzero, let \(\mathbf{u}=\mathbf{r}'(t)/\|\mathbf{r}'(t)\|\) be the unit vector pointing in the direction of travel. The directional derivative in that direction is \(\nabla f\cdot\mathbf{u}\), a rate per unit distance. The rate per unit time is that directional derivative multiplied by the speed \(\|\mathbf{r}'(t)\|\).
A Common Mistake: Using Direction Without Speed
In the temperature example, the velocity is \((3,-1)\), whose speed is \(\sqrt{10}\) kilometres per hour. A common error is to use only the unit direction \((3,-1)/\sqrt{10}\) and report the resulting directional derivative as the rate per hour:
This is a rate of \(2/\sqrt{10}\) degrees Celsius per kilometre, not per hour. It describes change per unit distance in the direction of travel. To obtain the time rate, multiply by the speed:
Alternatively, use the actual velocity directly in the gradient–velocity formula. That method includes direction and speed together and avoids this unit mismatch.
When the Field Also Depends Explicitly on Time
The formula above treats the field as a fixed spatial field. If a quantity also changes independently with time—for example, if the temperature at each location is changing as the day progresses—write it as \(f(x,y,t)\). Along a path \(\mathbf{r}(t)=(x(t),y(t))\), the total rate then includes both the field’s explicit time change and the change caused by motion through space:
Here \(\nabla_{\mathbf{r}}\) means the gradient with respect to the spatial coordinates only. When the field has no explicit time dependence, the partial derivative with respect to time is zero, leaving the gradient–velocity formula used throughout the examples.
Check Your Understanding
For each question, identify the field, position, and velocity before calculating.
- If \(f(x,y)=3x^2+y^2\), a path passes through \((1,2)\) with velocity \((2,-1)\). What is the instantaneous rate of change of \(f\) along the path?
- A field has gradient \((4,-3)\) at a point. What is its rate of change along velocity \((1,2)\)? Interpret the sign.
- Why does a directional derivative along a unit vector generally not equal the time rate of change for a moving object?
- If an object’s instantaneous velocity is the zero vector, what does the gradient–velocity formula say about the field’s instantaneous rate along the path?
- In the temperature example, what units does the gradient have, and why does its dot product with velocity have units per hour?