PrevNext

Introduction

Whether it is finding the highest point of a projectile or calculating the quickest path light can take through two different mediums, knowing how to find the extrema of a function is crucial in physics. Beyond pure mathematics, these tools are the backbone of optimization — the process of finding the best solution to a problem given certain constraints.

In this module we will cover how to find and classify local and global extrema, then apply those techniques to solve real-world optimization problems.

Critical Points

Suppose we want to find the maximum or minimum value of f(x)f(x) on a certain interval. The minimum or maximum values of f(x)f(x) on the interval [a,b][a, b] can only occur at one of the following:

  • Points where f′(x)=0f'(x) = 0
  • Points where f′(x)f'(x) is undefined
  • At x=ax = a or x=bx = b — that is, the endpoints of the interval

Intuitively, this should make sense: at a maximum the function must go up and down a "hill," so there must be some point where the slope of the tangent line is zero (condition 1). Sometimes we have a sharp corner at the top of the hill, and the derivative is undefined (condition 2). Also, the function can just be constantly increasing, in which case the maximum is just an endpoint (condition 3).

Important

These conditions are necessary but not sufficient. Just because an xx value satisfies one of these conditions does not mean it is a minimum or maximum — it is simply a candidate.

Example 1: Find the critical points of f(x)=x2−6x+1f(x) = x^2 - 6x + 1 on the interval [2,5][2, 5].

Solution: We have f′(x)=2x−6f'(x) = 2x - 6, so f′(x)=0f'(x) = 0 at x=3x = 3. Since f′(x)f'(x) is always defined, condition two yields nothing. The endpoints give x=2x = 2 and x=5x = 5. Hence, the critical points are at x=2,3,5\boxed{x = 2, 3, 5}.

Example 2: Find the critical points of a function on the interval [1,12][1, 12], given that the function has a zero derivative only at x=10x = 10, undefined derivative at x=5x = 5 and x=8x = 8, and endpoints at x=1x = 1 and x=12x = 12.

Solution: Going through each condition:

  • Condition 1 (f′(x)=0f'(x) = 0): x=10x = 10
  • Condition 2 (f′(x)f'(x) undefined): x=5, 8x = 5,\ 8
  • Condition 3 (endpoints): x=1, 12x = 1,\ 12

Local and Global Extrema

Definitions

We have a local minimum of a function at x=cx = c if f(c)≤f(x)f(c) \leq f(x) for all xx in some open interval (a,b)(a, b) containing cc.

We have a global minimum on an interval [a,b][a, b] at x=cx = c if f(c)≤f(x)f(c) \leq f(x) for all xx in [a,b][a, b].

Note

Global minimums are by definition also local minimums. Local and global maximums are defined symmetrically.

How to Find Global Extrema

Since we know how to find critical points, finding global extrema is straightforward: evaluate ff at all critical points and select whichever gives the largest (or smallest) value.

If there is only one local minimum or maximum on an interval, that point is automatically the global minimum or maximum on that interval as well.

Classifying Extrema

First Derivative Test

Let ff be a continuous function and suppose cc is a point where f′(c)=0f'(c) = 0 or f′(c)f'(c) is undefined.

  • If ff is decreasing on (a,c)(a, c) and increasing on (c,b)(c, b) for some open interval (a,b)(a, b) containing cc, then x=cx = c is a local minimum.
  • If ff is increasing on (a,c)(a, c) and decreasing on (c,b)(c, b) for some open interval (a,b)(a, b) containing cc, then x=cx = c is a local maximum.

In practice, pick one point just to the left of cc and one just to the right of cc, and evaluate f′f' at both. If the derivative goes from negative to positive, it's a minimum; if it goes from positive to negative, it's a maximum.

Example 3: For f(x)=x2f(x) = x^2, is x=0x = 0 a local minimum or maximum?

Solution: We have f′(x)=2xf'(x) = 2x, so f′(0)=0f'(0) = 0. Evaluating to the left: f′(−1)=−2≤0f'(-1) = -2 \leq 0. Evaluating to the right: f′(2)=4≥0f'(2) = 4 \geq 0. Since the derivative goes from negative to positive, x=0x = 0 is a local minimum by the first derivative test.

Second Derivative Test

Suppose f′(c)=0f'(c) = 0. Then:

  • If f′′(c)>0f''(c) > 0, then x=cx = c is a local minimum.
  • If f′′(c)<0f''(c) < 0, then x=cx = c is a local maximum.
  • If f′′(c)=0f''(c) = 0, the test is inconclusive.

This makes intuitive sense: a positive second derivative means the function is concave up (shaped like a ∪\cup), so we have a minimum; a negative second derivative means concave down (shaped like a ∩\cap), so we have a maximum.

Example 4: Is x=3x = 3 a local minimum or maximum for f(x)=−x2+6xf(x) = -x^2 + 6x?

Solution: We find f′(x)=−2x+6f'(x) = -2x + 6, so f′(3)=0f'(3) = 0. Then f′′(x)=−2f''(x) = -2, so f′′(3)=−2<0f''(3) = -2 < 0. Hence x=3x = 3 is a local maximum by the second derivative test.

Optimization

Understanding Optimization Problems

Optimization is the process of maximizing or minimizing an objective function, subject to a set of constraints. The objective function represents the quantity to be optimized (area, cost, time, profit, etc.), while constraints define the conditions the solution must satisfy (fixed perimeter, limited resources, physical boundaries, etc.).

Some classic examples include: maximizing the area of a rectangle with a fixed perimeter, minimizing the cost of producing a certain quantity of goods, or maximizing profit from selling a product with limited resources.

General Strategy

Solving an optimization problem follows a consistent process:

  1. Identify the quantity to maximize or minimize (the objective function).
  2. Express the objective function in terms of a single variable, using the constraints to eliminate others.
  3. Find critical points by setting the derivative equal to zero.
  4. Classify the critical points using the first or second derivative test.
  5. Check endpoints if the variable is restricted to a closed interval, and confirm which critical point gives the global optimum.

Practice Problems

Problem 1: When is f(x)=2x3−15x2+36xf(x) = 2x^3 - 15x^2 + 36x maximized between x=0x = 0 and x=3.4x = 3.4?

Solution: We compute f′(x)=6x2−30x+36=6(x−3)(x−2)f'(x) = 6x^2 - 30x + 36 = 6(x-3)(x-2). The critical points in [0,3.4][0, 3.4] are x=0,2,3,3.4x = 0, 2, 3, 3.4 (since f′(x)f'(x) is always defined). Evaluating ff at each:

f(0)=0,f(2)=16−60+72=28,f(3)=54−135+108=27,f(3.4)≈27.5f(0) = 0,\quad f(2) = 16 - 60 + 72 = 28,\quad f(3) = 54 - 135 + 108 = 27,\quad f(3.4) \approx 27.5

The largest value occurs at x=2\boxed{x = 2}. This can also be confirmed as a local maximum by the first or second derivative test.

Problem 2: A baseball is thrown straight up with initial velocity vv. Find the maximum height. Assume air resistance is negligible.

Solution: From kinematics, the height at time tt is:

f(t)=vt−12gt2f(t) = vt - \frac{1}{2}gt^2

Taking the derivative: f′(t)=v−gtf'(t) = v - gt, so f′(t)=0f'(t) = 0 at t=v/gt = v/g. Since f′(t)>0f'(t) > 0 for t<v/gt < v/g and f′(t)<0f'(t) < 0 for t>v/gt > v/g, this is a global maximum. The maximum height is:

f ⁣(vg)=v2g−g2⋅v2g2=v22gf\!\left(\frac{v}{g}\right) = \frac{v^2}{g} - \frac{g}{2}\cdot\frac{v^2}{g^2} = \boxed{\frac{v^2}{2g}}

Problem 3: Walt sells water at xx dollars per gallon and expects to sell 10−x210 - x^2 gallons. What value of x≥0x \geq 0 maximizes his profit?

Solution: Walt's profit is:

f(x)=x(10−x2)=10x−x3f(x) = x(10 - x^2) = 10x - x^3

Taking the derivative: f′(x)=10−3x2=0  ⟹  x=10/3f'(x) = 10 - 3x^2 = 0 \implies x = \sqrt{10/3} (discarding the negative root). Since f′′(x)=−6xf''(x) = -6x and f′′ ⁣(10/3)<0f''\!\left(\sqrt{10/3}\right) < 0, this is a local maximum. As it is the only critical point in [0,∞)[0, \infty), the profit-maximizing price is x=10/3\boxed{x = \sqrt{10/3}}.

Problem 4 (River Crossing): A dog is trying to reach her owner across a 10 m wide river. The dog is 12 m downriver from her owner. She runs along the shore for aa meters at 5 m/s, then swims directly to her owner at 2 m/s. Which value of a∈[0,12]a \in [0, 12] minimizes the total time? (A calculator is permitted.)

Solution: The time on land is a/5a/5. By the Pythagorean theorem, the swimming distance is (12−a)2+102\sqrt{(12-a)^2 + 10^2}, so the swimming time is 12(12−a)2+100\frac{1}{2}\sqrt{(12-a)^2 + 100}. The total time is:

f(a)=a5+a2−24a+2442f(a) = \frac{a}{5} + \frac{\sqrt{a^2 - 24a + 244}}{2}

Taking the derivative and setting it to zero:

f′(a)=15+2a−244a2−24a+244=0f'(a) = \frac{1}{5} + \frac{2a - 24}{4\sqrt{a^2 - 24a + 244}} = 0

Solving: 4(244−24a+a2)=25(12−a)24(244 - 24a + a^2) = 25(12 - a)^2, which yields a≈7.64a \approx 7.64 or a≈16.36a \approx 16.36. Only a≈7.64a \approx 7.64 lies in [0,12][0, 12]. Checking f′(7.6)<0f'(7.6) < 0 and f′(7.7)>0f'(7.7) > 0 confirms this is a minimum by the first derivative test. The optimal value is a≈7.64 m\boxed{a \approx 7.64 \text{ m}}.

Problem 5 (Garden Fencing): A rectangular garden is to be built using a rock wall as one side and 100 ft of wire fencing for the other three sides. Find the dimensions that maximize the garden's area, and state the maximum area. (Source: Openstax)

Solution: Let WW be the width (fenced sides) and LL be the length (along the rock wall). The fencing constraint gives 2W+L=1002W + L = 100, so L=100−2WL = 100 - 2W. The area is:

A=LW=(100−2W)W=100W−2W2A = LW = (100 - 2W)W = 100W - 2W^2

Setting dAdW=100−4W=0\dfrac{dA}{dW} = 100 - 4W = 0 gives W=25W = 25. Since d2AdW2=−4<0\dfrac{d^2A}{dW^2} = -4 < 0, this is a maximum. Then L=100−2(25)=50L = 100 - 2(25) = 50. The maximum area is:

A=25×50=1250 ft2\boxed{A = 25 \times 50 = 1250 \text{ ft}^2}

Problem 6 (Closest Point): Which point on the graph of y=xy = x is closest to the point (5,0)(5, 0)?

Solution: A point on y=xy = x has the form (x,x)(x, x). Its distance to (5,0)(5, 0) is:

d=(x−5)2+x2d = \sqrt{(x-5)^2 + x^2}

To minimize dd, we minimize d2=(x−5)2+x2d^2 = (x-5)^2 + x^2. Setting the derivative equal to zero:

2(x−5)+2x=0  ⟹  4x=10  ⟹  x=522(x - 5) + 2x = 0 \implies 4x = 10 \implies x = \frac{5}{2}

Since the derivative changes from negative to positive at x=52x = \frac{5}{2}, this is a minimum. The closest point is (52, 52)\boxed{\left(\dfrac{5}{2},\ \dfrac{5}{2}\right)}.

Problem 7 (Open Box): An open box is to be made from a 16 in × 30 in piece of cardboard by cutting equal squares of side xx from each corner and folding up the sides. What value of xx maximizes the volume?

Solution: After cutting, the box has dimensions (30−2x)×(16−2x)×x(30 - 2x) \times (16 - 2x) \times x, so:

V=(30−2x)(16−2x)x=4x3−92x2+480xV = (30 - 2x)(16 - 2x)x = 4x^3 - 92x^2 + 480x

Note that xx is restricted to [0,8][0, 8] (cutting more than 8 in from the 16 in side is impossible). Taking the derivative:

dVdx=12x2−184x+480=4(3x−10)(x−12)=0\frac{dV}{dx} = 12x^2 - 184x + 480 = 4(3x - 10)(x - 12) = 0

This gives x=103x = \frac{10}{3} or x=12x = 12. We reject x=12x = 12 since it falls outside [0,8][0, 8]. Checking the second derivative at x=103x = \frac{10}{3}:

d2Vdx2∣x=10/3=24⋅103−184=−8<0\frac{d^2V}{dx^2}\bigg|_{x = 10/3} = 24\cdot\frac{10}{3} - 184 = -8 < 0

So x=103x = \frac{10}{3} is a maximum, giving a maximum volume of approximately 725.9 in3\boxed{725.9 \text{ in}^3}.

StatusSourceProblem NameDifficultyTags
AIMEVery Hard
Show TagsCombinatorics, Recursion

Module Progress:

Join the Discord Community!

Stuck on a problem, or don't understand a module? Join the Discord and get help with your doubts while making more math friends.

PrevNext