# Optimization and Extrema

Mathematics I · Differential Calculus · https://tryals.app/learn/mathematics-i/optimization-and-extrema

## Finding the Best

**Optimization**—finding maxima and minima—turns shape into strategy. Because a smooth function's tangent is horizontal at an interior peak or valley, its derivative is **zero** at extreme points. This reduces optimization to solving $f'(x) = 0$.

| Step | Action | Rule | 
| --- | --- | --- |
| 1 | Find **critical points** | Where $f'(x) = 0$ or $f'$ is undefined | 
| 2 | **Classify** points | Max, min, or neither | 
| 3 | Check **endpoints** | Evaluate $x = a$ and $x = b$ on closed intervals $[a, b]$ |

**Common Pitfall:** Never assume $f'(x) = 0$ guarantees a max or min. It may be a flat inflection point (like $x^3$ at 0). Always test the point, and **never forget endpoints**, where the global extreme often hides!

## Classifying Extrema

Two primary tools classify a **critical point**:

- **First-derivative test**: Watch the sign of $f'$ around the point. Plus to minus ($+$ to $-$) is a **local maximum** (rising then falling); minus to plus ($-$ to $+$) is a **local minimum**.
- **Second-derivative test**: At a critical point, $f''(x) > 0$ means **local minimum** (concave up), and $f''(x) < 0$ means **local maximum** (concave down). If $f''(x) = 0$, the test is inconclusive.

Keep the scale in mind: a **local extremum** is best only in its immediate neighborhood, while a **global extremum** is the absolute best across the entire domain. On a closed interval $[a, b]$, find the global max and min by evaluating every critical point and endpoint, then taking the largest and smallest values.

## Practice questions

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

### 1. To find the maximum of a continuous function on a closed interval you must check the endpoints as well as the critical points. Why can the derivative alone miss the answer?

A. Because endpoints are always maxima or minima, so they are checked as a formality.
B. Because a maximum at an endpoint need not have a horizontal tangent.
C. Because the derivative may be zero at an endpoint, which the critical-point method would double-count.
D. Because derivatives cannot be computed at the endpoints of an interval.

**Answer:** B. Because a maximum at an endpoint need not have a horizontal tangent.

**Why:** The clearest case is f(x) = x on [0, 1]: the maximum is at the right endpoint and the derivative is 1 everywhere, so the critical-point search finds nothing. At an interior peak the function rises then falls, forcing a horizontal tangent between; at an endpoint there is no 'after'. It is also why the Extreme Value Theorem needs a *closed* interval.

Page: https://tryals.app/practice/mathematics-i/optimization-and-extrema/to-find-the-maximum-of-a-continuous-function-on-a-closed-interval-you

### 2. Order the steps of finding the global maximum of a continuous function on a closed interval.

**Answer:**

1. Differentiate the function
2. Solve f' (x) = 0 and note where f' is undefined, giving the critical points
3. Evaluate f at every critical point lying inside the interval
4. Evaluate f at both endpoints of the interval
5. Take the largest of all the values collected

**Why:** The Extreme Value Theorem guarantees the maximum exists, and it must occur at a critical point or an endpoint, so this finite list of candidates is exhaustive. Stopping after step 2 finds locations without values; skipping step 4 can miss the answer entirely.

Page: https://tryals.app/practice/mathematics-i/optimization-and-extrema/order-the-steps-of-finding-the-global-maximum-of-a-continuous

### 3. A farmer with 100 m of fence wants the largest rectangular field. Calculus says a square. Why does the derivative find a maximum here without checking every shape?

A. Because optimisation problems always have symmetric solutions
B. Because the square is the only rectangle satisfying the perimeter constraint
C. Because the derivative measures area, which is maximised when it is largest
D. Because at the top of a smooth curve the tangent is horizontal

**Answer:** D. Because at the top of a smooth curve the tangent is horizontal

**Why:** Area against width is a downward parabola, and its peak has zero slope, so one equation replaces an infinite search. That is what makes calculus an engineering tool rather than a curiosity: 'find the best' becomes 'solve f'(x) = 0', which is the same move behind every least-squares fit and every training run.

Page: https://tryals.app/practice/mathematics-i/optimization-and-extrema/a-farmer-with-100-m-of-fence-wants-the-largest-rectangular-field

### 4. Select every TRUE statement about maxima and minima.

A. The 1st-derivative test finds a local max where f' goes + to -
B. Continuous functions on closed intervals reach global extrema
C. If f'' = 0 at a critical point, it is neither a max nor min
D. Global extrema on closed intervals can occur where f' is not 0
E. All points where f'(x) = 0 are local maxima or minima

**Answer:** A. The 1st-derivative test finds a local max where f' goes + to -; B. Continuous functions on closed intervals reach global extrema; D. Global extrema on closed intervals can occur where f' is not 0

**Why:** Option 1 fails for x cubed at 0 and option 3 fails for x to the fourth at 0, which has f'' = 0 and is nonetheless a strict minimum. The Extreme Value Theorem and the endpoint warning are both exactly as stated in the lesson.

Page: https://tryals.app/practice/mathematics-i/optimization-and-extrema/select-every-true-statement-about-maxima-and-minima

### 5. A function has derivative f'(x) = (x - 1)(x - 3). Sort each point by whether f is increasing or decreasing there.

**Answer:**

- f is increasing there: x = 0, x = 4, x = -3
- f is decreasing there: x = 2, x = 2.5, x = 1.5

**Why:** Outside the interval from 1 to 3 both brackets share a sign, so the product is positive and f rises; between 1 and 3 the brackets differ in sign and f falls. So f' goes positive-negative-positive: a local maximum at x = 1 and a local minimum at x = 3, read off without ever computing f itself.

Page: https://tryals.app/practice/mathematics-i/optimization-and-extrema/a-function-has-derivative-f-x-x-1-x-3-sort-each-point-by
