# Chapter 13: Optimization and Linearization

> A complete method for constrained best-and-worst problems, from fencing a garden to cone-in-sphere puzzles — plus linearization, differentials, error bounds, and Newton's method.

**Canonical:** https://calculus.kitzo.work/chapter/optimization  
**Level:** Advanced  
**Estimated time:** 50 minutes  
**Exercises:** 8 (auto-marked; answers stay server-side)

## Topics
- The optimization method
- Constraint & objective
- Optimization + implicit differentiation
- Linearization L(x)
- The differential
- Error in linearization
- Newton's method

**Why this matters**

Optimisation is where calculus earns its keep: the cheapest box, the best angle, the least metal, the fastest route. And linearization is the bridge back — the fact that near any point a curve is nearly its tangent line powers everything from error estimates to Newton's method. This chapter pairs the two halves of applied calculus.

## 1 · The optimization master method

Every optimization problem, from trivial to fiendish, runs the same loop:

- **Variable:** name the quantity you may change (x, r, h, θ).

- **Constraint:** translate the fixed condition ('perimeter 40', 'volume 32') into an equation linking your variables.

- **Objective:** write the quantity to extremize (area, surface cost, time) as a function of *one* variable, using the constraint to eliminate the other.

- **Differentiate and solve:** find critical points of the one-variable objective.

- **Verify the endpoints:** on a closed interval, compare critical values against boundary values; on open domains, check the limit at the edges.

- **Answer the actual question:** dimensions, not just x.

## 2 · An easy warm-up: fixed perimeter

A rectangle has perimeter 40. What dimensions maximize its area? Let the width be x; the height is (40 − 2x)/2 = 20 − x. Objective: A(x) = x(20 − x) = 20x − x². A′(x) = 20 − 2x = 0 gives x = 10, and A″(x) = −2 < 0 confirms a maximum. The rectangle is a square, 10 × 10, area 100 — perimeter fixed, square wins.

## 3 · A harder problem: the least-material box

**Worked example 1**

### Open-top box, square base, volume 32 cm³ — minimize surface area

- **Variable:** side of the square base, a > 0.

- **Constraint:** a²h = 32, so h = 32/a².

- **Objective:** metal used S(a) = a² + 4ah = a² + 4a·(32/a²) = a² + 128/a.

- **Differentiate:** S′(a) = 2a − 128/a². Set to zero: 2a³ = 128 → a³ = 64 → a = 4.

- **Verify:** S″(a) = 2 + 256/a³, and S″(4) = 6 > 0 → minimum. Or note S → ∞ as a → 0⁺ and as a → ∞.

- **Dimensions:** a = 4 cm, h = 32/16 = 2 cm; minimum surface area S(4) = 16 + 32 = 48 cm².

## 4 · Optimization with implicit differentiation: cone in a sphere

A right circular cone is inscribed in a sphere of radius R. Find the cone of maximum volume. Let r be the base radius and h the height measured from the bottom of the sphere. The geometry gives r² + (h − R)² = R², i.e. r² = 2Rh − h². Differentiate implicitly: 2r·dr + 2(h − R)·dh = 0, relating the rates of change directly.

Volume: V = (1/3)πr²h = (1/3)π(2Rh − h²)h = (1/3)π(2Rh² − h³). Then V′(h) = (1/3)π(4Rh − 3h²) = (1/3)πh(4R − 3h). Critical points: h = 0 (rejected) and h = 4R/3. Check second derivative or endpoints: V(4R/3) is maximal since V(0) = V(2R) = 0 with V ≥ 0 between. Then r² = 2R(4R/3) − 16R²/9 = 8R²/9, so r = (2√2/3)R, and V_max = (1/3)π·(8R²/9)·(4R/3) = 32πR³/81. The implicit-differentiation route shines when variables are entangled and solving one outright is messy.

## 5 · Linearization and the differential

Near a point a, the tangent line is an excellent stand-in for the curve:

L(x) = f(a) + f′(a)(x − a)

Example: √x near a = 4. L(x) = 2 + (x − 4)/4. So √4.1 ≈ 2 + 0.1/4 = 2.025 (true value ≈ 2.02485). Also eˣ ≈ 1 + x near 0, and sin x ≈ x near 0 — the small-angle rule, resurrected. Linearization is trustworthy only close to a; the further you wander, the worse the lie.

The **differential** dy = f′(x)dx is the tangent-line change, packaged as algebra. It answers: if x shifts by dx, how much does f move along the tangent? Real functions curve, so dy approximates the true change Δf. The error is controlled by the second derivative, or by the largest slope on the interval: if |f′(t)| ≤ M for t between x and x + dx, then

|Δf| ≤ M·|dx|

and the sharper Taylor form |Δf − dy| ≤ ½·M₂·dx² holds with M₂ bounding |f″| on the interval.Example: estimate √9.1 to five decimals — with a = 9, dx = 0.1, f′(x) = 1/(2√x) ≤ 1/6 on [9, 10], so the error is at most ½·(1/108)·(0.1)² ≈ 5×10⁻⁵. Small enough to trust every displayed digit.

## 6 · Newton's method

**Worked example 2**

### Newton's method for √2

- **Setup:** solve f(x) = x² − 2 = 0. f′(x) = 2x. Iteration: x_{n+1} = x_n − (x_n² − 2)/(2x_n).

- **Start at x₀ = 1:** x₁ = 1 − (1 − 2)/2 = 1 + ½ = 1.5.

- **Iterate:** x₂ = 1.5 − (2.25 − 2)/3 = 1.5 − 1/12 ≈ 1.41667. Error already below 0.003.

- **One more:** x₃ ≈ 1.41422 — correct to five decimals, and the number of correct digits roughly doubles each step (quadratic convergence).

Newton's method is just linearization used backwards: walk to where the tangent line would cross the axis, then re-linearize. It can fail — a zero derivative, a poor starting guess, or a cycle can all strand you — which is why a grapher check before iterating is cheap insurance.

**Watch out**

Do not confuse the two linearization errors. dy = f′(x)dx is the first-order (tangent) estimate; |Δf − dy| ≤ ½Mdx² is the correction that tells you how far the true change can drift from dy. And in Newton's method, x_{n+1} = x_n − f(x_n)/f′(x_n) — divide by f′, not f, and never by f evaluated at the wrong index.

**Chapter formula sheet**

Optimization loop: variable → constraint → objective → f′ = 0 → check endpoints
L(x) = f(a) + f′(a)(x − a)
dy = f′(x)dx
|Δf − dy| ≤ ½·M·dx², with |f′| ≤ M on the interval
Newton: x_{n+1} = x_n − f(x_n) / f′(x_n)
eˣ ≈ 1 + x near 0; sin x ≈ x near 0

## Common mistakes

- Minimizing or maximizing before expressing the objective as a function of a single variable.

- Forgetting to verify interior critical points against endpoints or the open-domain limits.

- Accepting h = 4R/3-type algebra without checking r² comes out positive.

- Applying L(x) = f(a) + f′(a)(x − a) with a typo in the expansion — keep the (x − a), not (x + a).

- Using dy as if it were the exact Δf for large dx — linearization is local.

- Newton starting at a point where f′ is zero or nearly zero, and watching the iterates explode.

## Practice exercises

1. In the optimization master method, what is the very first step?

- A. Differentiate the objective
- B. Name the variable(s) and find the constraint
- C. Check the second derivative
- D. Evaluate the objective at the endpoints

2. A fixed amount of fencing makes a rectangle of perimeter 40 m. What is the largest possible area, in square metres?

3. An open-top box with a square base holds 32 cm³. Find the minimum possible surface area, in cm².

4. Write the linearization L(x) of f(x) = e^x at a = 0. Answer like 1+x.

5. Using linearization of f(x) = √x at a = 4, approximate √4.1. Give your answer to 2 decimals.

6. If |f′(t)| ≤ M for every t between x and x + dx, the standard error estimate for linear approximation says the change in f is at most:

- A. M · |dx|
- B. ½ · M · dx²
- C. M / |dx|
- D. M² · dx

7. Apply one step of Newton's method to f(x) = x² − 2 starting from x₀ = 1. What is x₁?

8. For f(x) = x², write the differential dy in terms of dx at x = 5 (e.g. 10dx).

---

Practice interactively: https://calculus.kitzo.work/chapter/optimization

Citation: CalculusKitzo (https://calculus.kitzo.work/). Independent study notes inspired by the standard calculus syllabus; not affiliated with Princeton University Press. See https://calculus.kitzo.work/disclaimer
