Why Write the Constraint First?
A related-rates situation describes quantities that change together because of a geometric or physical relationship. Before calculating how quickly any quantity changes, we need an equation that states how the quantities are linked. That equation is called a constraint.
For example, a ladder of fixed length leaning against a wall has a horizontal distance from the wall and a vertical height. Those two distances cannot vary independently: together with the ladder, they form a right triangle. The Pythagorean theorem expresses the restriction precisely.
Writing the constraint first separates two tasks. First, translate the picture or description into a correct equation. Later, use calculus to study how the quantities change. This tutorial focuses on the first task: no rates are calculated here.
From a Description to an Equation
Start by naming the quantities that appear in the relationship. Use the labels given in the problem when possible, and state what each label measures. Distinguish changing quantities from fixed quantities: a ladder's length may be fixed even while its height and distance from the wall change.
Then identify the relationship that makes the quantities dependent. A right triangle suggests the Pythagorean theorem; a pair of similar triangles suggests equality of corresponding side ratios; and a volume description suggests a formula for the shape. Finally, check that the equation reflects the stated configuration and that its units agree.
Record what each variable measures, including its unit when that is relevant.
Do not treat a stated constant, such as a fixed length, as though it changes.
Use the geometry or physical formula that directly describes the configuration.
Confirm that corresponding parts are matched correctly and that a possible configuration satisfies the equation.
In related-rates problems, a quantity that varies with time may be written, for example, as \(x(t)\). At this stage, the important point is simply that the constraint links the quantities at the same time. It is not an equation for a rate; it describes which combinations of values are geometrically possible.
Worked Example: A Ladder Against a Wall
Worked Example: A Ladder Against a Wall
A straight ladder of fixed length \(13\) feet rests against a vertical wall. Let \(x\) be the horizontal distance from the wall to the foot of the ladder, and let \(y\) be the height of the top of the ladder above the ground. Write the constraint.
The wall and the ground are perpendicular, so \(x\) and \(y\) are the legs of a right triangle. The ladder is the hypotenuse, with fixed length \(13\) feet. By the Pythagorean theorem, the sum of the squares of the legs equals the square of the hypotenuse:
Thus the constraint is \(x^2+y^2=169\text{ ft}^2\). If \(x\) and \(y\) are recorded as numerical measurements in feet, the same relationship is conventionally written \(x^2+y^2=169\), with both variables understood to have units of feet.
Check a possible configuration with \(x=5\text{ ft}\) and \(y=12\text{ ft}\):
The values satisfy the constraint, so they are consistent with the stated ladder length and right-triangle geometry. This check does not claim that these values occur at a particular time; it verifies that they form a possible configuration.
Why the Pythagorean Constraint Works
The equation above is not an arbitrary pattern. It follows directly from the geometric arrangement. The wall and the ground meet at a right angle, so the ladder, wall segment, and ground segment form a right triangle. The Pythagorean theorem states that for every right triangle, the square of the hypotenuse equals the sum of the squares of the legs.
Here the hypotenuse has length \(13\) feet and the legs have lengths \(x\) and \(y\). Substituting those lengths into the theorem gives \(x^2+y^2=13^2\), when lengths are represented numerically in feet. Since the ladder's length is fixed, the right-hand side remains constant as the ladder moves. Therefore every valid position must satisfy this same equation. That is why the equation is the constraint.
Worked Example: A Person's Shadow
Worked Example: A Person's Shadow
A vertical lamp post is \(6\) metres tall. A person \(2\) metres tall stands on level ground, with a shadow extending away from the post. Let \(x\) be the distance from the post to the person, and let \(s\) be the length of the person's shadow. Find an equation relating \(x\) and \(s\).
The light ray from the top of the post passes through the top of the person's head and reaches the tip of the shadow. This creates a large triangle with height \(6\text{ m}\) and base \(x+s\), and a smaller triangle with height \(2\text{ m}\) and base \(s\). The triangles are similar: each has a right angle with the ground, and they share the angle along the light ray. Corresponding height-to-base ratios must therefore be equal:
For a nonzero shadow length \(s\), multiply both sides by \(s(x+s)\):
Subtract \(2s\) from both sides, then divide by \(2\):
The constraint is \(x=2s\), for positive distances in this configuration. Check \(x=8\text{ m}\) and \(s=4\text{ m}\). The large triangle has height \(6\text{ m}\) and base \(8\text{ m}+4\text{ m}=12\text{ m}\); the small one has height \(2\text{ m}\) and base \(4\text{ m}\). Their height-to-base ratios agree:
The sample values satisfy both the similarity relationship and the simplified constraint \(x=2s\).
Worked Example: Water in a Rectangular Aquarium
Worked Example: Water in a Rectangular Aquarium
A rectangular aquarium has a fixed interior length of \(50\) centimetres and width of \(30\) centimetres. Let \(h\) be the water depth and \(V\) be the volume of water. Write a constraint relating \(V\) and \(h\).
The water occupies a rectangular prism. The volume of a rectangular prism is length times width times height. Here, the length and width are fixed, while the water depth is \(h\). Therefore:
In the final expression, \(h\) is a length measured in centimetres. Thus \(\text{cm}^2\) multiplied by \(h\)'s unit of \(\text{cm}\) gives the volume unit \(\text{cm}^3\), as required.
For a sample check, take \(h=10\text{ cm}\):
Conversely, substituting this depth and volume into the constraint gives \(1500\text{ cm}^2(10\text{ cm})=15000\text{ cm}^3=V\). The equation matches the aquarium's fixed base dimensions and the volume formula.
Common Pitfall: Matching the Wrong Sides
When using similar triangles, a frequent error is to compare sides that do not correspond. In the shadow example, the large triangle's base is the full distance from the post to the shadow tip, \(x+s\), not just the distance \(x\) to the person. The small triangle's base is \(s\).
For instance, the incorrect proportion \(6/s=2/(x+s)\) swaps the bases. At \(x=8\text{ m}\) and \(s=4\text{ m}\), its two sides would be:
Since \(3/2\ne1/6\), that proportion fails the sample configuration. The correction is to pair each triangle's height with its own corresponding base: \(6/(x+s)=2/s\). Drawing or carefully describing the two triangles before writing ratios helps prevent this error.
What a Good Constraint Captures
A useful constraint is faithful to the whole description. It should include the quantities that actually determine one another, account for fixed dimensions, and use the right relationship. It should also be compatible with the geometry: distances and lengths in the examples are positive, and a shadow or water depth cannot represent a negative physical length.
Checking units is another way to catch mistakes. In the aquarium example, the expression for volume must have cubic units. In the ladder example, squared lengths are compared with a squared length. Units do not replace geometric reasoning, but they can reveal an equation that cannot represent the stated quantity.
Writing the relationship before doing any calculus matters because later steps depend on it. A correctly formed constraint records the structure of the situation; an incorrect one can lead to a calculation that is consistent algebraically but describes the wrong geometry. Once the equation is established, the next task in a related-rates problem is to study how its linked quantities change.
Check Your Understanding
For each question, focus on what the situation requires the quantities to satisfy.
- A \(10\)-foot cable runs from the ground to a point on a vertical post. If \(x\) is the ground distance from the post and \(y\) is the height of the attachment point, what constraint follows?
- A lamp post and a person's shadow form two similar triangles. If the large triangle has height \(8\) metres and base \(x+s\), while the small triangle has height \(2\) metres and base \(s\), write the ratio equation using corresponding sides.
- A rectangular tank has fixed length \(4\) metres and width \(3\) metres. If the water depth is \(h\) metres and its volume is \(V\), write a constraint and state the volume unit.
- In a ladder diagram, why is the ladder length the hypotenuse rather than one of the legs?
- What is one check you can make to determine whether a proposed constraint fits a situation?