
Session 04 - Differentiation
Mathematics for Master Students
Recap & Your Questions
Session 03 in a Nutshell
- A function assigns each input exactly one output
- The gallery: linear, quadratic, polynomial, rational, exponential, logarithm
- Maximal domain, red flags: division by zero, roots of negatives, logs of non-positives
- Composition chains functions (order matters); inverses undo
- Convex vs concave: where the chord lies relative to the graph
- Today: how fast does the output change, \(f(a+h)\) finally pays off
Common Issues in the Homework
- One restriction forgotten: with \(\frac{\sqrt{x+1}}{x-2}\), both the root (\(x \geq -1\)) and the denominator (\(x \neq 2\)) restrict: collect every red flag, then intersect
- Composition order: \((f \circ g)(x)\) means \(g\) acts first. Several solutions applied \(f\) first
- The log-inequality flip: dividing by \(\ln 0.85 < 0\) flips the inequality. Dividing by a negative number always does
. . .
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.
Warm-Up: Compose and Restrict
Let \(f(x) = \sqrt{x}\) and \(g(x) = 2x + 7\). Compute \(\;(f \circ g)(1)\;\) and find the domain of \(f \circ g\).
. . .
- Inside out: \((f \circ g)(1) = f(g(1)) = f(9) = 3\)
- The root needs \(g(x) \geq 0\): \(\;2x + 7 \geq 0\), so \(x \geq -\frac{7}{2}\)
- Domain of \(f \circ g\): \(\;[-\frac{7}{2}, \infty)\), the inner function must land where the outer one is defined
Today’s Plan
- Rates of change: from secant lines to the tangent and the derivative
- Rules of differentiation: power, sum, product, quotient, chain, \(e^x\) and \(\ln x\)
- Second derivative: the convex/concave intuition made precise
- Marginal analysis: marginal cost, marginal revenue, elasticity of demand
Rates of Change
How Fast Does Revenue React?
Session 3 modeled revenue as a function of price: \(R(p) = 1200p - 20p^2\).
- A pricing decision is rarely “pick \(p\) from scratch”, it is nudge the current price a little
- Central question: if I move the price from \(p\) to \(p + h\), how fast does revenue react?
- The answer depends on where we stand on the curve. Let’s look
The Same Nudge, Very Different Effects
. . .
Raising the price by €1 gains about €780 of revenue at \(p = 10\), but loses about €20 at \(p = 30\). One curve, very different local behavior.
The Average Rate of Change
How much does \(f\) change per unit of input, between \(a\) and \(a + h\)?
\[\frac{f(a+h) - f(a)}{h} \qquad \text{the [difference quotient]{.highlight}}\]
- Change in output divided by change in input, “rise over run”
- The numerator is exactly Session 3’s expression \(f(a+h)\) minus \(f(a)\), the raw material, cashed in
- For a linear function this is always the slope \(m\). For a curved graph it depends on \(a\) and \(h\)
Geometry: The Secant Line

. . .
The difference quotient is the slope of the secant line through \((a, f(a))\) and \((a+h, f(a+h))\): here \(\frac{9 - 1}{2} = 4\) for \(f(x) = x^2\) from \(a = 1\) to \(a + h = 3\).
From Secant to Tangent

. . .
Keep \(a\) fixed and pull the second point closer: the secants tilt toward one limiting line, the tangent at \(a\). Its slope is the rate of change right at \(a\).
Letting \(h\) Shrink
For \(f(x) = x^2\) at \(a = 1\), the secant slope is \(\frac{(1+h)^2 - 1}{h}\):
| \(h\) | \(1\) | \(0.5\) | \(0.1\) | \(0.01\) | \(0.001\) |
|---|---|---|---|---|---|
| secant slope | \(3\) | \(2.5\) | \(2.1\) | \(2.01\) | \(2.001\) |
- As \(h\) shrinks toward \(0\), the slopes settle on the value \(2\)
- We write \(\lim_{h \to 0}\) for “the value it settles on as \(h\) shrinks toward \(0\)”
- That is all the limit machinery we need, no formal theory required in this tutorial
The Derivative
The derivative of \(f\) at \(a\) is the instantaneous rate of change:
\[f'(a) = \lim_{h \to 0} \frac{f(a+h) - f(a)}{h}\]
- Geometric reading: slope of the tangent line at \((a, f(a))\)
- Business reading: how fast the output reacts to a tiny nudge at \(a\)
- Computed at every point, it defines a new function \(f'\), the derivative of \(f\)
- Positive \(f'\): increasing; negative \(f'\): decreasing; the sign is a trend report
Worked Example: Differentiating \(f(x) = x^2\)
- Expand (Session 3 did this): \(f(a+h) = (a+h)^2 = a^2 + 2ah + h^2\)
- Subtract: \(f(a+h) - f(a) = 2ah + h^2\)
- Divide by \(h\): \(\dfrac{2ah + h^2}{h} = 2a + h\)
- Shrink \(h\) toward 0: \(\;f'(a) = 2a\)
. . .
Check against the table: at \(a = 1\) we get \(f'(1) = 2\), exactly where the secant slopes settled. And at \(a = 3\): slope \(6\), the parabola gets steeper as we move right.
Notation for Derivatives
All of these mean the same thing:
| Notation | Read as |
|---|---|
| \(f'(x)\) | “\(f\) prime of \(x\)” |
| \(\dfrac{df}{dx}\) | “derivative of \(f\) with respect to \(x\)” |
| \(\dfrac{d}{dx} f(x)\) | “\(\frac{d}{dx}\) applied to \(f(x)\)” |
. . .
\(\frac{df}{dx}\) deliberately looks like a difference quotient: it reminds you where the derivative comes from. We mostly write \(f'(x)\); with several variables around (e.g. \(C(q)\)), the \(\frac{dC}{dq}\) form says with respect to what.
Your Turn: Average vs Instantaneous
A courier van covers 150 km in 2 hours. Halfway through, a speed camera clocks it at 90 km/h. Which number is an average rate of change, which is a derivative, and can both be correct at once?
. . .
- \(\frac{150}{2} = 75\) km/h is a difference quotient, distance change over time change
- The camera reading is the instantaneous rate, the derivative of distance at that moment
- Both are correct: the average smooths out faster and slower stretches
Not Every Function Has a Derivative

. . .
- At the kink, secants from the left settle on \(-1\), from the right on \(+1\): no single tangent, no derivative at \(0\)
- Jumps are even worse: no tangent can be drawn across a gap
- Intuition: differentiable = smooth graph: no kinks, no jumps (tiered shipping tariffs kink at the breakpoints)
Rules of Differentiation
Constants and the Power Rule
Nobody computes difference quotients all day, rules do the work:
- Constants: \(f(x) = c\) has \(f'(x) = 0\), a horizontal line has slope zero
- Power rule: \(f(x) = x^n\) has \(f'(x) = n x^{n-1}\)
- Recipe: exponent down front, then reduce the exponent by one
- Example: \((x^5)' = 5x^4\), and our \((x^2)' = 2x\) is the case \(n = 2\)
The Power Rule Takes All Exponents
The rule also covers negative and fractional exponents, rewrite first:
- \(\dfrac{1}{x} = x^{-1}\), so \(\left(\dfrac{1}{x}\right)' = -1 \cdot x^{-2} = -\dfrac{1}{x^2}\)
- \(\sqrt{x} = x^{1/2}\), so \(\left(\sqrt{x}\right)' = \dfrac{1}{2} x^{-1/2} = \dfrac{1}{2\sqrt{x}}\)
. . .
Session 1’s exponent rules pay off: rewrite as a power, differentiate, translate back. Fractions and roots stop being special cases.
Sums and Constant Multiples
\[(c \cdot f)'(x) = c \cdot f'(x) \qquad (f + g)'(x) = f'(x) + g'(x)\]
- Together: differentiate term by term, constants tag along
- Example, a cost function: \(C(q) = 0.5q^2 + 10q + 200\)
- \(C'(q) = 0.5 \cdot 2q + 10 + 0 = q + 10\)
- The fixed costs \(200\) vanish: they do not react to producing one unit more
. . .
Every polynomial is now differentiable in one line. Keep \(C'(q) = q + 10\) in mind, it returns later today.
The Product Rule
\[(f \cdot g)'(x) = f'(x)\,g(x) + f(x)\,g'(x)\]
- “Derivative of the first times the second, plus the first times derivative of the second”
- Example: \(u(x) = (x^2 + 1)(3x - 2)\)
- \(u'(x) = 2x \cdot (3x - 2) + (x^2 + 1) \cdot 3 = 9x^2 - 4x + 3\)
- Check: expanding first gives \(u(x) = 3x^3 - 2x^2 + 3x - 2\), so \(u'(x) = 9x^2 - 4x + 3\) ✓
. . .
\((f \cdot g)' \neq f' \cdot g'\), try \(f(x) = g(x) = x\): the product \(x^2\) has derivative \(2x\), not \(1\).
The Quotient Rule
\[\left(\frac{f}{g}\right)'(x) = \frac{f'(x)\,g(x) - f(x)\,g'(x)}{\left(g(x)\right)^2}\]
- Like the product rule, but with a minus, the numerator’s order matters
- Example, Session 3’s average cost per unit: \(A(q) = \frac{200 + 5q}{q}\)
- \(A'(q) = \frac{5 \cdot q - (200 + 5q) \cdot 1}{q^2} = -\frac{200}{q^2}\)
- Always negative: average cost falls as volume grows: economies of scale, now proven
The Chain Rule
For a composition \((f \circ g)(x) = f(g(x))\), Session 3’s chaining:
\[\left(f(g(x))\right)' = f'(g(x)) \cdot g'(x)\]
- Recipe: outer derivative (inner left untouched) times inner derivative
- Example: \(v(x) = (2x^2 + 1)^3\), outer \((\cdot)^3\), inner \(2x^2 + 1\)
- \(v'(x) = 3(2x^2 + 1)^2 \cdot 4x = 12x\,(2x^2 + 1)^2\)
. . .
Stopping at \(3(2x^2 + 1)^2\), the inner derivative \(4x\) must come along. Forgetting it is the classic chain-rule slip.
Chain Rule in Business: Rates Multiply
A warehouse’s stock grows over time, and storage cost depends on stock:
\[q(t) = 30 + 4t \ \text{ pallets after } t \text{ weeks}, \qquad S(q) = 0.2q^2 \ \text{ cost in €}\]
. . .
How fast does the cost grow over time? Differentiate the chain \(S(q(t))\):
\[\frac{dS}{dt} = S'(q) \cdot q'(t) = 0.4q \cdot 4 = 1.6\,(30 + 4t)\]
. . .
- At \(t = 5\): stock \(q = 50\), and cost rises at \(1.6 \cdot 50 = 80\), €80 per week
- The chain rule multiplies the rates along the chain: € per pallet times pallets per week
Your Turn: Pick the Rule
Which rule differentiates each function, and what are the derivatives?
\[\text{(a) } (5x + 1)^4 \qquad \text{(b) } x^3(2x - 7) \qquad \text{(c) } \frac{x}{x^2 + 1}\]
. . .
- (a) Chain rule, outer \((\cdot)^4\), inner \(5x + 1\): derivative \(4(5x+1)^3 \cdot 5 = 20(5x+1)^3\)
- (b) Product rule, or expand to \(2x^4 - 7x^3\) and use the power rule: both give \(8x^3 - 21x^2\)
- (c) Quotient rule: \(\left(\frac{x}{x^2+1}\right)' = \frac{1 \cdot (x^2 + 1) - x \cdot 2x}{(x^2 + 1)^2} = \frac{1 - x^2}{(x^2 + 1)^2}\)
Derivatives of \(e^x\) and \(\ln x\)
- \(\left(e^x\right)' = e^x\), the exponential is its own derivative: at every point, slope = height
- \(\left(\ln x\right)' = \dfrac{1}{x}\), steep near \(0\), ever flatter afterwards: diminishing returns
- Other bases pick up a factor: \(\left(a^x\right)' = a^x \ln a\)
- \(e\) is exactly the base where that factor is \(\ln e = 1\), the tidy one
- With the chain rule: \(\left(e^{3x}\right)' = e^{3x} \cdot 3 = 3e^{3x}\)
The Superpower of \(e\)
Session 3’s continuous growth: \(K(t) = K_0 \cdot e^{rt}\). Differentiate (chain rule):
\[K'(t) = K_0 \, e^{rt} \cdot r = r \cdot K(t)\]
- The growth rate is proportional to the current level: at every instant, capital grows at \(r\) times itself
- That is the defining property of exponential growth: interest earns interest
- This is why \(e\) rules finance and growth models, the promised superpower
The Rule Table
Building blocks
| \(f(x)\) | \(f'(x)\) |
|---|---|
| \(c\) | \(0\) |
| \(x^n\) | \(n x^{n-1}\) |
| \(e^x\) | \(e^x\) |
| \(a^x\) | \(a^x \ln a\) |
| \(\ln x\) | \(\frac{1}{x}\) |
Combination rules
| Rule | Formula |
|---|---|
| Constant multiple | \((c f)' = c f'\) |
| Sum | \((f + g)' = f' + g'\) |
| Product | \((f g)' = f'g + f g'\) |
| Quotient | \(\left(\frac{f}{g}\right)' = \frac{f'g - f g'}{g^2}\) |
| Chain | \((f(g))' = f'(g) \cdot g'\) |
. . .
These ten lines differentiate every function in Session 3’s gallery: practice comes with the tasks, the table lives on the cheatsheet.
Higher-Order Derivatives & Curvature
Differentiating Twice
\(f'\) is again a function, so differentiate again:
\[f''(x) = \left(f'\right)'(x) \qquad \text{also written } \frac{d^2 f}{dx^2}\]
- \(f'\) reports how fast \(f\) changes; \(f''\) reports how fast the slope changes
- Example: \(f(x) = x^3 - 3x\), Session 3’s cubic
- First: \(f'(x) = 3x^2 - 3\); then: \(f''(x) = 6x\)
- Third, fourth, \(\dots\) derivatives exist too: for us, two is all we need
Curvature: The Second-Derivative Test
Session 3’s chord intuition, now with a formal test on an interval:
- \(f''(x) \geq 0\) everywhere \(\;\Rightarrow\;\) convex: slope increasing, graph bends upward, chords above
- \(f''(x) \leq 0\) everywhere \(\;\Rightarrow\;\) concave: slope decreasing, graph bends downward, chords below
- \(f(x) = x^2\): \(f''(x) = 2 > 0\): convex everywhere, as the chords showed
- \(f(x) = \ln x\): \(f''(x) = -\frac{1}{x^2} < 0\), concave everywhere: diminishing returns, certified
Reading \(f\), \(f'\) and \(f''\) Together

. . .
- For \(x < 0\): \(f'' < 0\): slope falling, \(f\) bends downward (concave)
- For \(x > 0\): \(f'' > 0\): slope rising, \(f\) bends upward (convex)
- At \(x = 0\) the bend switches, an inflection point; Session 5 turns these signs into an optimization tool
Your Turn: What Does \(C''(q) > 0\) Mean Here?
A warehouse’s handling cost \(C(q)\) satisfies \(C'(q) > 0\) and \(C''(q) > 0\) for all realistic \(q\). What does each sign say about the next pallet?
. . .
- \(C'(q) > 0\): handling more pallets costs more, the cost curve rises
- \(C''(q) > 0\): each additional pallet costs more than the previous one, the rise steepens
- Business reading: the warehouse strains against capacity, the cost curve is convex
Marginal Analysis
Marginal Cost
Economists call \(C'(q)\) the marginal cost at output level \(q\):
- Exact meaning: the instantaneous rate at which cost grows at \(q\)
- Practical meaning: approximately the cost of one more unit
- Why: with \(h = 1\) in the difference quotient, \(C'(q) \approx \dfrac{C(q+1) - C(q)}{1}\)
- One unit is a small nudge next to hundreds produced, so the tangent slope is an excellent stand-in
Worked Reading: What Does \(C'(50)\) Say?
Take today’s cost function \(C(q) = 0.5q^2 + 10q + 200\), so \(C'(q) = q + 10\).
- \(C'(50) = 60\), at 50 units, cost grows at €60 per unit
- Reading: the 51st unit costs approximately €60 to produce
- Exact check: \(C(51) - C(50) = 2010.5 - 1950 = 60.5\), the approximation is off by 50 cents
- And \(C''(q) = 1 > 0\): marginal cost is increasing, every further unit is dearer
. . .
Mind the units: \(C'(q)\) is € per unit, not €: a rate, not a cost.
Marginal Revenue
The same idea on the revenue side, sell \(q\) units, earn \(R(q)\):
- Marginal revenue \(R'(q)\): approximately the revenue from one more unit sold
- It usually falls with \(q\), selling more requires lowering the price
- Producing one more unit pays off while \(R'(q) > C'(q)\), the extra revenue beats the extra cost
- Where the two rates meet lies the profit-maximal output, Session 5 makes this precise
Elasticity of Demand
Rates in units depend on the units, pricing needs percentages. For a demand function \(D(p)\):
\[\varepsilon = \frac{p}{D(p)} \cdot D'(p)\]
- Reading: a 1% price increase changes demand by about \(\varepsilon\) percent
- Demand falls in price, so \(\varepsilon\) is negative
- \(|\varepsilon| > 1\): elastic, demand overreacts to price
- \(|\varepsilon| < 1\): inelastic, demand barely reacts
Worked Example: Pricing a Delivery Service
Weekly demand for a same-day delivery service: \(D(p) = 500 - 10p\), so \(D'(p) = -10\).
- At \(p = 20\): \(D(20) = 300\), so \(\varepsilon = \frac{20}{300} \cdot (-10) \approx -0.67\)
- Inelastic: raising the price 1% loses only 0.67% of demand, revenue rises
- At \(p = 30\): \(D(30) = 200\), so \(\varepsilon = -1.5\), elastic: a price increase now backfires
- The switch sits at \(\varepsilon = -1\) (here \(p = 25\)), exactly where revenue \(p \cdot D(p)\) peaks
Your Turn: Raise the Price or Not?
At the current price, a freight forwarder estimates the elasticity of demand at \(\varepsilon = -0.4\). Elastic or inelastic, and what does a small price increase do to revenue?
. . .
- \(|\varepsilon| = 0.4 < 1\): inelastic, customers barely react
- A 1% price increase loses only about 0.4% of demand
- Price up, demand almost unchanged: revenue increases, typical for services customers depend on
Closing
Key Takeaways
- The derivative \(f'(a) = \lim_{h \to 0} \frac{f(a+h) - f(a)}{h}\) is the instantaneous rate of change, the tangent’s slope
- Kinks and jumps break differentiability, smooth graphs are safe
- Power, sum, product, quotient and chain rule handle every gallery function
- \(e^x\) is its own derivative, growth proportional to the current level
- \(f''\) measures curvature: \(f'' \geq 0\) convex, \(f'' \leq 0\) concave, the chord intuition, formalized
- \(C'(q) \approx\) cost of one more unit; elasticity \(\varepsilon\) compares percentage reactions
Skip order if running long: 1. The Superpower of \(e\) (fold its punchline into the \(e^x\)/\(\ln x\) slide), 2. Marginal Revenue (one sentence on the worked-reading slide), 3. Not Every Function Has a Derivative (keep only the kink bullet), 4. compress The Same Nudge plot to a verbal example.
Until the Next Session
- Work through the Tasks: the drilling happens there, with worked solutions
- Check yourself with the Self-Test quiz
- Keep the Cheatsheet next to you, the rule table lives on it
- Note down anything unclear, we start next session with your questions
. . .
When differentiating, name the structure first: sum, product, quotient or chain? The right rule follows automatically.
Preview: Session 05 (Optimization)
- Central question: where is a function largest or smallest?
- The recipe: set \(f'\) to zero (flat tangent) and ask \(f''\) whether it is a peak or a valley
- Best price, best order quantity, minimal cost per unit
- Today’s rules become the toolkit, differentiation was the warm-up
. . .
See you there, and bring your questions!
Literature & Further Reading
- These sessions cover the essentials, textbooks offer more depth and practice
- Sydsaeter & Hammond: Essential Mathematics for Economic Analysis
- Jacques: Mathematics for Economics and Business
- Full recommendations on the tutorial’s literature page