Function analysis and optimisation
Using f' and f'' to find where a function rises, falls and bends, the extremum tests, a complete function analysis, the closed interval method, word problems, and the economic applications: marginal cost and revenue, average cost, profit maximisation, elasticity and the economic order quantity.
Syllabus: Syllabus ch. 6 (second half) · Sessions: Lectures 8 and 9, WPO 8, applied chapters 10 to 12 · About 70 minutes
Increasing, decreasing and extremaImportant
The sign of the first derivative tells the direction of the graph: f' > 0 means increasing, f' < 0 means decreasing. A critical point is an x in the domain where f'(x) = 0 or where f' does not exist. Local extrema can only occur at critical points (or at end points of the domain).
| Test | Local maximum at c | Local minimum at c | No conclusion |
|---|---|---|---|
| First derivative test | f' changes from + to − | f' changes from − to + | f' keeps its sign: no extremum |
| Second derivative test (f'(c) = 0) | f''(c) < 0 | f''(c) > 0 | f''(c) = 0: use the first derivative test |
A local extremum is the highest or lowest value in a neighbourhood; a global (absolute) extremum is the highest or lowest on the whole domain or interval. The function x3 shows why f'(c) = 0 is not enough: f'(0) = 0, but the graph only flattens and keeps rising.
Concavity and inflection pointsImportant
The second derivative tells how the graph bends: f'' > 0 means convex (bending upward, like a cup), f'' < 0 means concave (bending downward, like a cap). An inflection point is a point where the concavity changes, so f'' changes sign there. f''(c) = 0 is necessary but not sufficient: x4 has f''(0) = 0 and no inflection.
Economic reading: a cost curve that is first concave and then convex has a point where marginal cost is lowest; that is its inflection point.
A complete function analysisImportant
The exam always contains a "full function analysis" worth about 3 points out of 20. Follow a fixed checklist and present the result in one sign table and a sketch:
- Domain (and continuity).
- Symmetry: even, odd or neither.
- Intercepts: roots of f and f(0).
- Asymptotes: vertical, horizontal, oblique (chapter 4).
- f': critical points, increasing and decreasing intervals, local extrema.
- f'': concavity and inflection points.
- Sign table with f', f'' and f, then a sketch consistent with all of it.
Analyse f(x) = x2/(x − 1)
Follow the checklist.
Domain and intercepts
Asymptotes
First derivative
Signs of f'
Extrema
Second derivative
The graph has two branches: the left one rises to the peak (0, 0) and dives along x = 1; the right one comes down from +∞, bottoms out at (2, 4) and follows y = x + 1.
Optimisation: closed intervals and word problemsImportant
Closed interval method for the global extremes of a continuous f on [a, b]: (1) check continuity, (2) find the critical points inside ]a, b[, (3) evaluate f at those points and at a and b, (4) the largest value is the maximum, the smallest the minimum.
For word problems: name the variables, write the quantity to optimise as a function of one variable (use the constraint to eliminate the others), state the domain, differentiate, solve f' = 0, and confirm with a sign table or f''.
A fenced pasture
A farmer has 400 m of fence for a rectangle. Which dimensions give the largest area?
Variables and constraint
Objective
Critical point
Compare
A 100 m by 100 m square gives the largest area, 10,000 m2.
Marginal analysis, average cost and elasticityImportant
In economics the derivative is called marginal: marginal cost MC = TC'(q) is about the cost of one extra unit, marginal revenue MR = TR'(q) the revenue of one extra unit. The approximation TC(q + 1) − TC(q) ≈ MC(q) is better the flatter the curve.
| Concept | Definition | Key fact |
|---|---|---|
| Total revenue | TR = p(q) · q | for a price taker p is constant, so MR = p |
| Average cost | AC = TC/q | AC is lowest where AC = MC |
| Average variable cost | AVC = (TC − F)/q | AVC is lowest where AVC = MC |
| Profit | π = TR − TC | maximal where MR = MC and π'' < 0 |
| Price elasticity of demand | E = (dq/dp) · (p/q) | |E| > 1 elastic, |E| < 1 inelastic; revenue peaks where |E| = 1 |
Average variable cost and marginal cost
TC(q) = 0.5q3 − 3q2 + 10q + 20.
Marginal cost
Average variable cost
Minimise AVC
Check
At the bottom of the AVC curve, MC crosses it: when the next unit costs less than the average, the average falls, and vice versa.
Elasticity of a linear demand
q = 100 − 2p at p = 20.
Quantity
Elasticity
Revenue maximum
At p = 20 demand is inelastic, so a small price rise increases revenue, up to p = 25.
Profit maximisation and the order quantityImportant
A price taker in perfect competition faces a fixed price p, so TR = pq and the best output satisfies p = MC. A monopolist faces a downward sloping demand p = a − bq, so MR = a − 2bq falls twice as fast as the demand price, and the best output satisfies MR = MC.
A monopolist
Demand p = 300 − 0.5q and TC = 1500 + 60q + 0.25q2.
Marginal revenue and cost
MR = MC
Price and profit
Second order
Revenue alone would peak at q = 300 (MR = 0); profit peaks earlier because each unit also costs money. The profit lab recomputes this for any numbers.
The economic order quantity (EOQ, the Harris or Wilson formula) balances ordering costs and holding costs. With annual demand D, cost S per order and holding cost H per unit per year, the yearly cost is TC(Q) = DS/Q + HQ/2 (plus the fixed purchase cost). Setting TC'(Q) = −DS/Q2 + H/2 = 0 gives:
If the firm produces the good itself at a rate P > D per year (the EPQ model), stock builds up more slowly and H is replaced by H(1 − D/P).
Key takeaways
- f' > 0 rising, f' < 0 falling; extrema where f' changes sign.
- f'' > 0 convex, f'' < 0 concave; inflection where f'' changes sign.
- Full analysis: domain, symmetry, intercepts, asymptotes, f', f'', sign table, sketch.
- Closed interval: compare f at the critical points and at both ends.
- Profit is maximal where MR = MC; average cost is minimal where AC = MC.
- EOQ: Q* = √(2DS/H), where ordering cost equals holding cost.
Multiple choice (10)
f(x) = x3 − 3x has a local maximum at...
f''(x) = 6x − 12 shows an inflection point at...
On [0, 3] the maximum of f(x) = x2 − 2x is...
A firm with TC = 100 + 2q2 sells at p = 40. Best output?
Average cost AC = 50/q + 2q is lowest at...
For demand p = 120 − 3q, marginal revenue is...
At a price where |E| = 0.4, a price rise will...
With D = 800, S = 25 and H = 4, the EOQ is...
Which statement is correct for f(x) = x4?
A sign change of f' at a vertical asymptote means...
Exam-style open questions (3)
Full function analysis
Perform a full function analysis of f(x) = x e−x.
Show the worked outline
- Domain ℝ; neither even nor odd; root x = 0, f(0) = 0.
- Limits: f → 0 as x → +∞ (horizontal asymptote y = 0 on the right), f → −∞ as x → −∞.
- f'(x) = e−x(1 − x): increasing for x < 1, decreasing for x > 1, maximum f(1) = 1/e.
- f''(x) = e−x(x − 2): concave for x < 2, convex for x > 2, inflection (2, 2/e2).
Revenue and profit
Demand p = 60 − 2q and TC = 100 + 12q. Find the output that maximises revenue, the output that maximises profit, and the profit.
Show the worked outline
- TR = 60q − 2q2, MR = 60 − 4q = 0 gives q = 15 for maximum revenue.
- MR = MC: 60 − 4q = 12 gives q = 12, p = 36.
- Profit = 36 · 12 − (100 + 144) = 188.
Average cost
TC = 4000 + 10q + 0.1q2. At which output is average cost lowest, and what is MC there?
Show the worked outline
- AC = 4000/q + 10 + 0.1q.
- AC' = −4000/q2 + 0.1 = 0 gives q = 200.
- AC(200) = 20 + 10 + 20 = 50 and MC = 10 + 0.2 · 200 = 50: equal, as expected.
LabFunction analysis lab
Change the coefficients and the interval; the sign table updates with them.
LabProfit maximisation lab
The default numbers follow the worked monopolist example above.
LabOrder quantity lab
A classic optimisation from the applied lectures.