Mathematics for Master Students
Which tasks gave you trouble? Bring them up now. We take the time to go through them before we move on to today’s topic.
Question
The roastery’s revenue is \(R(p) = 1200p - 20p^2\). Differentiate. At which price is the tangent horizontal?
Session 4 left the roastery’s question open: profit \(\pi(p) = -20p^2 + 1300p - 6200\) peaks at €32.50, but the roastery roasts at most 500 bags a week. Today: find where any smooth curve is flat, then check the boundaries.
Question
The roastery’s profit \(\pi(p) = -20p^2 + 1300p - 6200\) peaks at €32.50. What is the slope of the tangent there?
Zero: left of the top profit still rises with the price; right of it profit falls, and at the top the tangent is flat.
Optimisation means finding the input \(x\) that makes \(f(x)\) as large or as small as possible.
For the roastery, \(\pi'(p) = -40p + 1300 = 0 \Rightarrow p = 32.5\)
The same answer as Session 3's vertex formula \(-\frac{b}{2a} = \frac{1300}{40}\), but no parabola formula needed.
This works for any smooth \(f\), parabola or not. A point \(x^*\) where the tangent is flat is a stationary point:
\[f'(x^*) = 0 \qquad \text{the first-order condition (FOC)}\]
An extremum of a continuous function can only sit in one of three kinds of place:
For the smooth business functions in this tutorial, the first two cover almost everything, and stationary points come first.
Take \(f(x) = x^3 - 3x^2 - 9x + 5\). Where are its stationary points?
Always factor \(f'(x)\) if you can: the stationary points are just its roots, and a factored form hands them to you directly.
Question
Where are the stationary points of \(\;f(x) = x^3 - 12x\;\)?
\[f'(x) = 3x^2 - 12 = 3(x^2 - 4) = 3(x - 2)(x + 2) = 0\]
\[\Rightarrow \quad x = 2 \ \text{ or } \ x = -2\]
Common Mistake
Solving \(x^2 = 4\) as “\(x = 2\)” loses half the candidates. A square root has two signs; keep them both until the second-order condition sorts them.
Session 4 promised: the best output is where marginal revenue meets marginal cost. Here is why.
Profit is revenue minus cost: \(\;\pi(q) = R(q) - C(q)\).
The first-order condition \(\pi'(q) = 0\) becomes:
\[\pi'(q) = R'(q) - C'(q) = 0 \quad \Longleftrightarrow \quad R'(q) = C'(q)\]
Question
The roastery counted in bags (Session 4): \(\tilde R'(q) = 60 - \frac{q}{10}\), \(C'(q) = 5\). Profit maximal output?
\[60 - \frac{q}{10} = 5 \quad \Rightarrow \quad q = 550 \text{ bags}\]
Check: \(D(32.50) = 1200 - 650 = 550\), the FOC’s price seen in bags. But the roastery roasts at most 500 bags a week: keep that in mind.
Question
Both tangents of \(f(x) = x^3 - 3x^2 - 9x + 5\) are flat. What tells the peak from the valley, without looking at the whole graph?
The chord at \(x = 3\) lies above: holds water, a valley.
At \(x = -1\) it lies below: spills water, a peak.
Session 4's \(f''\) reads the bend as a sign. At a stationary point \(x^*\):
Back to \(f(x) = x^3 - 3x^2 - 9x + 5\): \(f''(x) = 6x - 6\)
| \(x^*\) | \(f''(x^*)\) | verdict | \(f(x^*)\) |
|---|---|---|---|
| \(-1\) | \(-12 < 0\) | maximum | \(10\) |
| \(3\) | \(12 > 0\) | minimum | \(-22\) |
What we just did for the cubic, as a recipe for every interior candidate:
Question
Back to \(f(x) = x^3 - 12x\) with stationary points \(x = 2\) and \(x = -2\). Which is which?
| (a) Maximum at \(2\), minimum at \(-2\) | (b) Minimum at \(2\), maximum at \(-2\) |
| (c) Both are minima | (d) The test is inconclusive |
(b), with \(f''(x) = 6x\):
| \(x^*\) | \(f''(x^*)\) | verdict | \(f(x^*)\) |
|---|---|---|---|
| \(2\) | \(12 > 0\) | minimum | \(8 - 24 = -16\) |
| \(-2\) | \(-12 < 0\) | maximum | \(-8 + 24 = 16\) |
Both have \(f'(0) = 0\) and \(f''(0) = 0\). Yet \(x^3\) keeps rising (a saddle point), while \(x^4\) has a minimum.
Question
The FOC put the roastery’s candidate at €32.50, with \(\pi'(p) = -40p + 1300\). Differentiate once more: what is €32.50?
| (a) A local maximum, \(\pi'' = 40\) | (b) A local minimum, \(\pi'' = -40\) |
| (c) A local maximum, \(\pi'' = -40\) | (d) Undecided, \(\pi'' = 0\) |
(c): \(\pi''(p) = -40 < 0\): concave, it spills water, a peak.
Question
The roastery’s profit \(\pi(p) = -20p^2 + 1300p - 6200\) peaks at €32.50. The roastery roasts at most 500 bags a week. Should the roastery charge €32.50?
Question
Counted in bags, the roastery’s profit is concave with its peak at \(q = 550\). What is the best output if it can roast at most 450 bags? And with a bigger roaster, at most 600? Shout both numbers.
A local optimum is best only in its neighbourhood:
Question
The roastery’s average cost \(A(q) = 200/q + 5\) never drops below €5. What is the lowest average cost the roastery can actually reach?
The roastery’s €35 was this recipe: no stationary point inside \([35, 60]\), so an endpoint won. In general, compare a short list:
Common Mistake
Finding stationary points but forgetting the endpoints. The global optimum often sits at a boundary: skip it and you get the wrong answer.
On all of \(\mathbb{R}\), \(f(x) = x^3 - 3x^2 - 9x + 5\) has no global optimum; on \([0, 5]\) the Extreme Value Theorem guarantees a global max and min. Of its stationary points \(-1\) and \(3\), only \(3\) lies inside:
| candidate | \(f(x)\) |
|---|---|
| \(x = 0\) (endpoint) | \(5\) |
| \(x = 3\) (stationary) | \(-22\) |
| \(x = 5\) (endpoint) | \(10\) |
Largest value \(10\): the global max sits at the boundary \(x = 5\). Smallest value \(-22\): the global min is the stationary point \(x = 3\).
Question
Find the global maximum of \(f(x) = x^2 - 4x\) on \([0, 5]\). Shout the maximum value.
\(f'(x) = 2x - 4 = 0\) gives the stationary point \(x = 2\):
| candidate | \(f(x)\) |
|---|---|
| \(x = 0\) (endpoint) | \(0\) |
| \(x = 2\) (stationary) | \(4 - 8 = -4\) |
| \(x = 5\) (endpoint) | \(25 - 20 = 5\) |
The global max is \(5\) at the endpoint \(x = 5\); the stationary point is the global minimum.
The roastery’s next bag always costs €5. Session 4's print shop is different: its next unit gets dearer. From here on \(C\), \(R\) and \(\pi\) are the print shop’s: \(C(q) = 0.5q^2 + 10q + 200\), and to sell more it must cut the price to \(100 - 0.5q\), so \(R(q) = 100q - 0.5q^2\).
Profit = vertical gap between the curves. Guess the \(q\) where it is widest.
Subtract cost from revenue, term by term:
\[\pi(q) = (100q - 0.5q^2) - (0.5q^2 + 10q + 200)\]
\[\pi(q) = -q^2 + 90q - 200\]
Question
The rent goes up: fixed costs rise from \(200\) to \(500\), so \(C(q) = 0.5q^2 + 10q + 500\). What happens to the optimal output \(q = 45\) and to the maximum profit?
| (a) \(q\) falls, profit falls | (b) \(q\) rises, profit falls |
| (c) \(q\) unchanged, profit falls by \(300\) | (d) \(q\) unchanged, profit unchanged |
(c): \(\pi(q) = -q^2 + 90q - 500\) has the same derivative \(\pi'(q) = -2q + 90\), so the FOC still gives \(q = 45\); the constant only shifts the curve down.
Fixed costs never change the decision, only the result. That is the practical meaning of “constants differentiate to zero”.
Question
Demand improves and revenue becomes \(R(q) = 120q - 0.5q^2\), cost stays \(C(q) = 0.5q^2 + 10q + 200\). What is the new optimal output? Shout the number.
The roastery’s average cost only falls towards €5: a floor, not a minimum. The print shop’s differs:
\[A(q) = \frac{C(q)}{q} = \frac{200}{q} + 10 + 0.5q\]
Guess the \(q\) at the bottom.
\[A(q) = C(q)/q = 200/q + 10 + 0.5q\]
Notice the shape \(\frac{a}{q} + bq\): a falling term against a rising one. Next, the most famous formula in inventory management shares it.
The warehouse sells \(1000\) units a year. Every order costs €80 (truck, paperwork). Every unit on the shelf costs €4 a year. Order all at once, or a little every week?
Order \(q\) units at a time: stock jumps to \(q\) at each delivery, then drains to zero before the next one arrives.
Question
You switch to larger orders \(q\), same annual demand. What happens to the yearly ordering cost and the yearly holding cost?
| (a) Ordering cost rises, holding cost falls | (b) Ordering cost falls, holding cost rises |
| (c) Both fall | (d) Both rise |
(b): fewer orders per year, so fewer €80 bills; but a higher average stock \(q/2\), so more €4 shelf costs.
This makes the total cost U-shaped, and a U has a bottom to find.
We want the order size \(q\) that minimises total cost, the economic order quantity (EOQ).
The two dashed cost curves cross exactly under the bottom of the total.
Replace \(1000\), \(80\) and \(4\) by any demand \(D\), order cost \(K\) and holding cost \(h\) (\(K\) is the cost per order, not capital), so \(T(q) = DK/q + hq/2\). The FOC \(T'(q) = -DK/q^2 + h/2 = 0\) solves in symbols:
\[q^2 = 2DK/h \;\Rightarrow\; \boxed{\,q^* = \sqrt{2DK/h}\,}\]
Question
Annual demand \(D = 1800\) units, \(K = 25\) per order, holding cost \(h = 4\) per unit and year. What is the economic order quantity? Shout the number.
\[q^* = \sqrt{\frac{2 \cdot 1800 \cdot 25}{4}} = \sqrt{\frac{90000}{4}} = \sqrt{22500} = 150\]
Question
A supplier doubles the fixed cost \(K\) per order. According to \(q^* = \sqrt{\frac{2DK}{h}}\), does the economic order quantity rise or fall, and by how much?
That’s it for today.
Any Questions?
The recipe is always the same: differentiate, set \(f' = 0\) and solve, let \(f''\) decide, then compare with the endpoints. Name the goal (maximise or minimise) and the sign of \(f''\) you want follows.
See you there, and bring your questions!
Session 05 - Single Variable Optimisation | Dr. Tobias Vlćek | Home