🏠 Home β€Ί ♾️ Calculus β€Ί Lesson 8

🎨 Optimization β€” Finding the Best Possible Answer

πŸ“– Lesson 8 of 12

πŸ“Œ Key idea of this section

To maximize or minimize: build ONE formula for the quantity,
solve its derivative = 0, and VERIFY β€” check the second
derivative and the endpoints.

The game plan

Optimization is calculus earning its paycheck. Four steps, every time:

Step 1: name variables and write the quantity you want to max/min.
Step 2: use the constraint (the fixed budget, fence, volume...) to
        reduce to ONE variable β€” and note the allowed interval.
Step 3: differentiate and solve derivative = 0.
Step 4: verify it is really the best: second derivative test,
        and compare with the endpoints.

Worked example 1 β€” the fence against the wall. A farmer has 2,400 m of fencing for a rectangular pen, and a long stone wall forms one whole side (no fence needed there). What is the largest area she can enclose?

Step 1: let x = each of the two sides perpendicular to the wall,
        and L = the side parallel to the wall. Maximize A = xΒ·L.
Step 2: the fence budget: 2x + L = 2,400, so L = 2,400 βˆ’ 2x.
        Then A(x) = x(2,400 βˆ’ 2x) = 2,400x βˆ’ 2xΒ².
        Allowed interval: 0 ≀ x ≀ 1,200 (at x = 1,200 the fence is all
        used by the two x-sides, leaving L = 0).
Step 3: A'(x) = 2,400 βˆ’ 4x = 0  β†’  4x = 2,400  β†’  x = 600.
Step 4: verify: A''(x) = βˆ’4 < 0 β†’ a cap β†’ a MAX βœ….
        Endpoints: A(0) = 0 and A(1,200) = 0 β€” both worse. βœ…
Harvest: L = 2,400 βˆ’ 2Γ—600 = 1,200 m, and
        A = 600 Γ— 1,200 = 720,000 mΒ²
That is 72 hectares of pen from 2,400 m of fence β€” and the proof
that no other rectangle beats it is the derivative, not a guess.

Worked example 2 β€” the open box. From a 36 cm square sheet of cardboard, cut equal squares of side x from the four corners and fold up the flaps to make an open-top box. Which x gives the biggest volume?

Step 1: the base becomes (36 βˆ’ 2x) by (36 βˆ’ 2x), the height is x.
        Maximize V(x) = x(36 βˆ’ 2x)Β² on 0 ≀ x ≀ 18.
Step 2: expand: (36 βˆ’ 2x)Β² = 1,296 βˆ’ 144x + 4xΒ², so
        V(x) = 4xΒ³ βˆ’ 144xΒ² + 1,296x.
Step 3: V'(x) = 12xΒ² βˆ’ 288x + 1,296 = 12(xΒ² βˆ’ 24x + 108).
        Factor: xΒ² βˆ’ 24x + 108 = (x βˆ’ 6)(x βˆ’ 18)
        (6 Γ— 18 = 108 and 6 + 18 = 24 βœ…), so V'(x) = 0 at x = 6, x = 18.
Step 4: x = 18 makes the base 36 βˆ’ 36 = 0 β€” volume 0, a MINIMUM.
        Check x = 6: V''(x) = 24x βˆ’ 288, so V''(6) = 144 βˆ’ 288 = βˆ’144 < 0
        β†’ cap β†’ MAX βœ…. Endpoints give V = 0. βœ…
Harvest: V(6) = 6 Γ— 24Β² = 6 Γ— 576 = 3,456 cmΒ³.
Intuition check: x = 6 is exactly 1/6 of the sheet's side β€” small enough
to leave a generous base, tall enough to matter. Calculus found the
sweet spot; geometry alone could only guess.

Worked example 3 β€” the five-digit profit. A company sells gadgets. When the price is p dollars per gadget, customers buy x of them, where p(x) = 1,000 βˆ’ 2x (charge less, sell more). Each gadget costs $200 to make, plus fixed costs of $45,000. How many gadgets maximize profit?

Step 1: revenue R(x) = xΒ·p(x) = 1,000x βˆ’ 2xΒ²   (units Γ— price).
        Cost C(x) = 200x + 45,000.
Step 2: profit P(x) = R βˆ’ C = 1,000x βˆ’ 2xΒ² βˆ’ 200x βˆ’ 45,000
                          = βˆ’2xΒ² + 800x βˆ’ 45,000.
Step 3: P'(x) = βˆ’4x + 800 = 0  β†’  x = 200 gadgets.
Step 4: P''(x) = βˆ’4 < 0 β†’ cap β†’ MAX βœ….
Harvest: price p(200) = 1,000 βˆ’ 400 = $600;
        revenue = 200 Γ— 600 = $120,000;
        cost = 200 Γ— 200 + 45,000 = $85,000;
        profit = $120,000 βˆ’ $85,000 = $35,000.
Neighbor check: P(190) = βˆ’2Γ—36,100 + 152,000 βˆ’ 45,000 = $34,800 < $35,000 βœ…
        (moving 10 units either way costs the company $200 of profit).

✏️ Your Turn!

Redo the fence problem with only 800 m of fencing (still one stone wall).

πŸ‘€ Show the answers

Answer: 2x + L = 800 β†’ L = 800 βˆ’ 2x; A(x) = 800x βˆ’ 2xΒ²; A'(x) = 800 βˆ’ 4x = 0 β†’ x = 200; A'' = βˆ’4 < 0 βœ… max; L = 800 βˆ’ 400 = 400 m; A = 200 Γ— 400 = 80,000 mΒ². One-third the fence, one-ninth the area β€” scaling is not linear!

V.3.1