hanegreefs.com/Math I
Chapter 6 of 8

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).

TestLocal maximum at cLocal minimum at cNo conclusion
First derivative testf' changes from + to −f' changes from − to +f' keeps its sign: no extremum
Second derivative test (f'(c) = 0)f''(c) < 0f''(c) > 0f''(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:

  1. Domain (and continuity).
  2. Symmetry: even, odd or neither.
  3. Intercepts: roots of f and f(0).
  4. Asymptotes: vertical, horizontal, oblique (chapter 4).
  5. f': critical points, increasing and decreasing intervals, local extrema.
  6. f'': concavity and inflection points.
  7. Sign table with f', f'' and f, then a sketch consistent with all of it.
Worked example

Analyse f(x) = x2/(x − 1)

Follow the checklist.

1

Domain and intercepts

ℝ \ {1}; f(0) = 0 and the only root is x = 0 (double, so the graph touches the axis)
2

Asymptotes

vertical x = 1; x2/(x − 1) = x + 1 + 1/(x − 1), so oblique y = x + 1
3

First derivative

f'(x) = (2x(x − 1) − x2)/(x − 1)2 = x(x − 2)/(x − 1)2
4

Signs of f'

+ on ]−∞, 0[, − on ]0, 1[ and ]1, 2[, + on ]2, +∞[
5

Extrema

local maximum f(0) = 0, local minimum f(2) = 4
6

Second derivative

f''(x) = 2/(x − 1)3: concave for x < 1, convex for x > 1, no inflection point (x = 1 is not in the domain)
Answer

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.

Common trapA sign change of f' across a vertical asymptote is not an extremum, and a change of concavity across an asymptote is not an inflection point: the point is not in the domain.

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''.

Worked example

A fenced pasture

A farmer has 400 m of fence for a rectangle. Which dimensions give the largest area?

1

Variables and constraint

sides x and y with 2x + 2y = 400, so y = 200 − x
2

Objective

A(x) = x(200 − x) = 200x − x2 on [0, 200]
3

Critical point

A'(x) = 200 − 2x = 0 gives x = 100
4

Compare

A(0) = A(200) = 0 and A(100) = 10,000; A'' = −2 < 0
Answer

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.

ConceptDefinitionKey fact
Total revenueTR = p(q) · qfor a price taker p is constant, so MR = p
Average costAC = TC/qAC is lowest where AC = MC
Average variable costAVC = (TC − F)/qAVC is lowest where AVC = MC
Profitπ = TR − TCmaximal where MR = MC and π'' < 0
Price elasticity of demandE = (dq/dp) · (p/q)|E| > 1 elastic, |E| < 1 inelastic; revenue peaks where |E| = 1
Worked example

Average variable cost and marginal cost

TC(q) = 0.5q3 − 3q2 + 10q + 20.

1

Marginal cost

MC = 1.5q2 − 6q + 10
2

Average variable cost

AVC = 0.5q2 − 3q + 10
3

Minimise AVC

AVC' = q − 3 = 0 gives q = 3 and AVC = 5.5
4

Check

MC(3) = 13.5 − 18 + 10 = 5.5
Answer

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.

Worked example

Elasticity of a linear demand

q = 100 − 2p at p = 20.

1

Quantity

q = 60
2

Elasticity

E = (−2)(20/60) ≈ −0.67
3

Revenue maximum

|E| = 1 when 2p = 100 − 2p, so p = 25
Answer

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.

Worked example

A monopolist

Demand p = 300 − 0.5q and TC = 1500 + 60q + 0.25q2.

1

Marginal revenue and cost

MR = 300 − q, MC = 60 + 0.5q
2

MR = MC

300 − q = 60 + 0.5q gives q* = 160
3

Price and profit

p = 220; π = 220 · 160 − (1500 + 9600 + 6400) = 17,700
4

Second order

π'' = −1 − 0.5 < 0: a maximum
Answer

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:

Formula
Q* = √(2DS / H)

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.

Loading cards
Question
Click, tap or press space to flip
Answer

Multiple choice (10)

Question 1 · Chapter 6

f(x) = x3 − 3x has a local maximum at...

Why: f' = 3x2 − 3 is zero at ±1 and f''(−1) = −6 < 0.
Question 2 · Chapter 6

f''(x) = 6x − 12 shows an inflection point at...

Why: f'' changes sign at 2.
Question 3 · Chapter 6

On [0, 3] the maximum of f(x) = x2 − 2x is...

Why: Compare f(0) = 0, f(1) = −1, f(3) = 3.
Question 4 · Chapter 6

A firm with TC = 100 + 2q2 sells at p = 40. Best output?

Why: p = MC: 40 = 4q.
Question 5 · Chapter 6

Average cost AC = 50/q + 2q is lowest at...

Why: AC' = −50/q2 + 2 = 0 gives q2 = 25.
Question 6 · Chapter 6

For demand p = 120 − 3q, marginal revenue is...

Why: TR = 120q − 3q2.
Question 7 · Chapter 6

At a price where |E| = 0.4, a price rise will...

Why: Inelastic demand: quantity falls less than proportionally.
Question 8 · Chapter 6

With D = 800, S = 25 and H = 4, the EOQ is...

Why: √(2 · 800 · 25 / 4) = √10,000.
Question 9 · Chapter 6

Which statement is correct for f(x) = x4?

Why: f' changes from − to +; f'' = 12x2 keeps its sign.
Question 10 · Chapter 6

A sign change of f' at a vertical asymptote means...

Why: Extrema need points of the domain.

Exam-style open questions (3)

Open question · Chapter 6

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).
Open question · Chapter 6

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.
Open question · Chapter 6

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.