MATH 140 Calculus 1 • McGill University, Montreal

Revision sheet: optimization problems (MATH 140)

This sheet is not a summary of section 4.7 of Stewart: you already have the course notes and a page of classic problems. It answers one question only, what makes students lose marks on optimization problems in MATH 140 at McGill University, and which precise gesture avoids each loss.

Almost every student finds the critical number. The marks are lost before it, on the domain, and after it, on the justification of the GLOBAL extremum and on the answer to the question actually asked. Every value below is exact and done by hand, as on the exam, and every trap comes with the sentence that earns the method mark.

Mark this sheet as read or add it to your favourites: a free account, no password, keeps your read sheets and favourites from one visit to the next and tells you which chapter to tackle next. Create your space, an email is enough.

The thread of the chapter

A critical number is only a CANDIDATE: the answer is proved global by the DOMAIN, read from the situation before anything is differentiated, with the closed interval method on a closed interval and the sign of f′f' on the whole domain otherwise, and the answer is the quantity the question asks, never the critical number.

This chapter is part of MATH 140, Calculus 1 (McGill)

The essentials

The five moves, and why the derivative is only the fourth

  • • Name the variables on a FIGURE; write the CONSTRAINT that links them; write the OBJECTIVE in ONE variable by substituting the constraint.
  • • Give the DOMAIN from the situation: every length ≥0\ge 0, every capacity or land limit. A formula knows nothing about cardboard or seats; the domain does.
  • • Find the candidates: the critical numbers INSIDE the domain (f′=0f' = 0 or f′f' undefined). A critical number outside the domain is struck off, with the reason in words.
  • • Prove the extremum is GLOBAL (next block), then answer the question asked: dimensions, time, price, area, with units.
  • • A constraint that binds moves the optimum to an ENDPOINT, where f′≠0f' \ne 0: pasture A(x)=x(600−3x)A(x) = x(600 - 3x) with x≤80x \le 80 is largest at x=80x = 80, where A′(80)=120A'(80) = 120.
204060801001201401601802004812162024283236cap x = 80(80, 28.8)vertex (100, 30)x (m)A (thousands of m²)
With the land cap x≤80x \le 80, the vertex at x=100x = 100 lies outside the domain: AA is still increasing at x=80x = 80, and the maximum is the endpoint value 28 80028\,800.

Markers split an optimization question roughly into set-up, candidates, justification and answer. The derivative itself is often worth less than the domain line.

The licences for a GLOBAL extremum

  • • Closed and bounded domain [a,b][a, b], ff continuous: the Extreme Value Theorem guarantees the extrema; compare ff at the candidates AND at aa and bb (closed interval method).
  • • Open or unbounded domain: no endpoint to evaluate and no guarantee. Use the sign of f′f' on the WHOLE domain: negative then positive around cc proves an absolute minimum.
  • • Only one critical number on an interval, and it is a local extremum: it is the absolute extremum of that kind.
  • • f′′<0f'' < 0 on the WHOLE domain (a downward parabola, for instance): the critical number is the absolute maximum. f′′(c)<0f''(c) < 0 at the point alone only proves a LOCAL maximum.
  • • An endpoint may be a real object (the half-disk window, the rowboat landing at the village): its value is not 00 and must be compared exactly.
12345678910111250100150200250300350400450global min at r = 5→ ∞ as r → 0⁺→ ∞ as r → ∞rA(r)/π
The can's area A(r)=2πr2+500πrA(r) = 2\pi r^2 + \frac{500\pi}{r} (here over π\pi) blows up at both ends of the open domain: no endpoint to test, but A′A' changes sign once, at r=5r = 5.

Write the licence in one sentence with its hypothesis: “AA is continuous on the closed interval [0,5][0, 5], so by the closed interval method…”. That sentence is the method mark.

The rules in table form

Each row reads from left to right: the assumptions, then the result. A red cell is not an answer, it is the finding that the form settles nothing and the instruction to rewrite it. Every case is followed by a worked example.

Which justification for which domain

Read a line as: with a domain of the first kind, this argument proves the global extremum. The red line is a sentence students write that proves nothing global.

DomainArgumentGlobal?
[a,b][a, b] closed interval method yes

Example: Box: V(0)=V(5)=0V(0) = V(5) = 0 and V(2)=144V(2) = 144, so 144144 cm3^3 is the maximum.

(0,∞)(0, \infty) sign of f′f' everywhere yes

Example: Can: A′(r)=4π(r3−125)r2<0A'(r) = \frac{4\pi(r^3 - 125)}{r^2} < 0 on (0,5)(0, 5) and >0> 0 on (5,∞)(5, \infty): 150π150\pi is the minimum.

any interval f′′<0f'' < 0 everywhere yes

Example: Stained glass window: L′′=−(4+3π2)<0L'' = -\left(4 + \frac{3\pi}{2}\right) < 0, so r=168+3πr = \frac{16}{8 + 3\pi} gives the maximum.

any interval f′′(c)<0f''(c) < 0 only local only not a licence

Example: f(x)=x3−6x2+9x+1f(x) = x^3 - 6x^2 + 9x + 1: f′′(1)=−6<0f''(1) = -6 < 0 and f(1)=5f(1) = 5, yet f(5)=21f(5) = 21 on [0,5][0, 5].

What to do: Add the endpoint comparison, or show that cc is the ONLY critical number of the interval.

The red line becomes a licence as soon as cc is the only critical number: a single local maximum on an interval cannot be beaten.

The mistakes that cost marks

These are the errors I correct most often in session. Each one costs marks on a paper, even when the reasoning behind it is right.

1. Answering with the critical number

1 to 2 marks, the conclusion line

What not to write

“A′(x)=600−6x=0A'(x) = 600 - 6x = 0, so the maximum area is x=100x = 100.”

What to write

“The maximum area is 30 00030\,000 m2^2, for a pasture of 300300 m along the river and 100100 m deep.”

Why: x=100x = 100 is a length and a candidate. The question asked for the area and the dimensions: compute them from the constraint, with units.

2. Stopping at the second derivative test

the whole justification, and here the answer

What not to write

“f′′(1)=−6<0f''(1) = -6 < 0, so f(1)=5f(1) = 5 is the maximum of f(x)=x3−6x2+9x+1f(x) = x^3 - 6x^2 + 9x + 1 on [0,5][0, 5].”

What to write

“Closed interval method: f(0)=1f(0) = 1, f(1)=5f(1) = 5, f(3)=1f(3) = 1, f(5)=21f(5) = 21. The absolute maximum is 2121, at x=5x = 5.”

0.511.522.533.544.555.54812162024local max (1, 5)absolute max (5, 21)local minx
The curve has a local maximum (1,5)(1, 5), but on [0,5][0, 5] it climbs again to (5,21)(5, 21): the second derivative test at x=1x = 1 was right and useless.

Why: f′′(c)<0f''(c) < 0 compares f(c)f(c) with its NEIGHBOURS only. With two critical numbers, or with an endpoint that climbs, the local maximum is beaten.

3. Keeping a critical number outside the domain

1 mark, and a negative volume on the paper

What not to write

“V′(x)=4(3x−20)(x−2)V'(x) = 4(3x - 20)(x - 2): V′′(2)<0V''(2) < 0 gives the maximum and V′′(203)>0V''\left(\frac{20}{3}\right) > 0 gives the minimum.”

What to write

“The domain is [0,5][0, 5], since the sheet is 1010 cm wide. x=203>5x = \frac{20}{3} > 5 is rejected: it describes no box.”

Why: V(203)=−160027V\left(\frac{20}{3}\right) = -\frac{1600}{27}. The formula is valid algebra outside the domain and meaningless geometry: strike the candidate off BEFORE testing it.

4. Ignoring a capacity that moves the optimum

the whole question

What not to write

“R′(p)=1500−40p=0R'(p) = 1500 - 40p = 0, so the best price for the 600600-seat hall is 37.5037.50 dollars.”

What to write

“q≤600q \le 600 forces p≥45p \ge 45. On [45,75][45, 75], R′<0R' < 0, so the best price is 4545 dollars: sold out, 27 00027\,000 dollars.”

Why: At 37.5037.50 dollars the hall holds only 600600 of the 750750 buyers: 22 50022\,500 dollars. A constraint that binds puts the optimum on the boundary, where the derivative is not 00.

5. Running the closed interval method on an open domain

2 to 3 marks

What not to write

“A(r)=2πr2+500πrA(r) = 2\pi r^2 + \frac{500\pi}{r} on (0,∞)(0, \infty). Endpoints: A(0)=0A(0) = 0, so the minimum is at r=0r = 0.”

What to write

“The domain (0,∞)(0, \infty) has no endpoint. A′(r)=4π(r3−125)r2A'(r) = \frac{4\pi(r^3 - 125)}{r^2} is negative on (0,5)(0, 5) and positive on (5,∞)(5, \infty), so A(5)=150πA(5) = 150\pi is the absolute minimum.”

Why: A(0)A(0) does not exist: 500πr→∞\frac{500\pi}{r} \to \infty as r→0+r \to 0^+. On an open domain the justification is the sign of A′A' on the whole domain.

6. Giving the minimum of the squared distance as the distance

1 mark

What not to write

“D(x)=x2−5x+9D(x) = x^2 - 5x + 9 is smallest at x=52x = \frac{5}{2}, so the least distance from (3,0)(3, 0) to y=xy = \sqrt x is 114\frac{11}{4}.”

What to write

“The least value of D=d2D = d^2 is 114\frac{11}{4}, so the least distance is 114=112\sqrt{\frac{11}{4}} = \frac{\sqrt{11}}{2}.”

Why: Squaring changes the function, not the point, because t\sqrt t is increasing. The value asked must come back through the square root.

7. Differentiating before eliminating a variable

the whole question: every line after is meaningless

What not to write

“A=xyA = xy, so A′=y+x=0A' = y + x = 0.”

What to write

“With y=600−3xy = 600 - 3x, A(x)=600x−3x2A(x) = 600x - 3x^2 and A′(x)=600−6xA'(x) = 600 - 6x.”

Why: A derivative is taken with respect to ONE variable. The constraint is exactly the tool that turns xyxy into a function of xx alone; use it before differentiating.

8. Comparing an endpoint with a calculator decimal, or not at all

1 to 2 marks of justification

What not to write

“The Norman window is best at r=84+πr = \frac{8}{4 + \pi}, since A(0)=0A(0) = 0.”

What to write

“At r=82+πr = \frac{8}{2 + \pi} the window is a half-disk of area 32π(2+π)2\frac{32\pi}{(2+\pi)^2}, and 324+π>32π(2+π)2\frac{32}{4 + \pi} > \frac{32\pi}{(2+\pi)^2} because (2+π)2−π(4+π)=4>0(2 + \pi)^2 - \pi(4 + \pi) = 4 > 0.”

Why: Only ONE endpoint was checked, and the other is a real window. The exact comparison reduces to one line of algebra; no calculator is needed or allowed.

Which method to choose

Which justification, by the FORM of the domain and of the objective

Once the objective is written in one variable and its domain is known, look at the domain first, then at the objective

  • If a closed and bounded interval [a,b][a, b], objective continuous → closed interval method: list the interior critical numbers and both endpoints, compare the values

    Example: Box: V(0)=0V(0) = 0, V(2)=144V(2) = 144, V(5)=0V(5) = 0

  • If the only interior critical number is outside the domain → f′f' has one sign on the whole domain: the optimum is at an endpoint

    Example: Village 22 km away: T′<0T' < 0 on [0,2][0, 2], row straight to it

  • If an open or unbounded domain such as (0,∞)(0, \infty) → sign of f′f' on the WHOLE domain, or f′′f'' of constant sign; check the ends only to see whether an optimum exists

    Example: Can: A′<0A' < 0 then >0> 0 around r=5r = 5

  • If an objective that is a quadratic with negative leading coefficient → the vertex is the absolute maximum if it lies in the domain; otherwise the nearest endpoint

    Example: Revenue 1500p−20p21500p - 20p^2: vertex 37.537.5, but p≥45p \ge 45 in the small hall

  • If a distance, or an area with a square root → optimize d2d^2 or A2A^2 (nonnegative), then take the square root of the VALUE

    Example: D=x2−5x+9D = x^2 - 5x + 9, min⁡D=114\min D = \frac{11}{4}, dmin⁡=112d_{\min} = \frac{\sqrt{11}}{2}

If none applies, the optimum may not exist: the can of fixed volume has no MAXIMUM area. Saying so, with the limit that shows it, is the answer.

How the answer is expected to be written

A marker ticks steps. Here they are in order, with the concluding sentence expected word for word.

Writing up an optimization problem

When to use it: Any question that asks for the largest, smallest, cheapest, fastest or closest, with a situation to model

  1. 1 Draw the figure and name the variables with their units; say which quantity is optimized.
  2. 2 Write the constraint, solve it for the variable that is easy to isolate, and write the objective in one variable.
  3. 3 State the domain, with the reason for each bound (a length ≥0\ge 0, the width of the sheet, the capacity).
  4. 4 Differentiate, naming the rules used; list the critical numbers and strike off those outside the domain.
  5. 5 Name the licence for the global extremum and apply it: the closed interval method with every value, or the sign of f′f' on the whole domain.
  6. 6 Answer the question asked, with every requested quantity and its unit.

Concluding sentence

“VV is continuous on the closed interval [0,5][0, 5]. Its only critical number in the interval is x=2x = 2, and V(0)=0V(0) = 0, V(2)=144V(2) = 144, V(5)=0V(5) = 0. By the closed interval method, the largest volume is 144144 cm3^3, for a box 1212 cm by 66 cm by 22 cm.”

The trap: Skipping the domain line: without it the reader cannot tell which critical numbers are allowed, nor which licence applies.

Marking: Typically 3 marks for the set-up (constraint, objective, domain), 2 for the derivative and candidates, 3 for the justification of the global extremum, 2 for the final answer with units.

Check before you hand in

Five minutes of checking recover more marks than one more problem started in a hurry.

The typical problem, taken apart

The poster of least area: an open domain from start to finish

A poster must carry a printed region of area 5050 cm2^2, with margins of 44 cm at the top and bottom and 22 cm on each side. Find the dimensions of the poster that uses the least paper.

No calculator. Every step must be justified as on a MATH 140 final.

printedarea 50x50/x24(x + 4) by (50/x + 8)
The printed region is xx by 50x\frac{50}{x}; the margins add 44 to the width and 88 to the height, whatever the value of xx.

Step 1

Let xx be the width of the printed region, in cm. Its height is 50x\frac{50}{x} (constraint). The poster is (x+4)(x + 4) by (50x+8)\left(\frac{50}{x} + 8\right), so A(x)=(x+4)(50x+8)=50+8x+200x+32=82+8x+200xA(x) = (x + 4)\left(\frac{50}{x} + 8\right) = 50 + 8x + \frac{200}{x} + 32 = 82 + 8x + \frac{200}{x}.

Why

The constraint is used BEFORE differentiating, to get one variable. Expanding the product first makes the derivative a two term computation.

Step 2

Domain: any width x>0x > 0 gives a poster, so x∈(0,∞)x \in (0, \infty). As x→0+x \to 0^+, 200x→∞\frac{200}{x} \to \infty, and as x→∞x \to \infty, 8x→∞8x \to \infty.

Why

The domain is open: the closed interval method is unavailable, and saying so tells the marker which licence comes next.

Step 3

A′(x)=8−200x2=8(x2−25)x2A'(x) = 8 - \frac{200}{x^2} = \frac{8(x^2 - 25)}{x^2}. On (0,∞)(0, \infty) the only zero is x=5x = 5; A′<0A' < 0 on (0,5)(0, 5) and A′>0A' > 0 on (5,∞)(5, \infty).

Why

Factoring A′A' over a common denominator makes its sign readable on the WHOLE domain, which is exactly the justification required.

Step 4

So AA decreases on (0,5](0, 5] and increases on [5,∞)[5, \infty): A(5)=82+40+40=162A(5) = 82 + 40 + 40 = 162 is the absolute minimum. The printed region is 55 by 1010, the poster 99 cm by 1818 cm.

Why

The first derivative test for absolute extreme values is named, then the question is answered with the poster's dimensions, not with x=5x = 5.

Step 5

Check: 9×18=1629 \times 18 = 162, and nearby widths do worse: A(4)=82+32+50=164A(4) = 82 + 32 + 50 = 164, A(10)=82+80+20=182A(10) = 82 + 80 + 20 = 182.

Why

Two quick evaluations on either side confirm the minimum and catch a slip in the expansion of AA.

The conclusion, written out

“A(x)=82+8x+200xA(x) = 82 + 8x + \frac{200}{x} on (0,∞)(0, \infty) has A′<0A' < 0 on (0,5)(0, 5) and A′>0A' > 0 on (5,∞)(5, \infty), so its absolute minimum is A(5)=162A(5) = 162. The poster of least area is 99 cm wide and 1818 cm high.”

The classic mistake on this problem: Evaluating “A(0)A(0)” as an endpoint, or answering x=5x = 5 (the printed width) instead of the poster's 99 cm by 1818 cm.

Learn by heart

  • • Figure, variables, constraint, objective in ONE variable, domain, candidates, licence, answer.
  • • A critical number is a candidate; outside the domain it is struck off.
  • • Closed interval [a,b][a, b]: compare the candidates with BOTH endpoints.
  • • Open domain: sign of f′f' on the WHOLE domain, or f′′f'' of constant sign.
  • • f′′(c)<0f''(c) < 0 alone proves a LOCAL maximum; one critical number on an interval makes it global.
  • • Minimize d2d^2, not dd: same point, then the square root of the value.
  • • A binding constraint puts the optimum on the boundary, where f′≠0f' \ne 0.
  • • Answer with the quantity asked, in its units, never with the bare critical number.

Frequently asked questions

How do I justify that my answer is an absolute maximum in an optimization problem?

Look at the domain. If it is a closed interval and the function is continuous, use the closed interval method: compare the value at each critical number with the values at both endpoints. If the domain is open or unbounded, show that the derivative is positive before the critical number and negative after it, on the whole domain. A second derivative at the point alone only proves a local maximum.

What do I do when the critical number is outside the domain?

Strike it off and say why in words, for instance that it would need a negative width. Then the derivative has one sign on the whole domain, so the function is monotone there and the optimum is at an endpoint. This happens whenever a capacity, a land limit or the size of a sheet cuts the problem short.

Can I minimize the square of the distance instead of the distance?

Yes. The square root is increasing, so the distance and its square are smallest at the same point, and the square has no root to differentiate. Just remember that the least value you found is the square of the distance: take its square root before giving the least distance.

Why does my answer lose marks when the critical number is right?

Usually for one of three reasons: the domain was never stated, the global extremum was not justified, or the final line gives the critical number instead of what was asked. The question wants the dimensions, the time or the price, with units, and the justification is worth about as much as the derivative.

Practise it

Corrected exercises: Optimization problems, MATH 140 at McGill

A method is proved on a paper, not on a sheet. The set for the same chapter takes each of these traps into a problem, with the solution written out step by step.

  • 10 corrected exercises
  • 100 points
  • 150 minutes
Do the exercises
Previous sheet Curve sketching Next sheet Antiderivatives

© Ahmed Squalli Houssaini. Revision sheet published at www.letuteurscientifique.ca/en/fiches/math140-optimization. Free for personal and classroom use; republishing it elsewhere requires written permission (legal notice).

See also

Looking for a MATH 140 tutor in Montreal?

Get in touch for a first session. Optimization is the long question of almost every MATH 140 final, and its marks go to the set-up and the justification, which are exactly what a session trains.

Site by Studio Squalli