Studying a function, and optimising it

Week 3 · Thursday 8 October 2026 · 10:00–13:00

Niccolò Salvini, PhD

MBA03 Research & Quantitative Business Methods · European School of Economics, Florence

Homework 2, at the board

PAPER · 15 minutes

One of you takes us through it. One drill, and then the one sentence of your memo you are least sure of.

Not an exam: the point is to see how you got there.

Last week, in one minute

Block AWhat a function is, once you have to use oneDomain first, always — written as an interval

Block BWhat happens near a point you cannot reach0/0 → factor, cancel, substitute. Average cost falls towards €400, never below

Block CWhat does one more bike do to profit?\pi'(q) = -8q + 1200: the 81st bike adds €560; zero at 150

Block DFrom the marginal back to the totalIntegrate, add + C, pin C with one known value. The integral of the marginal is the change in the total

Today the pieces become one procedure: the full study of a function — the whole midterm.

Arno Bikes, on one card

the firm
fixed cost €60,000 / month
variable cost €400 / bike
list price €1,000 / bike
demand p = 1600 - 4q

q = bikes per month. Nobody remembers this by heart: it stays on the slide.

the equations from
cost C(q) = 60{,}000 + 400q wk 1 · A
revenue at list price R(q) = 1{,}000q wk 1 · A
revenue with demand R(q) = pq = 1600q - 4q^2 wk 1 · B
profit = R - C \pi(q) = -4q^2 + 1200q - 60{,}000 wk 1 · B
average cost AC(q) = C(q)/q wk 2 · B
marginal profit \pi'(q) = -8q + 1200 wk 2 · C

At list price: break-even at 100 bikes. With demand: best output 150 bikes for €30,000; break-evens at ≈ 63 and ≈ 237.

Where we are

Wk Date What you can do by hand
1 24 Sep equations, quadratics, logs ✓
2 1 Oct functions, limits, the derivative ✓
3 8 Oct study a function; optimise
4 15 Oct interest, discounting, NPV
5 22 Oct bonds, duration, convexity

Today is the midterm.

Not a rehearsal of part of it: the whole mathematical content of the midterm is the seven-step study you will do this morning, applied to a cost, a revenue and a profit function.

There is a quiz in this session. It is short, it is not secret, and it covers weeks 1–3.

The seven steps, in the brief’s own words

1 domain — for which q does this mean anything? An interval.
2 limits — at the ends of the domain, and at any break: the asymptotes
3 range — what values the function actually takes
4 sign — where positive, where negative; the zeros are how you find out
5 maxima and minima — solve f'(q) = 0, then the sign of f'' names each one
6 convexity and inflection — where f'' changes sign
7 sketch — last, with every point above marked on it

These are the brief’s own seven words, in the brief’s own order. Answer in its vocabulary and the marker cannot miss what you have done.

Seven steps, watched once

The same profit function you already know, taken apart in the exam’s order.

Two blocks today, then the quiz

Block AThe study, done properlythe seven steps

Block A The study, done properly

Step by step on a function you know

\pi(q) = -4q^{2} + 1200q - 60{,}000

  1. Domain [0, +∞) for a quantity.
  2. Limits π(0) = −60,000; π(q) → −∞ as q → ∞. No asymptote: a polynomial has none.
  3. Range (−∞, 30,000] — it reaches its maximum and never exceeds it.
  4. Sign zeros at 63.4 and 236.6; positive between them.
  1. Max / min π'(q) = −8q + 1200 = 0 → q = 150; π''= −8 < 0, so a maximum, π(150) = 30,000.
  2. Convexity π''< 0 everywhere: concave throughout, no inflection.
  3. Sketch with all of the above marked.

Board sentence

f' finds the candidates; f'' says which kind each one is. Writing “maximum” without the second derivative earns nothing.

Limits at the edge: where the curve runs off the page

Step 2 asks for limits, and limits are how you find asymptotes — the lines the curve approaches and never meets. The resit asks for them by name.

Vertical. Look at the edge of the domain. f(q) = 7 ln(q + 3) is defined for q > −3, and

\lim_{q \to -3^{+}} 7\ln(q+3) = -\infty

so the line q = −3 is a vertical asymptote.

Horizontal. Look at infinity. AC(q) = 0.4q + 3 + 25/q has none: it grows without bound. But (60,000 + 400q)/q → 400, so y = 400 is one.

A sketch with no asymptote drawn, where one exists, is marked as an incomplete sketch.

The second derivative, in one line

f'' > 0 \;\Rightarrow\; \text{convex, holds water, a minimum} f'' < 0 \;\Rightarrow\; \text{concave, spills water, a maximum}

An inflection is where f'' changes sign: the curve stops bending one way and starts bending the other. In business that is where growth stops accelerating and begins to slow — the moment worth naming in a report.

Step 6, properly: what the second derivative is telling you

f' says whether the curve is going up or down. f'' says whether it is bending up or down. They are different questions, and the brief asks both.

f'' so f' is… the slope is… shape holds water?
> 0 increasing getting steeper (or less negative) convex yes — a bowl
< 0 decreasing getting flatter (or more negative) concave no — a dome
= 0 and changes sign at a peak or trough steepest, or flattest, right there inflection the switch

The confusion to clear

The maximum is where f' = 0: growth stops. The inflection is where f'' = 0: growth is fastest and stops accelerating. In a sales curve those are two different months, and a report that names the wrong one is wrong.

Step 6 on a cubic (D3)

f(q) = q^{3} - 12q^{2} + 36q,\qquad f'(q) = 3(q-2)(q-6),\qquad f''(q) = 6q - 24

q 0 → 2 2 2 → 4 4 4 → 6 6 6 → 10
f' + 0 − − − 0 +
f'' − − − 0 + + +
shape rising, concave max (2, 32) falling, concave inflection (4, 16) falling, convex min (6, 0) rising, convex

Three lines, and the marker can tick step 6:

  1. f''(q) = 6q - 24 = 0 \Rightarrow q = 4.
  2. f'' < 0 for q < 4: concave. f'' > 0 for q > 4: convex.
  3. Inflection at (4, 16), where the curve changes from dome to bowl.

The inflection sits between the turning points: where the fall is steepest. If f'' never changes sign, write “no inflection; concave throughout” — that earns the step too.

Step 6 in the words of a report

For the log-revenue firm of block B, R(q) = 30\ln(q+1), C(q) = 0.4q^{2} + 3q + 25:

  • C''(q) = 0.8 > 0: cost is convex throughout — each extra unit costs more than the last.
  • R''(q) = -30/(q+1)^{2} < 0: revenue is concave throughout — each extra unit brings in less than the last. Diminishing returns, by name.
  • So \pi'' = R'' - C'' < 0 everywhere: profit is concave, with a single maximum and no inflection. The optimum you find is the only one.

Board sentence

Convexity is the second thing a Board wants to know after the optimum: is the ground falling away on both sides fast or slowly. f'' is that number.

D1 — the full study, in exam format

PAPER · drills.md

15 minutes. This is the midterm’s Q2 with different numbers. Write all seven steps, labelled.

Two blocks today, then the quiz

Block AThe study, done properlythe seven steps

Block BHow much should the firm produce?optimisation · MR = MC

Block B Optimisation, and what it is for

Where average cost is lowest

Bet before we compute

Marginal cost crosses average cost. Is the crossing to the left of the minimum, at it, or to the right?

It is at the minimum, and that is not a coincidence

C(q) = 0.4q² + 3q + 25, so AC(q) = 0.4q + 3 + 25/q.

AC'(q) = 0.4 - \frac{25}{q^{2}} = 0 \;\Rightarrow\; q^{2} = 62.5 \;\Rightarrow\; q \approx 7.91

There AC = 9.32 and C'(7.91) = 9.32. Equal.

While the next unit costs less than the average, it pulls the average down. When it costs more, it pushes it up. The average stops falling exactly when the two meet.

The rule that runs every firm

\pi'(q) = 0 \quad\Longleftrightarrow\quad R'(q) = C'(q)

Produce up to the point where the revenue from one more unit equals what that unit costs.

For R(q) = 30 ln(q+1) and C(q) = 0.4q² + 3q + 25:

\frac{30}{q+1} = 0.8q + 3 \;\Rightarrow\; 4q^{2} + 19q - 135 = 0 \;\Rightarrow\; q \approx 3.90

Push the log revenue

LAB · session.ipynb § B

  1. Bet: raise the coefficient on the log revenue from 30 to 40. Does the optimum move a lot, or a little?
  2. Then raise the fixed cost from 25 to 60. Does the optimum move at all?

The second one has a lesson in it. Watch what changes and what does not.

D4, D5 — optimise, and read the condition

PAPER · drills.md

12 minutes. In D5 say what the firm should do, in a sentence, before you compute anything.

Quiz

20 minutes · weeks 1–3 · not secret, not a trap

Five short items: one domain, one limit, one derivative with its managerial reading, one stationary point with its nature, one integral.

Marked and returned next week. It counts for nothing and tells us both a great deal.

Close Take home

Take home

  1. Seven steps, in order. f' finds the point, f'' names it.
  2. Marginal equals average at the bottom of the average.
  3. Produce until marginal revenue equals marginal cost.

Homework 3 (homework.md), for Thursday 15 October, corrected together at the board: four drills plus a 400–500 word Board report — a dry run of the midterm, with a hand-drawn sketch.

Write your own three take-home lines now, before you leave.