Tutorials › Calculus I › The Changing Diagonal of a Rectangle

Related Rates Problems · Tutorial 665 of 1495

The Changing Diagonal of a Rectangle

Learn to derive the diagonal’s rate from the side-length rates and evaluate whether it is increasing or decreasing at a specified instant.

Intermediate 9 min read

What You'll Learn

  • Set up the Pythagorean relation between a rectangle’s sides and diagonal
  • Differentiate the relation with respect to time using the chain rule
  • Calculate the diagonal’s instantaneous rate from side lengths and their rates
  • Interpret positive and negative rates, including when one side is shrinking
  • Check a calculated rate by substituting it into the differentiated relation

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

$$ d(t)^2=x(t)^2+y(t)^2. $$

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.

Key formula: For a rectangle with positive side lengths \(x\) and \(y\), diagonal \(d=\sqrt{x^2+y^2}\), and side-length rates \(\frac{dx}{dt}\) and \(\frac{dy}{dt}\), the diagonal’s instantaneous rate is $$ \frac{dd}{dt} = \frac{x\frac{dx}{dt}+y\frac{dy}{dt}}{d}. $$ All lengths and rates in this formula are evaluated at the same instant. The formula applies when \(d>0\), as it is for a nondegenerate rectangle.

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

$$ 2d\frac{dd}{dt} = 2x\frac{dx}{dt} + 2y\frac{dy}{dt}. $$

Because \(d>0\), divide by \(2d\) to isolate the diagonal’s rate:

$$ \frac{dd}{dt} = \frac{x\frac{dx}{dt}+y\frac{dy}{dt}}{d}. $$

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.

Important: The formula combines the two side contributions before dividing by \(d\). If one side is shrinking, its negative rate must be included with its sign. Taking absolute values of the side rates would generally give the wrong diagonal rate.

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:

$$ d=\sqrt{x^2+y^2} =\sqrt{3^2+4^2} =\sqrt{9+16} =5\text{ m}. $$

Substitute the values and rates into the differentiated relation:

$$ \begin{aligned} \frac{dd}{dt} &= \frac{x\frac{dx}{dt}+y\frac{dy}{dt}}{d}\\ &= \frac{(3)(0.2)+(4)(0.1)}{5}\\ &= \frac{0.6+0.4}{5}\\ &= \frac{1.0}{5}\\ &=0.2\text{ m/s}. \end{aligned} $$

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:

$$ d=\sqrt{6^2+8^2} =\sqrt{36+64} =10\text{ ft}. $$

Use the signed rates in the formula:

$$ \begin{aligned} \frac{dd}{dt} &= \frac{(6)(-0.3)+(8)(0.5)}{10}\\ &= \frac{-1.8+4}{10}\\ &= \frac{2.2}{10}\\ &=0.22\text{ ft/s}. \end{aligned} $$

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:

$$ d=\sqrt{5^2+12^2} =\sqrt{25+144} =13\text{ cm}. $$

The signed rates are \(\frac{dx}{dt}=0.4\) cm/min and \(\frac{dy}{dt}=-0.2\) cm/min. Therefore,

$$ \begin{aligned} \frac{dd}{dt} &= \frac{(5)(0.4)+(12)(-0.2)}{13}\\ &= \frac{2-2.4}{13}\\ &= -\frac{0.4}{13}\\ &= -\frac{2}{65}\text{ cm/min}. \end{aligned} $$

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.

Interpretation: Each side’s contribution is weighted by that side’s current length. The combined quantity \(x\frac{dx}{dt}+y\frac{dy}{dt}\) determines the direction and size of the diagonal’s instantaneous change after division by \(d\).

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

$$ \frac{(6)(0.3)+(8)(0.5)}{10} = \frac{1.8+4}{10} = 0.58\text{ ft/s}. $$

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

$$ \frac{(6)(-0.3)+(8)(0.5)}{10} = \frac{-1.8+4}{10} = 0.22\text{ ft/s}. $$

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.

  1. 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?
  2. If one side is shrinking, why must its rate be entered as a negative number?
  3. 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?
  4. What condition allows you to divide by \(2d\) when solving for the diagonal’s rate?
  5. Explain why the diagonal’s rate can be positive even when one of the side lengths is shrinking.

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon