Introduction to Optimization

A tent from one sheet

A sheet of canvas 44 meters wide and 33 meters long is draped over a horizontal ridge rope along its center line. Each half slopes from the rope to the ground as a rectangle 22 meters by 33 meters. The two bottom edges are staked down parallel to the rope, and the ends are left open.
The spacing of the stakes sets the tent's shape. Staked 3.23.2 meters apart, the ridge is 1.21.2 meters high, and each triangular end has area 12(3.2)(1.2)=1.92\frac{1}{2}(3.2)(1.2) = 1.92 square meters. Staked 2.42.4 meters apart, the ridge is 1.61.6 meters high, and the end's area is again 12(2.4)(1.6)=1.92\frac{1}{2}(2.4)(1.6) = 1.92 square meters. Either way, the tent holds 3(1.92)=5.763(1.92) = 5.76 cubic meters.
One end of the tent staked 3.2 m apart: the ridge is 1.2 m high.
Staked 2.4 m apart, the ridge is 1.6 m high. Its end has the same area as the wide tent's, 1.92 m².
A wide tent is low and a tall tent is narrow, so the volume depends on one choice, the spacing. Finding the spacing with the largest volume is an optimization problem: a quantity is made as large or as small as the situation allows.

The tent, step by step

The quantity to maximize is the tent's volume VV, in cubic meters. Let xx be half the distance between the staked edges and hh the height of the ridge, both in meters. Each end is a triangle with base 2x2x and height hh, and the tent is 33 meters long, so
V=12(2x)(h)⋅3=3xh.V = \tfrac{1}{2}(2x)(h) \cdot 3 = 3xh.
The variables: x is half the spacing and h is the ridge height. Each slanted side is 2 m of canvas.
The constraint is the canvas. Each slanted side is 22 meters long, the hypotenuse of a right triangle with legs xx and hh, so x2+h2=4x^2 + h^2 = 4. Since the height can't be negative, h=4−x2h = \sqrt{4 - x^2}. Substituting it into V=3xhV = 3xh gives the volume as a function of one variable,
V(x)=3x4−x2.V(x) = 3x\sqrt{4 - x^2}.
For the domain, xx can't be negative, and the half-spacing can't be longer than the 22-meter side, so 0≤x≤20 \le x \le 2. Both ends of that interval are flat tents. At x=0x = 0 the halves hang straight down against each other, and at x=2x = 2 the canvas lies on the ground, so V=0V = 0 at both. Keeping them gives the closed interval [0,2][0, 2].
The wide tent above has x=1.6x = 1.6, and V(1.6)=3(1.6)1.44V(1.6) = 3(1.6)\sqrt{1.44}, which is 3(1.6)(1.2)=5.763(1.6)(1.2) = 5.76, the volume found there.

Solving the tent problem

The function V(x)=3x4−x2V(x) = 3x\sqrt{4 - x^2} is continuous on [0,2][0, 2] and differentiable on (0,2)(0, 2). By the product and chain rules,
V′(x)=34−x2−3x24−x2=3(4−x2)−3x24−x2=6(2−x2)4−x2.\begin{aligned} V'(x) &= 3\sqrt{4 - x^2} - \frac{3x^2}{\sqrt{4 - x^2}} \\ &= \frac{3\left(4 - x^2\right) - 3x^2}{\sqrt{4 - x^2}} \\ &= \frac{6\left(2 - x^2\right)}{\sqrt{4 - x^2}}. \end{aligned}
On (0,2)(0, 2) the denominator is positive, so V′(x)=0V'(x) = 0 only where x2=2x^2 = 2, at x=2x = \sqrt{2}. The other root, x=−2x = -\sqrt{2}, is outside the domain. The derivative is undefined at x=2x = 2, which is already a candidate as an endpoint. The candidates are
xx002\sqrt{2}22
V(x)V(x)006600
since V(2)=32⋅4−2=3⋅2=6V\left(\sqrt{2}\right) = 3\sqrt{2} \cdot \sqrt{4 - 2} = 3 \cdot 2 = 6. By the Candidates Test, the absolute maximum of VV on [0,2][0, 2] is 66, at x=2x = \sqrt{2}. The ridge height is then h=4−2=2h = \sqrt{4 - 2} = \sqrt{2} as well.
The volume V(x) = 3x√(4 − x²) on [0, 2]. It's 0 at both endpoints and largest, 6, at x = √2.
Stake the bottom edges 22≈2.832\sqrt{2} \approx 2.83 meters apart. The ridge is then 2≈1.41\sqrt{2} \approx 1.41 meters high, and the tent holds 66 cubic meters, more than the 5.765.76 of either tent above. Since x=hx = h, each half of the end is an isosceles right triangle, so the two sides of canvas meet at a right angle at the ridge.

Price and profit

A rate as the quantity