Mathématiques • Physique • Chimie
Préparation au CEGEP | Exercices • Défis • Corrections
Étudier. Pratiquer. Progresser. Study. Practice. Improve.
📝
Exercices Practice problems
💡
Défis Challenges
✓
Corrections Detailed solutions
📖
Concepts Deeper understanding
StudyGroup AN educational mascot

Optimization in Differential Calculus: the 4-Step Method, 2 Complete Examples and 5 Solved Exercises

Version française

In differential calculus, we've started section 4.4: optimization. The goal is to find the maximum or minimum of a quantity in a real problem: the largest area, the lowest cost, the shortest distance… Our teacher was very clear: on the exam, he marks every step of the method. Here's the 4-step method, two complete examples and 5 solved exercises.

Level: CEGEP — Differential Calculus (section 4.4)
Topics: objective function, constraint, domain, critical numbers, absolute extremum, sign chart
Prerequisites: increasing, decreasing and extrema (4.1 and 4.2)

Table of Contents

  1. The idea of optimization
  2. The 4-step method
  3. Example 1: the field along a river
  4. Example 2: the 500 mL can
  5. 5 solved exercises
  6. What the teacher marks

1. The idea of optimization

  • We look for the extremum (maximum or minimum) of a quantity. The function that gives this quantity is called the objective function.
  • In high school, we optimized linear functions of two variables with constraints (inequalities). Here, the functions aren't linear, and we always reduce to a function of a single variable.
  • It's one of the most widely used topics in applied mathematics: economics, physics, engineering, biology.

2. The 4-step method

Step 1 — Translate into math

  • Draw a diagram, even if none is given, with the variables on it.
  • Define the variables in words, with the units from the problem.
  • Name the quantity to optimize (with a capital letter, for example \(A\) for an area) and write "Maximize \(A\)" or "Minimize \(A\)".
  • Write the constraint: it's always an equation (an = sign) linking the variables.

Step 2 — Objective function of one variable and its domain

  • Express the quantity with the variables, then use the constraint to eliminate one variable. Isolate whichever is easiest to isolate.
  • Give the domain from the context (positive lengths, for example). Careful: the domain depends on which variable you keep.

Step 3 — Optimize

  • Forget the context and look for the absolute extremum of the function on its domain.
  • Critical numbers: both cases, \(f'=0\) and \(f'\) doesn't exist. Write the second case even if it gives nothing.
  • Make the sign chart of the derivative over the whole domain to prove the extremum is absolute. A critical number on its own isn't enough.
  • The second derivative test is allowed, but it only proves a local extremum: you then have to justify the absolute one another way.

Step 4 — Answer

  • Calculate everything the question asks for.
  • Answer with a complete sentence, without variable symbols, that clearly names each dimension.
Consistent notation: if your function is called \(A\), write \(A(x)\) and \(A'(x)\), never \(f(x)\). The teacher takes off points for this switch.

3. Example 1: the field along a river

A farmer has 1600 m of fencing for a rectangular field along a straight river. He doesn't fence the side along the river. What dimensions give the largest area?

Diagram of a rectangular field along a river: two sides of length x and one side of length y are fenced, with 2x + y = 1600 m

1. Translation

  • \(x\): depth of the field (perpendicular to the river), in m; \(y\): length of the field (parallel to the river), in m.
  • \(A\): area of the field, in m². Maximize \(A\).
  • Constraint (the fence): \(2x+y=1600\).

2. Objective function and domain

\[A=xy,\quad y=1600-2x\ \Rightarrow\ A(x)=1600x-2x^2\]

We need \(x\gt0\) and \(y\gt0\), so \(1600-2x\gt0\), i.e. \(x\lt800\). Domain: \((0,\,800)\). (Had we kept \(y\), the domain would be \((0,\,1600)\).)

3. Optimization

\[A'(x)=1600-4x=0\ \Rightarrow\ x=400\]

\(A'(x)\) exists everywhere (polynomial): no other critical number.

x0\((0,\,400)\)400\((400,\,800)\)800
\(A'(x)\)∄+0−∄
\(A(x)\)excluded endpoint↗absolute max↘excluded endpoint

4. Answer

With \(x=400\), \(y=1600-800=800\). The area is largest with a field 400 m deep and 800 m long along the river. (The area, 320,000 m², wasn't asked for.)

Don't just answer "400 × 800": nobody would know which side runs along the river!


4. Example 2: the 500 mL can

A company makes a closed cylindrical metal can that holds 500 mL. What dimensions minimize the amount of metal (and so the cost)?

1. Translation

  • \(r\): radius of the base, in cm; \(h\): height, in cm. Since \(1\ \text{mL}=1\ \text{cm}^3\), we work in cm.
  • \(A\): total area of metal, in cm². Minimize \(A\).
  • Constraint (the volume): \(\pi r^2h=500\).

2. Objective function and domain

Area = bottom + top (\(2\pi r^2\)) + side. Unrolled, the side is a rectangle of width \(2\pi r\) (the circumference) and height \(h\). We isolate \(h\), simpler than \(r\) (which would give a square root).

\[A=2\pi r^2+2\pi rh,\quad h=\frac{500}{\pi r^2}\ \Rightarrow\ A(r)=2\pi r^2+\frac{1000}{r}\]

Domain: \((0,\,+\infty)\). There's no upper bound: if \(r\) is very large, \(h\) becomes very small but stays positive. As \(r\to0^+\), the side area blows up; as \(r\to+\infty\), the top and bottom blow up. So we expect a minimum somewhere in between.

Graph of the area A(r) = 2πr² + 1000/r of a 500 mL can, with the absolute minimum at r ≈ 4.30 cm

3. Optimization

\[A'(r)=4\pi r-\frac{1000}{r^2}=0\ \Rightarrow\ 4\pi r^3=1000\ \Rightarrow\ r^3=\frac{250}{\pi}\ \Rightarrow\ r=\sqrt[3]{\frac{250}{\pi}}\approx4.30\ \text{cm}\]

\(A'(r)\) doesn't exist at \(r=0\), but that value is outside the domain. Sign chart: \(A'\lt0\) before \(\sqrt[3]{250/\pi}\) and \(A'\gt0\) after, so it's an absolute minimum on \((0,\,+\infty)\).

4. Answer

\[h=\frac{500}{\pi r^2}=2\sqrt[3]{\frac{250}{\pi}}=2r\approx8.60\ \text{cm}\]

The amount of metal is smallest with a radius of \(\sqrt[3]{250/\pi}\) cm (about 4.3 cm) and a height of \(2\sqrt[3]{250/\pi}\) cm (about 8.6 cm): the height equals the diameter.

On the exam, with no calculator, leave the answer in exact form with the cube root.

Going further: of all closed surfaces that enclose a given volume, the sphere has the smallest area. That's why soap bubbles are round! The optimal cylinder (height = diameter) is the most "compact" cylinder. On the other hand, there's no maximum area for a given volume: the alveoli in our lungs, deeply folded, offer a huge exchange surface.

5. 5 solved exercises

For each exercise, follow the 4 steps. Try it before opening the solution.

Exercise 1 — A pen in two parts

With 600 m of fencing, we want to build a rectangular pen divided into two equal parts by a fence parallel to one of the sides. What dimensions give the largest total area?

Show the solution

1. \(x\): length of the 3 sides parallel to the divider (m); \(y\): length of the other 2 sides (m). \(A\): total area (m²). Maximize \(A\). Constraint: \(3x+2y=600\).

2. \(y=\dfrac{600-3x}{2}\), so \(A(x)=xy=\dfrac{600x-3x^2}{2}\). Domain: \(x\gt0\) and \(y\gt0\), so \((0,\,200)\).

3. \(A'(x)=\dfrac{600-6x}{2}=300-3x=0\Rightarrow x=100\). \(A'\) exists everywhere. \(A'\gt0\) on \((0,\,100)\) and \(A'\lt0\) on \((100,\,200)\): absolute maximum.

4. \(y=\dfrac{600-300}{2}=150\). The area is largest with the three sides parallel to the divider 100 m long and the other two sides 150 m long (area of 15,000 m²).

Exercise 2 — The open-top box

A square of side \(x\) is cut from each corner of a 30 cm square sheet, and the edges are folded up to make an open box. What value of \(x\) gives the largest volume?

Show the solution

1. \(x\): side of the cut squares, so the height of the box (cm). \(V\): volume (cm³). Maximize \(V\). The base is a square of side \(30-2x\).

2. \(V(x)=x(30-2x)^2\). Domain: \(x\gt0\) and \(30-2x\gt0\), so \((0,\,15)\).

3. \(V'(x)=(30-2x)^2+x\cdot2(30-2x)(-2)=(30-2x)(30-6x)\). \(V'=0\) for \(x=15\) (outside the domain) or \(x=5\). \(V'\) exists everywhere. \(V'\gt0\) on \((0,\,5)\) and \(V'\lt0\) on \((5,\,15)\): absolute maximum at \(x=5\).

4. The volume is largest when 5 cm squares are cut out: the box is then 20 cm × 20 cm × 5 cm, with a volume of 2000 cm³.

Exercise 3 — The closest point

Find the point on the curve \(y=\sqrt{x}\) closest to the point \((3,\,0)\).

Show the solution

1. \((x,\,\sqrt x)\): a point on the curve. \(d\): its distance to \((3,\,0)\). Minimize \(d\).

2. \(d=\sqrt{(x-3)^2+(\sqrt x)^2}\). Trick: \(d\) is smallest exactly when \(d^2\) is, and \(d^2\) has no square root. So we minimize \(D(x)=(x-3)^2+x\) on the domain \([0,\,+\infty)\).

3. \(D'(x)=2(x-3)+1=2x-5=0\Rightarrow x=\frac52\). \(D'\) exists everywhere. \(D'\lt0\) before \(\frac52\) and \(D'\gt0\) after: absolute minimum.

4. The closest point is \(\left(\frac52,\,\sqrt{\frac52}\right)\approx(2.5,\ 1.58)\), at a distance of \(\sqrt{\frac{11}{4}}=\frac{\sqrt{11}}{2}\approx1.66\).

Exercise 4 — Materials with different prices

Take the 500 mL can from example 2 again, but now the metal for the top and bottom costs twice as much as the metal for the side. What dimensions minimize the cost?

Show the solution

1. \(r\), \(h\) in cm. If the side costs \(k\) per cm², the top and bottom cost \(2k\). \(C\): total cost. Minimize \(C\). Constraint: \(\pi r^2h=500\).

2. \(C=2k(2\pi r^2)+k(2\pi rh)\). With \(h=\frac{500}{\pi r^2}\): \(C(r)=k\left(4\pi r^2+\dfrac{1000}{r}\right)\). Domain: \((0,\,+\infty)\).

3. \(C'(r)=k\left(8\pi r-\dfrac{1000}{r^2}\right)=0\Rightarrow r^3=\dfrac{125}{\pi}\Rightarrow r=\dfrac{5}{\sqrt[3]{\pi}}\approx3.41\ \text{cm}\). \(C'\lt0\) before and \(C'\gt0\) after: absolute minimum.

4. \(h=\dfrac{500}{\pi r^2}=4r\approx13.7\ \text{cm}\). The cost is lowest with a radius of \(\frac{5}{\sqrt[3]{\pi}}\) cm (about 3.4 cm) and a height of \(\frac{20}{\sqrt[3]{\pi}}\) cm (about 13.7 cm). It makes sense: the top and bottom are more expensive, so they shrink and the can gets taller.

Exercise 5 — Find the mistakes

For the field example, a student writes: "\(f(x)=1600x-2x^2\), \(f'(x)=0\) gives \(x=400\), so it's the maximum. Answer: 400 × 800." What are the four mistakes?

Show the solution
  • No translation: no diagram, no variables defined with units, no "Maximize \(A\)" and no constraint.
  • Notation: the quantity is an area, so the function should be called \(A(x)\), not \(f(x)\). And the domain \((0,\,800)\) is missing.
  • Justification: a critical number doesn't prove an absolute maximum. The second case (\(A'\) doesn't exist) and a sign chart over the whole domain are needed.
  • Answer: "400 × 800" doesn't say which side runs along the river. A complete sentence with units is needed.

6. What the teacher marks

  • ☐ A diagram with the variables on it
  • ☐ Variables defined in words, with their units
  • ☐ "Maximize …" or "Minimize …" and the constraint (an equation)
  • ☐ The objective function of one variable and its domain
  • ☐ Both cases of critical numbers: \(f'=0\) and \(f'\) doesn't exist
  • ☐ The sign chart over the whole domain, to justify the absolute extremum
  • ☐ The same letter throughout: \(A\), \(A'\), not \(f\)
  • ☐ A complete answer sentence naming each dimension, with exact values if there's no calculator

Keep Reviewing

StudyGroup AN — Mathematics, physics and chemistry exercises and solutions for CEGEP students.
Review: Yootak Hong, PhD