Topic 5.10

Build an objective in one variable

Builds on writing the constraint. 6 minutes.

An open tank with a fixed volume

An open tank has a square base with a side of \(x\) meters, shown in orange, and a height of \(h\) meters. It must hold 32 cubic meters of water, and the builder wants to use the least glass.

The glass is the base, \(x^2\), plus four sides of \(x\) by \(h\), so the area is \(A = x^2 + 4xh\). This formula has two variables, \(x\) and \(h\).

Drag \(x\). The height \(h\) changes too, because the volume must stay 32. At \(x = 2\), the tank is 8 m tall, and at \(x = 4\), it is 2 m tall.

The graph below plots the glass area against \(x\). One number is enough, because \(x\) fixes \(h\), and so the whole tank.

Any volume

Take any volume \(V\). Drag \(x\). A small base makes a tall tank, and a wide base makes a flat tank.

In both cases the height follows from \(x\) and \(V\), because the volume \(x^2 h\) must equal \(V\). This makes the area a function of \(x\) alone.

Notation

  1. The objective, the quantity to make as small as possible, is the glass area. Its formula has two variables.

    \[\cb{A} = x^2 + 4xh\]
  2. The constraint, the fixed volume, ties the two variables together. Solve it for the variable that is easier to isolate. Here that is \(h\), because it appears once and has no exponent.

    \[x^2 h = 32 \quad\Rightarrow\quad h = \frac{32}{x^2}\]
  3. Replace that variable in the objective with its expression, everywhere it appears. The base term \(x^2\) has no \(h\), so it stays.

    \[\begin{aligned} \cb{A(x)} &= x^2 + 4x\cdot\frac{32}{x^2} \\ &= x^2 + \frac{128}{x} \end{aligned}\]
  4. Test the formula with one case. At \(x = 2\), \(h = 8\), so \(A = 4 + 4(2)(8) = 68\), and the formula gives the same value.

    \[A(2) = 4 + \frac{128}{2} = 68\]

When it fails

Keep \(h\) free, so that at \(x = 2\) the area \(4 + 8h\) still depends on \(h\). With \(h = 1\) it is 12, and with \(h = 8\) it is 68.

The volume turns red for \(h = 1\) and \(h = 4\), because only the tank with \(h = 8\) holds 32 m³. The constraint is what makes one \(x\) give one area.

Example 1: A rectangle with a fixed area

A rectangle has an area of 50 m². Let \(x\) be its width in meters. Write its perimeter as a function of \(x\).

  1. Call the other side \(y\). The perimeter uses both sides, and the fixed area ties them together.

    \[\cb{P} = 2x + 2y, \qquad xy = 50\]
  2. Solve the area equation for \(y\). Then replace \(y\) in the perimeter.

    \[\begin{aligned} y &= \frac{50}{x} \\ \cb{P(x)} &= 2x + \frac{100}{x} \end{aligned}\]
  3. Test the formula. For \(x = 5\), \(y = 10\), and the perimeter is 30. The formula gives \(10 + 20 = 30\).

Example 2: A garden

A farmer has 80 m of fence for a rectangular garden with sides \(x\) and \(y\). The area is \(A = xy\). How fast does the area change with \(x\) when \(x = 10\)?

  1. The bar under the garden lays the four pieces of fence end to end, and they fill 80 m. This constraint gives \(y\) in terms of \(x\).

    \[2x + 2y = 80 \quad\Rightarrow\quad y = 40 - x\]
  2. A tempting wrong move: Differentiate \(A = xy\) and treat \(y\) as a constant. Then \(A' = y = 30\) at \(x = 10\).

    \[\frac{dA}{dx} = y = 30\]

    The red line of slope 30 is steeper than the curve, because \(y\) does not stay at 30. When \(x\) grows from 10 to 11, \(y\) falls from 30 to 29. The area grows from 300 to 319, a change of 19 and not 30.

  3. Substitute first. Then \(A\) depends on \(x\) alone, and the derivative gives the slope of the graph.

    \[A(x) = x(40 - x) = 40x - x^2\]
  4. At \(x = 10\) the area changes at 20 m² per meter, the slope of the orange tangent.

    \[\begin{aligned} A'(x) &= 40 - 2x \\ A'(10) &= 20 \end{aligned}\]

Practice

A can has radius \(r\) and height \(h\), in centimeters. It must hold 1000 cm³. Its surface area is \(A = 2\pi r^2 + 2\pi r h\). Write \(A\) as a function of \(r\).

Solve the volume equation for \(h\). Replace \(h\) in the side term. The two ends contain no \(h\).

Solution
  1. The volume of the can is fixed. Solve it for \(h\).

    \[\pi r^2 h = 1000 \quad\Rightarrow\quad h = \frac{1000}{\pi r^2}\]
  2. Replace \(h\) in the side term, where \(\pi\) and one \(r\) cancel. The ends stay as they are.

    \[\begin{aligned} A(r) &= 2\pi r^2 + 2\pi r\cdot\frac{1000}{\pi r^2} \\ &= 2\pi r^2 + \frac{2000}{r} \end{aligned}\]

Questions

The figure shows the open tank with a volume of 32 m³ and glass area \(A(x) = x^2 + \tfrac{128}{x}\).

  1. The tank is tall and thin. Which term of \(A(x)\) is large?

    • \(\dfrac{128}{x}\), the four sides
    • \(x^2\), the base
    • Both terms are large
    • Neither term is large
    Answer

    \(\dfrac{128}{x}\), the four sides

  2. The tank is wide and flat. Which term of \(A(x)\) is large?

    • \(x^2\), the base
    • \(\dfrac{128}{x}\), the four sides
    • Both terms are large
    • Neither term is large
    Answer

    \(x^2\), the base

  3. A closed box has a square base of side \(x\) and a height \(h\). Its volume is 18. Its surface area is \(S = 2x^2 + 4xh\). Which formula gives \(S\) in terms of \(x\)?

    • \(S = 2x^2 + \dfrac{72}{x}\)
    • \(S = 2x^2 + \dfrac{18}{x}\)
    • \(S = 2x^2 + \dfrac{72}{x^2}\)
    • \(S = 2x^2 + 72x\)
    Answer

    \(S = 2x^2 + \dfrac{72}{x}\)

Summary

You solve the constraint for one variable, here \(h = \tfrac{32}{x^2}\), and substitute it into the objective, so the glass area depends on \(x\) alone.

This works because the constraint gives one value of that variable for each value of the other.

You use it before you differentiate in any optimization problem.

This is one of four skills in topic 5.10 of Which & Why: AP Calculus.