Tasks 05 - Single Variable Optimization
Mathematics for Master Students
These problems accompany Session 05 of the tutorial. Work through them at your own pace before the next session. We start Session 06 with your questions. On the website, every problem has a fully worked solution you can expand to check yourself. The PDF version contains only the problems, so you can print it and use it as a worksheet.
The problems are staged: the first two are warm-ups, the middle ones practice the core techniques, and the last two are at the level of the mock exam. Throughout, the recipe is always the same: differentiate, solve \(f'(x) = 0\) for the candidates, then let \(f''\) decide.
Problem 1: Find and Classify the Vertex
For each function, find the stationary point via the first-order condition \(f'(x) = 0\), classify it with the second-order condition \(f''\), and give the extreme value.
- \(f(x) = x^2 - 6x + 11\)
- \(g(x) = -x^2 + 10x - 3\)
The first-order condition (FOC) finds the candidate; the second-order condition (SOC) names its type: \(f''(x^*) > 0\) a minimum, \(f''(x^*) < 0\) a maximum.
Differentiate and solve the FOC: \(f'(x) = 2x - 6 = 0 \;\Rightarrow\; x = 3\). Classify: \(f''(x) = 2 > 0\) → convex → local minimum. Value: \(f(3) = 9 - 18 + 11 = 2\). The vertex is the minimum \((3, 2)\).
Differentiate and solve the FOC: \(g'(x) = -2x + 10 = 0 \;\Rightarrow\; x = 5\). Classify: \(g''(x) = -2 < 0\) → concave → local maximum. Value: \(g(5) = -25 + 50 - 3 = 22\). The vertex is the maximum \((5, 22)\).
The sign of the leading coefficient told the story in advance: an upward parabola turns at a minimum, a downward one at a maximum.
Problem 2: Convex, Concave, and the Inflection Point
Consider \(f(x) = x^3 - 6x^2 + 5\).
- Find \(f''(x)\).
- On which interval is \(f\) convex, and on which is it concave?
- Find the inflection point, where the bend switches.
Curvature is read from the second derivative: \(f'' > 0\) is convex (bends up), \(f'' < 0\) is concave (bends down).
Differentiate twice: \[f'(x) = 3x^2 - 12x, \qquad f''(x) = 6x - 12 = 6(x - 2)\]
The sign of \(f''(x) = 6(x - 2)\) flips at \(x = 2\):
- For \(x < 2\): \(f''(x) < 0\) → concave.
- For \(x > 2\): \(f''(x) > 0\) → convex.
The bend switches exactly where \(f''(x) = 0\), at \(x = 2\). The height there is \[f(2) = 8 - 24 + 5 = -11,\] so the inflection point is \((2, -11)\). Note this is not an extremum: \(f'(2) = 3 \cdot 4 - 24 = -12 \neq 0\), so the graph is still falling as it passes through, merely changing how it curves.
Problem 3: Two Stationary Points
A cubic can have a peak and a valley. For \(f(x) = x^3 - 6x^2 + 9x + 1\):
- Find all stationary points via the FOC.
- Classify each with the SOC, and give its value.
- Is either one the global maximum or minimum of \(f\) on all of \(\mathbb{R}\)?
Differentiate and factor, the stationary points are the roots of \(f'\): \[f'(x) = 3x^2 - 12x + 9 = 3(x^2 - 4x + 3) = 3(x - 1)(x - 3)\] Setting \(f'(x) = 0\) gives \(x = 1\) and \(x = 3\).
Classify with \(f''(x) = 6x - 12\):
- At \(x = 1\): \(f''(1) = -6 < 0\) → local maximum, value \(f(1) = 1 - 6 + 9 + 1 = 5\), so \((1, 5)\).
- At \(x = 3\): \(f''(3) = 6 > 0\) → local minimum, value \(f(3) = 27 - 54 + 27 + 1 = 1\), so \((3, 1)\).
Neither. As \(x \to +\infty\), \(f(x) \to +\infty\) (higher than the local max at \(5\)); as \(x \to -\infty\), \(f(x) \to -\infty\) (lower than the local min at \(1\)). On the unbounded domain \(\mathbb{R}\) there is no global optimum at all: these extrema are only local.
A flat tangent alone does not prove a peak or a valley. \(f'(x^*) = 0\) makes \(x^*\) only a candidate: always run the SOC. Skipping it can hand you a saddle point (like \(x^3\) at \(0\), where \(f' = f'' = 0\) yet the graph keeps rising) dressed up as an extremum.
Problem 4: Global Optima on a Closed Interval
Find the global maximum and global minimum of \(f(x) = x^3 - 12x + 5\) on the closed interval \([0, 3]\).
On a closed interval the global optimum sits either at an interior stationary point or at an endpoint, so we build a short candidate list and compare.
Step 1 - Stationary points inside \((0, 3)\). Solve the FOC: \[f'(x) = 3x^2 - 12 = 3(x^2 - 4) = 3(x - 2)(x + 2) = 0 \;\Rightarrow\; x = 2 \ \text{ or } \ x = -2\] Only \(x = 2\) lies in \((0, 3)\); discard \(x = -2\).
Step 2 - Evaluate at the stationary point and both endpoints: \[f(0) = 5, \qquad f(2) = 8 - 24 + 5 = -11, \qquad f(3) = 27 - 36 + 5 = -4\]
Step 3 - Compare the list \(\{5,\ -11,\ -4\}\): - Global maximum: \(f(0) = 5\), at the endpoint \(x = 0\). - Global minimum: \(f(2) = -11\), at the interior stationary point \(x = 2\).
The interior stationary point turned out to be the minimum; the maximum sits at the boundary. (Sanity check: \(f''(2) = 12 > 0\), so \(x = 2\) is indeed a local min, consistent with it being the lowest point.)
Finding the stationary points but forgetting the endpoints. Here that would report \(-11\) as the answer and miss the true maximum entirely, which lives at the edge \(x = 0\). On a closed interval, the endpoints are always candidates.
Problem 5: A Binding Capacity Limit
A workshop’s daily profit from producing \(q\) units is \[\pi(q) = -0.5q^2 + 60q - 400 \quad \text{(in €)}.\] The plant can make at most \(50\) units per day, so \(q \in [0, 50]\).
- Find the unconstrained profit-maximizing quantity from the FOC.
- Is that quantity feasible? If not, find the best feasible output and the profit there.
FOC: \(\pi'(q) = -q + 60 = 0 \;\Rightarrow\; q = 60\). The SOC \(\pi''(q) = -1 < 0\) confirms this is a maximum (the profit parabola opens downward).
The unconstrained optimum \(q = 60\) lies outside the feasible interval \([0, 50]\). Check the slope at the capacity edge: \[\pi'(50) = -50 + 60 = 10 > 0,\] so profit is still rising as we reach the limit. The best feasible choice is therefore the boundary \(q = 50\), with \[\pi(50) = -0.5 \cdot 2500 + 60 \cdot 50 - 400 = -1250 + 3000 - 400 = 1350,\] that is €1350. A binding capacity limit is the optimum: you would produce more if you could, so you produce right up to the edge.
Problem 6: Profit Maximization from a Demand Curve
A parcel service faces the linear demand \(q = 120 - 2p\), where \(p\) is the price in € and \(q\) the number of parcels. Its cost of handling \(q\) parcels is \(C(q) = 10q + 300\) (€).
- Write revenue \(R(q)\) and profit \(\pi(q) = R(q) - C(q)\) as functions of \(q\).
- Find the profit-maximizing quantity from the FOC, and confirm it with the SOC.
- Verify that marginal revenue equals marginal cost there.
- Find the optimal price and the maximum profit.
Step 1 - Build the profit function. Invert the demand to price the parcels: from \(q = 120 - 2p\) we get \(p = 60 - \tfrac{1}{2}q\). Revenue is price times quantity: \[R(q) = p \cdot q = \left(60 - \tfrac{1}{2}q\right)q = 60q - 0.5q^2\] Then subtract cost term by term: \[\pi(q) = R(q) - C(q) = (60q - 0.5q^2) - (10q + 300) = -0.5q^2 + 50q - 300\]
Step 2 - FOC and SOC. \[\pi'(q) = -q + 50 = 0 \;\Rightarrow\; q = 50, \qquad \pi''(q) = -1 < 0 \ \Rightarrow \ \text{maximum}\]
Step 3 - Marginal revenue meets marginal cost. \(R'(q) = 60 - q\) and \(C'(q) = 10\), so \[R'(50) = 60 - 50 = 10 = C'(50). \ \checkmark\] At the optimum the next parcel earns exactly what it costs: the business form of \(\pi'(q) = 0\).
Step 4 - Price and profit. The optimal price is \[p = 60 - \tfrac{1}{2}(50) = 60 - 25 = 35,\] so €35 per parcel, and the maximum profit is \[\pi(50) = -0.5 \cdot 2500 + 50 \cdot 50 - 300 = -1250 + 2500 - 300 = 950,\] that is €950.
Sanity check. At \(p = 35\): demand \(q = 120 - 70 = 50\) ✓, revenue \(35 \cdot 50 = 1750\), cost \(10 \cdot 50 + 300 = 800\), profit \(1750 - 800 = 950\) ✓. Note the fixed cost €300 shifted the profit down but never touched the optimal quantity: it vanishes under differentiation.
Problem 7: Economic Order Quantity
A distribution center faces steady annual demand of \(D = 4500\) units. Each order costs a fixed \(K = 60\) (€) to place regardless of size, and holding one unit in stock costs \(h = 6\) (€) per year. Ordering \(q\) units at a time gives the annual total cost \[T(q) = \frac{D}{q}\,K + \frac{q}{2}\,h.\]
- Substitute the numbers and find the economic order quantity \(q^*\) from the FOC.
- Confirm with the SOC that \(q^*\) minimizes cost.
- How many orders per year is that, and what are the ordering, holding, and total costs at \(q^*\)?
- If annual demand quadruples to \(D = 18000\), what happens to \(q^*\)? Answer using the EOQ formula \(q^* = \sqrt{2DK/h}\), without recomputing from scratch.
Step 1 - Set up. With \(D = 4500\), \(K = 60\), \(h = 6\): \[T(q) = \frac{4500 \cdot 60}{q} + \frac{6}{2}\,q = \frac{270000}{q} + 3q\]
Step 2 - FOC. Rewrite \(\frac{270000}{q} = 270000\,q^{-1}\) and differentiate: \[T'(q) = -\frac{270000}{q^2} + 3 = 0 \;\Rightarrow\; q^2 = \frac{270000}{3} = 90000 \;\Rightarrow\; q^* = 300\] Check: the boxed formula gives the same value: \(q^* = \sqrt{2DK/h} = \sqrt{\tfrac{2 \cdot 4500 \cdot 60}{6}} = \sqrt{90000} = 300\). ✓
Step 3 - SOC. \(T''(q) = \dfrac{540000}{q^3} > 0\) for every \(q > 0\) → convex → minimum. ✓
Step 4 - Read the optimum. At \(q^* = 300\): - Orders per year: \(D / q^* = 4500 / 300 = 15\). - Ordering cost: \(\frac{D}{q^*}K = 15 \cdot 60 = 900\), i.e. €900. - Holding cost: \(\frac{q^*}{2}h = 150 \cdot 6 = 900\), i.e. €900. - Total: €1800. The two costs come out equal: that balance is exactly what the EOQ achieves.
Step 5 - Sensitivity. The formula shows \(q^* \propto \sqrt{D}\). Quadrupling \(D\) multiplies \(q^*\) by \(\sqrt{4} = 2\), so the new order quantity is \(q^* = 600\). Four times the demand calls for only double the order size: the square root tames the growth.