Differential Calculus 201-SN2-RE • CEGEP, Montreal

Revision sheet: applied optimization (201-SN2-RE)

This sheet does not repeat the list of steps of an optimization problem: it is in your notes. It deals with what the marking scheme really penalizes, namely translating the statement, the domain, and the justification of the extremum, three steps where a numerically exact answer can earn only half the marks on a 201-SN2-RE (formerly 201-NYA) exam.

It is written for CEGEP students in the Science program (Sciences de la nature). Once you have read the sheet, the corrected exercise set on the same chapter puts every reflex to the test.

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, tells you which chapter to tackle next and lets you ask for the method or exercise you are missing. Create your space, an email is enough.

The thread of the chapter

In an optimization problem, the differentiation is the easy part. Marks are lost in the three steps around it: translating the statement into a constraint and an objective function, establishing the domain, and JUSTIFYING that the critical number really is the extremum asked for.

This chapter is part of 201-SN2-RE, Differential Calculus

The essentials

The six-step method, and where each step costs marks

  • • 1. DIAGRAM and variable names. Without a diagram, the constraint is wrong one time out of two.
  • • 2. Write the function to OPTIMIZE, the one whose maximum or minimum the question asks for.
  • • 3. Write the CONSTRAINT, the relation imposed by the statement (given perimeter, fixed volume, available material).
  • • 4. Use the constraint to eliminate a variable: the objective function must depend on only ONE unknown.
  • • 5. Establish the physically admissible DOMAIN, by combining all the positivity conditions.
  • • 6. Differentiate, find the critical numbers, and JUSTIFY that the candidate kept really is the extremum asked for.
246810121416-500500100015002000250030003500max at x ≈ 5.66
The objective function V(x)=x(30−2x)(40−2x)V(x)=x(30-2x)(40-2x) is zero at both ends of the domain and peaks inside: this shape is what makes the only critical number necessarily a maximum.

Steps 2 and 3 carry the most marks and are the most rushed. Swapping them brings down everything else, however flawless.

Justifying the extremum: three arguments, pick one

  • • CLOSED bounded interval: the Extreme Value Theorem guarantees existence; compare ff at the critical numbers AND at both endpoints.
  • • A SINGLE critical number on the interval, with a change of sign of f′f': the local extremum is then ABSOLUTE. It is the most economical argument.
  • • Second Derivative Test: f′′(c)<0f''(c)<0 gives a maximum, f′′(c)>0f''(c)>0 a minimum. Silent if f′′(c)=0f''(c)=0.
  • • OPEN interval: the endpoints are not reached. You must show that ff tends to a smaller value there, or to infinity in the right direction.

An optimization answer without justification is worth half the marks, even when the number is exact.

Economics: the three functions and the optimality condition

  • • Cost C(x)C(x), MARGINAL cost C′(x)C'(x): the cost of the next unit produced.
  • • Revenue R(x)=x p(x)R(x)=x\,p(x), where p(x)p(x) is the unit price, which often depends on the quantity.
  • • Profit P(x)=R(x)−C(x)P(x)=R(x)-C(x), maximal where P′(x)=0P'(x)=0, that is, where R′(x)=C′(x)R'(x)=C'(x).
  • • In plain words: keep producing as long as the next unit brings in more than it costs.
102030405060708025050075010001250150017502000R(x)C(x)max profit
With R(x)=x(80−x)R(x)=x(80-x) and C(x)=20x+300C(x)=20x+300, the gap R−CR-C (the profit, in green) is largest at x=30x=30, where the tangent to RR is parallel to CC: R′(30)=C′(30)=20R'(30)=C'(30)=20.

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. Confusing the constraint with the function to optimize

the whole question

What not to write

“We have 200200 m of fencing, so I maximize L+2ℓ=200L+2\ell=200.”

What to write

“The constraint is L+2ℓ=200L+2\ell=200; the function to OPTIMIZE is the area A=LℓA=L\ell.”

wallLℓℓL + 2ℓ = 200 m of fencing
The fence runs along three sides: L+2ℓ=200L+2\ell=200 is the CONSTRAINT. What we maximize is the green area A=LℓA=L\ell.

Why: The constraint is an imposed EQUALITY; it is not optimized. The foolproof marker is the verb of the question: what you are asked to make maximal or minimal is the objective function; what is “available”, “given” or “imposed” is the constraint.

2. Differentiating a function of two variables

the whole question, there is nothing to solve

What not to write

“A=LℓA=L\ell, so A′=ℓ+LA'=\ell+L.”

What to write

“The constraint gives L=200−2ℓL=200-2\ell, so A(ℓ)=200ℓ−2ℓ2A(\ell)=200\ell-2\ell^{2} and A′(ℓ)=200−4ℓA'(\ell)=200-4\ell.”

Why: A derivative only makes sense with respect to ONE variable. Step 4 exists precisely to eliminate the second one with the constraint, and a solution that skips it writes an expression with no status, which no computation can exploit.

3. Forgetting the physically admissible domain

2 marks, and the whole answer if the critical number found falls outside the domain

What not to write

“V(x)=x(30−2x)(40−2x)V(x)=x(30-2x)(40-2x) is a polynomial, so I study it on R\mathbb{R}.”

What to write

“We need x>0x>0, 30−2x>030-2x>0 and 40−2x>040-2x>0, so x∈(0,15)x\in\left(0, 15\right): the most restrictive condition wins.”

5101520-1000-500500100015002000250030003500domain (0, 15)V(16) = −256
VV can be computed beyond 1515, but it no longer describes any box there: V(16)=−256V(16)=-256. Only the green part, 0<x<150<x<15, makes sense, and that is where we look for the maximum.

Why: The polynomial can still be computed outside it and gives negative volumes: V(16)=−256V(16)=-256. Here the two critical numbers are 5.665.66 and 17.6817.68, and it is the domain, and the domain alone, that rules out the second. Without it, the solution has two candidates and no reason to choose.

4. Announcing the extremum without justifying it

half the marks for the question, although the number is exact

What not to write

“A′(ℓ)=0A'(\ell)=0 gives ℓ=50\ell=50, so the maximum area is 50005000 m2^{2}.”

What to write

“ℓ=50\ell=50 is the only critical number and A′A' changes from ++ to −-: the local maximum is therefore ABSOLUTE on (0,100)\left(0, 100\right), and it is 50005000 m2^{2}.”

102030405060708090100100020003000400050006000A′ > 0A′ < 0only critical number
A(ℓ)=200ℓ−2ℓ2A(\ell)=200\ell-2\ell^{2} rises then falls: A′A' changes from ++ to −- at ℓ=50\ell=50, the only critical number in (0,100)(0, 100). That sentence is what turns the local maximum into an ABSOLUTE maximum.

Why: The marking scheme of an optimization problem always sets aside a mark for the justification. A critical number is a candidate: it could be a minimum, or neither. A fifteen-word sentence is enough to win back that mark.

5. Not testing the endpoints of a closed interval

the whole question

What not to write

“The only critical number of f(x)=x3−3xf(x)=x^{3}-3x on [0,3]\left[0, 3\right] is x=1x=1, so the maximum is f(1)=−2f(1)=-2.”

What to write

“Candidates: f(0)=0f(0)=0, f(1)=−2f(1)=-2, f(3)=18f(3)=18. The absolute maximum is 1818, reached at the ENDPOINT x=3x=3; x=1x=1 gives the minimum.”

-1123-4481216x = 1: minimummax at the endpoint
The critical number x=1x=1 gives the MINIMUM; the maximum of ff on [0,3]\left[0, 3\right] is reached at the endpoint x=3x=3, where the derivative does not vanish at all.

Why: On a closed bounded interval, the Extreme Value Theorem guarantees that the extrema exist, but nothing says they are inside. Comparing the three values takes thirty seconds and it is the only way to conclude.

6. Treating an open interval as if it were closed

1 mark for rigour, more if the question asks for an explanation

What not to write

“The domain is (0,15)\left(0, 15\right), so I compare VV at the endpoints 00 and 1515.”

What to write

“The endpoints are not reached. I use the single critical number argument instead, or I show that V→0V\to 0 as x→0+x\to 0^{+} and x→15−x\to 15^{-}.”

246810121416-500500100015002000250030003500endpoints 0 and 15 not reached
On (0,15)(0, 15), the endpoints are not candidates: VV tends to 00 near them, but they are never reached. Conclude with the single critical number, or with these two limits.

Why: The Extreme Value Theorem requires a CLOSED BOUNDED interval. On an open one, the extremum may not exist at all. Here it does exist, but the argument that proves it is not the comparison with the endpoints: it is the uniqueness of the critical number with a change of sign.

7. Answering with the maximum when the dimensions are asked for

1 to 2 marks, although the whole computation is right

What not to write

“Question: what are the dimensions of the pen? Answer: 50005000 m2^{2}.”

What to write

“The dimensions are 100100 m parallel to the wall and 5050 m perpendicular to it; the corresponding area is 50005000 m2^{2}.”

wall100 m50 m50 mA = 5000 m²
The question “what dimensions?” expects TWO lengths: 100100 m along the wall, 5050 m perpendicular to it. The area of 50005000 m2^{2} is a complement, not the answer.

Why: The variable being optimized and the quantity asked for are two different things. Rereading the question when you conclude, and giving BOTH pieces of information whenever in doubt, is the most profitable protection of the chapter.

8. Looking for maximum profit where revenue is maximal

the whole economics question

What not to write

“Revenue is maximal at x=40x=40, so profit is too.”

What to write

“Profit is maximal where P′(x)=0P'(x)=0, that is, where R′(x)=C′(x)R'(x)=C'(x), which is almost never the maximum of the revenue.”

1020304050607080-400-200200400600800max profit at 30max revenue at 40
Profit P(x)=x(80−x)−(20x+300)P(x)=x(80-x)-(20x+300): maximal at x=30x=30 (green), where R′=C′R'=C'. At x=40x=40, the maximum of revenue (red), the profit has already dropped.

Why: The maximum of revenue ignores the cost. As long as the next unit brings in more than it costs, production should continue; it stops when marginal revenue and marginal cost become equal, which happens BEFORE the maximum of revenue as soon as the cost is increasing.

Which method to choose

Which argument justifies the extremum

Once the critical number is found, the argument depends on the NATURE of the domain, not on the problem.

  • If the domain is a closed bounded interval [a,b]\left[a,b\right] → Extreme Value Theorem: compare ff at the critical numbers AND at both endpoints

    Example: f(0)=0f(0)=0, f(1)=−2f(1)=-2, f(3)=18f(3)=18: the maximum is 1818

  • If there is ONLY ONE critical number on the domain and f′f' changes sign there → the local extremum is ABSOLUTE on that domain, and it is the shortest argument

    Example: A′(ℓ)=200−4ℓA'(\ell)=200-4\ell changes from ++ to −- at ℓ=50\ell=50

  • If f′′f'' is easy to compute and f′′(c)≠0f''(c)\neq 0 → Second Derivative Test: f′′(c)<0f''(c)<0 gives a maximum, f′′(c)>0f''(c)>0 a minimum

    Example: V′′(5.66)=−144<0V''(5.66)=-144<0, so a maximum

  • If the domain is open and there are several critical numbers → full sign chart of f′f', plus the limits at the open endpoints

    Example: show that V→0V\to 0 at both endpoints of (0,15)\left(0, 15\right)

The second argument covers the vast majority of exam problems and fits in one sentence. It is the one to favour when time is short.

Which constraint, depending on the type of problem

The statement always gives a FIXED quantity: that quantity, and that quantity alone, provides the constraint.

  • If the statement fixes a length of material (fence, wire, edging) → the constraint is a PERIMETER, and the objective is almost always an area

    Example: L+2ℓ=200L+2\ell=200 for a pen against a wall

  • If the statement fixes an area of material (cardboard, sheet metal, glass) → the constraint is an AREA, and the objective is a volume

    Example: 2πr2+2πrh=S2\pi r^{2}+2\pi rh=S for a cylindrical box

  • If the statement fixes a volume (capacity of a can, of a tank) → the constraint is the VOLUME, and the objective is the surface area to minimize

    Example: πr2h=355\pi r^{2}h=355 gives h=355πr2h=\frac{355}{\pi r^{2}}, then h=2rh=2r at the optimum

  • If the statement fixes a starting shape that is cut or folded → there is no separate constraint: the geometry of the folding directly gives a function of a single variable

    Example: V(x)=x(30−2x)(40−2x)V(x)=x(30-2x)(40-2x) for a box cut from a sheet of cardboard

  • If the statement is about a path, a time or a travel cost → the objective is a total time or cost, and the constraint is the fixed position of the endpoints

    Example: the minimal travel time gives back Snell's law

A problem where the constraint does not appear is a problem of the fourth type: the folding has already done the elimination.

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.

An optimization problem, written up for the marker

When to use it: The long problem of the final exam, usually worth ten to fifteen marks.

  1. 1 Draw the diagram, name the variables and SAY so: “Let xx be the side of the square cut out, in centimetres.”
  2. 2 Write the function to optimize and the constraint separately, labelling them as such.
  3. 3 Eliminate a variable and give the objective function in a single unknown.
  4. 4 Establish the domain by listing each positivity condition, then give the interval.
  5. 5 Differentiate, solve f′(x)=0f'(x)=0, and explicitly rule out the solutions outside the domain.
  6. 6 JUSTIFY the extremum with one of the three arguments, then answer the question asked, with units.

Concluding sentence

The optimal cut is x=35−3253≈5.66x=\frac{35-\sqrt{325}}{3}\approx 5.66 cm, which gives a box 28.728.7 cm by 18.718.7 cm and 5.665.66 cm high, with a maximum volume of 30323032 cm3^{3}.

The trap: Ruling out the second root without saying so. The marker wants to see the sentence “17.68∉(0,15)17.68\notin\left(0, 15\right), this solution is rejected”: it is what proves that the domain served a purpose.

Marking: Typically 2 marks for setting up the equations, 1 mark for the domain, 2 marks for differentiating and solving, 1 mark for rejecting the root outside the domain, 2 marks for the justification, 1 mark for the 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 box cut from a sheet of cardboard, as on the final exam

A square of side xx is cut from each of the four corners of a sheet of cardboard 3030 cm by 4040 cm, then the edges are folded up to form a box without a lid.

Find xx so that the volume is maximal, and give this volume.

40 cm30 cmxx40 − 2x30 − 2x
Each dimension loses xx TWICE, once at each end: that is where the factors 30−2x30-2x and 40−2x40-2x come from, and forgetting the factor 22 is the most frequent error in setting up the problem.

Step 1

After folding, the height is xx, the length 40−2x40-2x and the width 30−2x30-2x. The function to optimize is therefore V(x)=x(30−2x)(40−2x)V(x)=x(30-2x)(40-2x).

Why

There is no separate constraint here: the geometry of the folding has already reduced the problem to a single variable. Recognizing this type saves you from looking for a constraint that does not exist.

Step 2

Domain: x>0x>0 to have a height, 30−2x>030-2x>0 that is x<15x<15, and 40−2x>040-2x>0 that is x<20x<20. The most restrictive wins: dom=(0,15)\text{dom}=\left(0, 15\right).

Why

The three conditions are written down before being combined. It is the domain, and the domain alone, that will later rule out the second root of the derivative.

Step 3

Expanding, V(x)=4x3−140x2+1200xV(x)=4x^{3}-140x^{2}+1200x, so V′(x)=12x2−280x+1200=4(3x2−70x+300)V'(x)=12x^{2}-280x+1200=4\left(3x^{2}-70x+300\right).

Why

Expanding before differentiating is faster here than applying the product rule twice, and factoring out 44 simplifies the solving.

Step 4

3x2−70x+300=03x^{2}-70x+300=0 gives x=70±4900−36006=70±13006x=\frac{70\pm\sqrt{4900-3600}}{6}=\frac{70\pm\sqrt{1300}}{6}, that is, x≈5.66x\approx 5.66 or x≈17.68x\approx 17.68. Now 17.68∉(0,15)17.68\notin\left(0, 15\right): this solution is REJECTED.

Why

The rejection sentence earns marks. It proves that the domain established in the previous step served a purpose, and it is exactly what the marker looks for at that point in the solution.

Step 5

Justification: V′V' is a quadratic with a positive leading coefficient, so it is positive before 5.665.66 and negative after, on the whole domain. V′V' changes from ++ to −- at the ONLY critical number in the domain: the local maximum there is therefore ABSOLUTE.

Why

It is the shortest of the three arguments. We could also have invoked V′′(x)=24x−280V''(x)=24x-280, which equals −144-144 at 5.665.66, so it is negative, so a maximum. One argument is enough, provided it is written down.

Step 6

V(5.66)=5.66×18.68×28.68≈3032V(5.66)=5.66\times 18.68\times 28.68\approx 3032 cm3^{3}. Check: V(5)=3000V(5)=3000 and V(6)=3024V(6)=3024, both smaller ✓.

Why

Two ten-second evaluations that confirm the maximum without differentiating again. They also catch arithmetic errors in the expansion of the triple product.

The conclusion, written out

By cutting out squares of side x=35−3253≈5.66x=\frac{35-\sqrt{325}}{3}\approx 5.66 cm, we get a box 28.728.7 cm by 18.718.7 cm and 5.665.66 cm high, whose volume of 30323032 cm3^{3} is maximal over the whole admissible domain (0,15)\left(0, 15\right).

The classic mistake on this problem: Writing V(x)=x(30−x)(40−x)V(x)=x(30-x)(40-x), forgetting that each dimension loses xx at EACH end. The critical number is then no longer x≈5.66x\approx 5.66 but another value, and the whole problem is wrong despite a flawless method.

Learn by heart

  • • Objective function: what the question asks you to optimize. Constraint: what is given, fixed, available.
  • • The constraint serves to ELIMINATE a variable. Never differentiate an expression in two unknowns.
  • • Physical domain: combine all the positivity conditions; the most restrictive wins.
  • • Explicitly rule out the roots outside the domain: that sentence earns marks.
  • • Shortest justification: the only critical number in the domain, with a change of sign of f′f'.
  • • CLOSED interval: also compare at both endpoints. OPEN interval: the endpoints are not reached.
  • • Economics: maximum profit where marginal revenue equals marginal cost, never at the maximum of revenue.
  • • Remarkable answers to know: the square, h=2rh=2r for a can, h=rh=r for the Norman window.

Frequently asked questions

How do I recognize the constraint and the function to optimize?

The function to optimize is the one whose maximum or minimum the question asks for, often an area, a volume, a cost or a time. The constraint is the quantity fixed by the statement, the one that is available or imposed. The words given, available, fixed, imposed almost always signal the constraint.

Why must a variable be eliminated before differentiating?

Because an ordinary derivative is computed with respect to a single variable only. As long as the objective function depends on two unknowns, there is nothing to solve. The constraint provides the relation that expresses one in terms of the other and brings the problem down to a single variable.

How do I justify that a critical number really is a maximum?

Three possible arguments. On a closed bounded interval, compare the function at the critical numbers and at both endpoints. If there is only one critical number and the derivative changes sign there, the local maximum is absolute. Otherwise, use the sign of the second derivative, which must be strictly negative.

Why is the domain so important in optimization?

Because the algebraic formula can still be computed outside its physical meaning and often produces a second, spurious root. For a box cut from a sheet of cardboard thirty by forty, the derivative vanishes twice, and only the domain rules out the value that would give negative dimensions.

Is profit maximal when revenue is maximal?

No, almost never. Profit is revenue minus cost, so it is maximal where marginal revenue equals marginal cost. As long as the next unit sold brings in more than it costs, production should continue, and it stops before the maximum of revenue as soon as the cost is increasing.

Why is an optimal can as tall as it is wide?

Because for a fixed volume, the total surface area is minimal when the height is twice the radius, that is, when the height equals the diameter. The computation shows it by setting to zero the derivative of the area expressed in terms of the radius alone. It is an excellent consistency check on this type of problem.

Practise it

Corrected exercises: Applied optimization, 201-SN2-RE

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.

  • 15 corrected exercises
  • 150 points
  • 225 minutes
Do the exercises
Something missing from this sheet? A method, a trap, an exercise to practise it, a mistake you spotted: tell me, I read every request.

Sending goes through your free space: that is how I can answer you and tell you when the exercise is added. An email is enough, no password. Create your space. Rather not create an account? Write to me directly.

What is it about?
I read every request myself, nobody else sees it. No need to write your name or your school.
When your request is dealt with, you hear about it by email and in your space.

By sending, you agree that I read your request to answer it. It is kept with your account, erased with it, and never published: privacy policy.

Previous sheet Function analysis and curve sketching Next sheet Elementary integration (antiderivatives)

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

See also

Looking for a 201-SN2-RE tutor in Montreal?

Get in touch for a first session. We go back over the moves that cost marks on the differential calculus exam, then we test them on exercises at the level of real CEGEP tests.

Site by Studio Squalli