Tutorials › Calculus I › Writing the Constraint Before Differentiating

Related Rates Problems · Tutorial 639 of 1495

Writing the Constraint Before Differentiating

Build the equation that describes a changing situation before attempting any rate calculation.

Intermediate 8 min read

What You'll Learn

  • Identify which quantities vary and which are fixed in a described situation.
  • Translate a right-triangle diagram into a Pythagorean constraint.
  • Match corresponding sides to write a correct similar-triangle equation.
  • Express volume in terms of dimensions and keep units consistent.
  • Check whether a proposed constraint fits the stated geometry and a sample configuration.

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.

Definition: A constraint is an equation that quantities in a situation must satisfy because of a geometric, physical, or other stated relationship. If the quantities vary with time, the equation must hold for every time at which the described configuration is valid.

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.

1
Name the quantities.
Record what each variable measures, including its unit when that is relevant.
2
Separate variable and fixed quantities.
Do not treat a stated constant, such as a fixed length, as though it changes.
3
Choose the relationship.
Use the geometry or physical formula that directly describes the configuration.
4
Check the equation.
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:

$$ x^2+y^2=(13\text{ ft})^2. $$

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}\):

$$ (5\text{ ft})^2+(12\text{ ft})^2 =25\text{ ft}^2+144\text{ ft}^2 =169\text{ ft}^2 =(13\text{ ft})^2. $$

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.

Key idea: The constraint describes all configurations allowed by the stated relationship, not just one snapshot. Its constants and variables come from the physical description.

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:

$$ \frac{6}{x+s}=\frac{2}{s}. $$

For a nonzero shadow length \(s\), multiply both sides by \(s(x+s)\):

$$ 6s=2(x+s)=2x+2s. $$

Subtract \(2s\) from both sides, then divide by \(2\):

$$ 4s=2x, \qquad x=2s. $$

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:

$$ \frac{6}{12}=\frac{1}{2} \qquad\text{and}\qquad \frac{2}{4}=\frac{1}{2}. $$

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:

$$ V=(50\text{ cm})(30\text{ cm})h =1500\text{ cm}^2\,h. $$

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}\):

$$ V=1500\text{ cm}^2(10\text{ cm}) =15000\text{ cm}^3. $$

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:

$$ \frac{6}{4}=\frac{3}{2} \qquad\text{but}\qquad \frac{2}{8+4}=\frac{1}{6}. $$

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.

  1. 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?
  2. 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.
  3. 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.
  4. In a ladder diagram, why is the ladder length the hypotenuse rather than one of the legs?
  5. What is one check you can make to determine whether a proposed constraint fits a situation?

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