Optimization Examples in Math

Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Optimization.

This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Math.

Concept Recap

The process of using derivatives to systematically find maximum or minimum values of a function over a domain.

Find where the function hits its peaks (maxima) and valleys (minima) by finding where the slope is zero.

Read the full concept explanation โ†’

How to Use These Examples

  • Read the first worked example with the solution open so the structure is clear.
  • Try the practice problems before revealing each solution.
  • Use the related concepts and background knowledge badges if you feel stuck.

What to Focus On

Core idea: Optimization uses derivatives to find a function's maxima and minima by locating where fโ€ฒ(x)=0f'(x)=0 and classifying them.

Common stuck point: The procedure for optimization is the easy part; the trap is stopping at fโ€ฒ(x)=0f'(x)=0 without classifying. Asking "Am I seeking an extreme value by finding where the slope is zero and then classifying it?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

Sense of Study hint: Ask: Am I seeking an extreme value by finding where the slope is zero and then classifying it?

Worked Examples

Example 1

easy
Find the local maximum and minimum values of f(x)=x3โˆ’3x+2f(x) = x^3 - 3x + 2.

Answer

Local maximum: f(โˆ’1)=4f(-1) = 4; local minimum: f(1)=0f(1) = 0

First step

1
Find fโ€ฒ(x)=3x2โˆ’3=3(x2โˆ’1)=3(xโˆ’1)(x+1)f'(x) = 3x^2 - 3 = 3(x^2 - 1) = 3(x-1)(x+1).

Full solution

  1. 2
    Set fโ€ฒ(x)=0f'(x) = 0: critical points at x=1x = 1 and x=โˆ’1x = -1.
  2. 3
    Find fโ€ฒโ€ฒ(x)=6xf''(x) = 6x. At x=โˆ’1x = -1: fโ€ฒโ€ฒ(โˆ’1)=โˆ’6<0f''(-1) = -6 < 0, so local maximum.
  3. 4
    At x=1x = 1: fโ€ฒโ€ฒ(1)=6>0f''(1) = 6 > 0, so local minimum.
  4. 5
    Evaluate: f(โˆ’1)=โˆ’1+3+2=4f(-1) = -1 + 3 + 2 = 4 (local max); f(1)=1โˆ’3+2=0f(1) = 1 - 3 + 2 = 0 (local min).
The second derivative test classifies critical points: negative second derivative means concave down (local max), positive means concave up (local min). Always evaluate the function at the critical point to get the actual max/min value.

Example 2

hard
A farmer has 200 m of fencing to enclose a rectangular field. What dimensions maximize the enclosed area?

Example 3

medium
Find the absolute maximum and minimum of f(x)=x3โˆ’3x2f(x) = x^3 - 3x^2 on [โˆ’1,3][-1, 3].

Example 4

medium
A cylindrical can of volume VV has no top. Express its surface area as a function of radius rr and find the radius that minimizes surface area.

Example 5

medium
A page must contain 5050 in2^2 of printed text, with margins of 11 in on top/bottom and 22 in on each side. What page dimensions minimize total page area?

Example 6

medium
Find the point on the line y=2x+1y = 2x + 1 closest to the origin.

Example 7

hard
A right triangle with the right angle at the origin has legs along the positive axes. The hypotenuse passes through (3,4)(3, 4). Find the minimum area of the triangle.

Example 8

hard
A lighthouse beam of constant intensity passes over a wall at distance dd. If light intensity at angle ฮธ\theta from the beam axis is proportional to cosโก2ฮธ\cos^2\theta, where is the brightest point on the wall?

Example 9

challenge
Find the dimensions of the rectangle of maximum area that can be inscribed in the ellipse x2a2+y2b2=1\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1 with sides parallel to the axes.

Practice Problems

Try these problems on your own first, then open the solution to compare your method.

Example 1

easy
Find the critical points of f(x)=2x3โˆ’9x2+12xโˆ’4f(x) = 2x^3 - 9x^2 + 12x - 4 and classify them.

Example 2

medium
Find the absolute maximum and minimum of f(x)=x3โˆ’6x2+9x+1f(x) = x^3 - 6x^2 + 9x + 1 on [0,4][0, 4].

Example 3

easy
Find the critical points of f(x)=x2โˆ’6x+5f(x) = x^2 - 6x + 5.

Example 4

easy
Where does f(x)=x2f(x) = x^2 attain its minimum?

Example 5

easy
Find the critical point of f(x)=โˆ’x2+4xf(x) = -x^2 + 4x.

Example 6

easy
Find the critical points of f(x)=x3โˆ’3xf(x) = x^3 - 3x.

Example 7

easy
Is x=0x=0 a max, min, or neither for f(x)=x3f(x) = x^3?

Example 8

easy
Find the absolute max of f(x)=4โˆ’x2f(x) = 4 - x^2 on [โˆ’1,1][-1, 1].

Example 9

easy
Find the critical points of f(x)=x2+2xf(x) = x^2 + \frac{2}{x} for x>0x>0.

Example 10

easy
Find where f(x)=exโˆ’xf(x) = e^x - x has a critical point.

Example 11

medium
Find the absolute extrema of f(x)=x3โˆ’3xf(x) = x^3 - 3x on [โˆ’2,2][-2, 2].

Example 12

medium
Use the second derivative test to classify the critical point of f(x)=x2โˆ’4x+1f(x) = x^2 - 4x + 1.

Example 13

medium
A farmer has 40 m of fence for a rectangular pen against a wall (no fence on the wall side). Maximize the area.

Example 14

medium
Find the dimensions of a rectangle with perimeter 20 that maximizes area.

Example 15

medium
Minimize f(x)=x+4xf(x) = x + \frac{4}{x} for x>0x > 0.

Example 16

medium
Find the maximum of f(x)=xeโˆ’xf(x) = x e^{-x} for xโ‰ฅ0x \ge 0.

Example 17

medium
A box with a square base and open top has volume 32. Minimize surface area.

Example 18

challenge
Find the point on y=x2y = x^2 closest to (0,2)(0, 2).

Example 19

challenge
Maximize the area of a rectangle inscribed under y=4โˆ’x2y = 4 - x^2 (above the xx-axis), with base on the axis.

Example 20

challenge
A 12 cm wire is cut into two pieces, one bent into a square and one into a circle. Where to cut to minimize total area? (Set up the critical-point equation.)

Example 21

medium
Classify the critical point of f(x)=โˆ’x2+6xf(x) = -x^2 + 6x using the second derivative test.

Example 22

medium
Find the number whose sum with its square is minimized.

Example 23

easy
Find the critical points of f(x)=x2โˆ’8x+7f(x) = x^2 - 8x + 7.

Example 24

easy
Find the critical points of f(x)=x3โˆ’12xf(x) = x^3 - 12x.

Example 25

easy
Find the absolute minimum of f(x)=(xโˆ’3)2+1f(x) = (x-3)^2 + 1.

Example 26

easy
Find the maximum value of f(x)=โˆ’2x2+8xโˆ’3f(x) = -2x^2 + 8x - 3.

Example 27

medium
A box with a square base and open top has volume 3232 cubic units. Find dimensions that minimize the surface area.

Example 28

medium
A rectangle is inscribed under the parabola y=4โˆ’x2y = 4 - x^2 with two vertices on the xx-axis. Find the maximum area.

Example 29

medium
Find the maximum value of f(x)=xeโˆ’xf(x) = x e^{-x} for xโ‰ฅ0x \ge 0.

Example 30

medium
Find local extrema of f(x)=x4โˆ’8x2+5f(x) = x^4 - 8x^2 + 5.

Example 31

medium
Find two non-negative numbers whose sum is 2020 and whose product is maximum.

Example 32

medium
A poster has area 180180 cm2^2. If margins are 33 cm on top and bottom and 22 cm on each side, what poster dimensions maximize the printed area?

Example 33

medium
Find the absolute extrema of f(x)=sinโกx+cosโกxf(x) = \sin x + \cos x on [0,2ฯ€][0, 2\pi].

Example 34

hard
A wire of length 100100 cm is cut into two pieces, one bent into a square and the other into a circle. Where should it be cut to minimize total area?

Example 35

hard
Find local extrema of f(x)=lnโกxโˆ’xf(x) = \ln x - x for x>0x > 0.

Example 36

hard
Find the dimensions of the right circular cone of maximum volume that can be inscribed in a sphere of radius RR.

Example 37

hard
A revenue function is R(x)=100xโˆ’0.5x2R(x) = 100x - 0.5x^2 and a cost function is C(x)=10x+200C(x) = 10x + 200 for xx units sold. Find the production level that maximizes profit.

Example 38

hard
Find the absolute minimum value of f(x)=x2+16xf(x) = x^2 + \frac{16}{x} for x>0x > 0.

Example 39

challenge
Snell's law: a swimmer at (0,4)(0, 4) on land swims to point (x,0)(x, 0) on a straight shoreline, then swims in the water to (10,โˆ’3)(10, -3). Land speed 55 m/s, water speed 33 m/s. Set up the time function T(x)T(x) and write the equation that xx must satisfy (don't solve numerically).

Related Concepts

Background Knowledge

These ideas may be useful before you work through the harder examples.

derivative