# Extrema and optimization

Physics I · Calculus of a Single Variable · https://tryals.app/learn/physics-i/extrema-and-optimization

## Finding Local Extrema

A **critical point** occurs where $f'(c) = 0$ or $f'(c)$ is undefined. This is our primary tool for locating peaks and valleys.

The **first derivative test** tracks the sign of $f'$ around the critical point to classify its nature:

| $f'$ changes from | Conclusion at $c$ |
| --- | --- |
| $+$ to $-$ | **Local maximum** |
| $-$ to $+$ | **Local minimum** |
| no sign change | **Neither** (inflection) |

The **second derivative test** evaluates $f''(c)$ when $f'(c) = 0$:

$$f''(c) > 0 \;\Rightarrow\; \text{local minimum} \qquad f''(c) < 0 \;\Rightarrow\; \text{local maximum}$$

**Common pitfall**: $f'(c) = 0$ makes $c$ a candidate, not a guarantee. For example, $f(x) = x^3$ has a derivative of zero at $0$, but pauses flat mid-climb and is neither a maximum nor a minimum.

## Global Extrema & MVT

To find **global extrema on** $[a,b]$, evaluate $f$ at every critical point **and** at both endpoints. The largest resulting value is the **absolute maximum**, and the smallest is the **absolute minimum**. True extremes often hide at the **endpoints** where the derivative never vanishes.

The **Mean Value Theorem (MVT)** states that if $f$ is continuous on $[a,b]$ and differentiable on $(a,b)$, there exists at least one $c \in (a,b)$ such that:

$$f'(c) = \frac{f(b)-f(a)}{b-a}$$

This guarantees a point where the instantaneous rate of change equals the average rate of change over the interval.

**Physics link**: Minimising potential energy $U(x)$ to find the **equilibrium position** is a direct application where $U'(x) = 0$.

## Practice questions

4 of this lesson's 14 practice questions, with answers. The full set is in the app.

### 1. $f'(c) = 0$ at an interior point $c$. A classmate concludes "$f$ has a max or min at $c$." What is the verdict?

A. Correct, provided $f$ is continuous
B. Not necessarily: it can flatten and keep climbing
C. Correct, zero slope always means a peak or valley
D. Wrong, extrema require $f'(c)$ to be undefined

**Answer:** B. Not necessarily: it can flatten and keep climbing

**Why:** $f'(c)=0$ nominates $c$ as a **candidate**; it does not elect it. $x^{3}$ pauses flat at the origin mid-ascent, a saddle. Confirmation needs a sign change in $f'$ or a second-derivative test.

Page: https://tryals.app/practice/physics-i/extrema-and-optimization/f-c-0-at-an-interior-point-c-a-classmate-concludes-f-has-a-max

### 2. A continuous function on a closed interval attains its maximum, but $f'(x) = 0$ need not hold there. Why can the maximum sit somewhere the derivative is not zero?

A. At an endpoint, where the function can still be climbing
B. At a discontinuity, which is why continuity is required
C. Nowhere else: a maximum always has zero derivative
D. At a point of inflection, where the second derivative vanishes

**Answer:** A. At an endpoint, where the function can still be climbing

**Why:** The derivative test finds interior stationary points only. On a closed interval the candidates are those points plus the two endpoints, omitting the endpoints is the commonest error in constrained optimisation.

Page: https://tryals.app/practice/physics-i/extrema-and-optimization/a-continuous-function-on-a-closed-interval-attains-its-maximum-but

### 3. Order the steps of the closed interval method for absolute extrema.

**Answer:**

1. Find all critical points of f inside (a, b)
2. Evaluate f at each critical point
3. Evaluate f at the endpoints a and b
4. The largest value is the absolute maximum; the smallest is the absolute minimum

**Why:** On a closed bounded interval a continuous function always attains its extreme values.

Page: https://tryals.app/practice/physics-i/extrema-and-optimization/order-the-steps-of-the-closed-interval-method-for-absolute-extrema

### 4. A farmer has 100 m of fence for a rectangular pen against a river (no fence needed on the river side). Order the optimization workflow.

**Answer:**

1. Name variables: width $x$, length $y$, area $A = xy$
2. Encode the constraint: $2x + y = 100$
3. Substitute to get one variable: $A(x) = x(100 - 2x)$
4. Set $A'(x) = 100 - 4x = 0$, giving $x = 25$
5. Confirm it is a maximum and report $25 \times 50$ m

**Why:** Every optimization problem walks these same five steps; only the story changes. Note the punchline $y = 2x$: the free river side lets the pen stretch twice as long as it is deep.

Page: https://tryals.app/practice/physics-i/extrema-and-optimization/a-farmer-has-100-m-of-fence-for-a-rectangular-pen-against-a-river-no
