Introduction
A rectangle can change shape while its diagonal changes length. If both side lengths are changing, the diagonal’s rate depends on both changes, not just on whether the rectangle is getting wider or taller.
The Pythagorean theorem gives a direct relation between the two side lengths and the diagonal. Differentiating that relation with respect to time turns it into a rule for the diagonal’s instantaneous rate. The rule works whether the sides are growing, shrinking, or changing in opposite directions.
Set Up the Geometric Relation
Let \(x(t)\) and \(y(t)\) be the positive side lengths of a rectangle at time \(t\), and let \(d(t)\) be its diagonal length. The diagonal and the two sides form a right triangle. Therefore, at every time when these lengths are defined, the Pythagorean theorem gives
Each length may vary with time. The rate of change of \(x\) is \(\frac{dx}{dt}\), the rate of change of \(y\) is \(\frac{dy}{dt}\), and the rate of change of the diagonal is \(\frac{dd}{dt}\). Rates may be positive or negative: a positive rate means the corresponding length is increasing, and a negative rate means it is decreasing.
Why Differentiating Gives the Rate
The relation \(d^2=x^2+y^2\) holds throughout the motion, not only at the instant of interest. Differentiate both sides with respect to time. Since \(x\), \(y\), and \(d\) depend on \(t\), the chain rule gives
Because \(d>0\), divide by \(2d\) to isolate the diagonal’s rate:
This derivation explains why the side rates contribute in the form shown. The change in \(x^2\) contributes \(2x\frac{dx}{dt}\), while the change in \(y^2\) contributes \(2y\frac{dy}{dt}\). Dividing by \(2d\) converts the resulting change in the squared diagonal into the change in the diagonal itself.
Worked Examples
Worked Example: Both Sides Increase
A rectangle has side lengths \(x=3\) m and \(y=4\) m at a particular instant. At that instant, \(\frac{dx}{dt}=0.2\) m/s and \(\frac{dy}{dt}=0.1\) m/s. Find the rate of change of the diagonal.
First find the diagonal from the side lengths:
Substitute the values and rates into the differentiated relation:
The positive result means the diagonal is increasing. Check it in the differentiated equation: the left side is \(2d\frac{dd}{dt}=2(5)(0.2)=2\). The right side is \(2x\frac{dx}{dt}+2y\frac{dy}{dt}=2(3)(0.2)+2(4)(0.1)=1.2+0.8=2\). Both sides agree.
Worked Example: One Side Shrinks, but the Diagonal Grows
At an instant, a rectangle has sides \(x=6\) ft and \(y=8\) ft. The first side is shrinking at \(0.3\) ft/s, so \(\frac{dx}{dt}=-0.3\) ft/s. The second side is growing at \(0.5\) ft/s, so \(\frac{dy}{dt}=0.5\) ft/s. Find the diagonal’s rate.
Calculate the diagonal:
Use the signed rates in the formula:
Thus the diagonal is increasing at \(0.22\) ft/s, even though one side is shrinking. Check the differentiated relation: \(2d\frac{dd}{dt}=2(10)(0.22)=4.4\). The right side is \(2(6)(-0.3)+2(8)(0.5)=-3.6+8=4.4\), as required.
Worked Example: The Diagonal Shrinks While One Side Grows
At an instant, the sides of a rectangle are \(x=5\) cm and \(y=12\) cm. The first side is growing at \(0.4\) cm/min, while the second is shrinking at \(0.2\) cm/min. Find the diagonal’s rate.
First calculate the diagonal:
The signed rates are \(\frac{dx}{dt}=0.4\) cm/min and \(\frac{dy}{dt}=-0.2\) cm/min. Therefore,
The negative result means the diagonal is shrinking at \(\frac{2}{65}\) cm/min, even though the first side is growing. Check: \(2d\frac{dd}{dt}=2(13)(-\frac{2}{65})=-\frac{4}{5}=-0.8\). The right side is \(2(5)(0.4)+2(12)(-0.2)=4-4.8=-0.8\). The differentiated equation is satisfied.
What Determines the Sign?
The sign of the diagonal’s rate comes from the numerator \(x\frac{dx}{dt}+y\frac{dy}{dt}\), because \(d\) is positive. A positive numerator means the diagonal is increasing; a negative numerator means it is decreasing. If the numerator is zero, the diagonal’s instantaneous rate is zero at that instant, even if one or both sides are changing.
This is a statement about the instantaneous rate, not a guarantee that the diagonal remains constant or continues moving in the same direction. The side rates might change after that instant. The formula uses their values at the instant being considered.
A Common Mistake: Ignoring the Sign of a Shrinking Side
Suppose \(x=6\) ft, \(y=8\) ft, \(\frac{dx}{dt}=-0.3\) ft/s, and \(\frac{dy}{dt}=0.5\) ft/s, as in the second example. A common error is to treat the shrinking side’s rate as positive and calculate
This is incorrect because it replaces the actual rate \(-0.3\) ft/s with \(+0.3\) ft/s. The derivative records direction as well as magnitude. Using the given signed rate gives
The corrected value also satisfies the differentiated Pythagorean relation: \(2(10)(0.22)=4.4=2(6)(-0.3)+2(8)(0.5)\). Keeping the sign of each rate is essential whenever a side may be shrinking.
Why the Relation Is Useful
The diagonal is not an independent quantity: its length is constrained by the two side lengths. Once that geometric constraint is differentiated, knowing the side lengths and their rates at one instant is enough to determine the diagonal’s instantaneous rate. This is useful when a problem gives measurements of the sides but asks how quickly the corner-to-corner distance is changing.
For a reliable calculation, identify the two side lengths and their signed rates at the specified instant, compute the diagonal from the Pythagorean theorem, and then substitute all four values into the rate formula. Keep units consistent: if the lengths are in feet and the rates are in feet per second, the diagonal rate is also in feet per second.
Check Your Understanding
Use the relation between the sides and diagonal, keeping track of signs and units.
- A rectangle has sides \(x=5\) m and \(y=12\) m. At an instant, \(\frac{dx}{dt}=0.3\) m/s and \(\frac{dy}{dt}=0.4\) m/s. What is \(\frac{dd}{dt}\) at that instant?
- If one side is shrinking, why must its rate be entered as a negative number?
- A rectangle has \(x=3\) cm, \(y=4\) cm, \(\frac{dx}{dt}=0.4\) cm/min, and \(\frac{dy}{dt}=-0.3\) cm/min. Is its diagonal increasing, decreasing, or instantaneously stationary?
- What condition allows you to divide by \(2d\) when solving for the diagonal’s rate?
- Explain why the diagonal’s rate can be positive even when one of the side lengths is shrinking.