7️⃣ Introduction to Optimization
Introduce the average and instantaneous rates of change, the intuitive notion of the derivative, and its application to affine and degree-2 polynomial functions, in order to find maxima and minima for decision-making.
- Compute an average rate of change between two points.
- Understand the instantaneous rate of change and the intuitive notion of the derivative.
- Differentiate affine and degree-2 polynomial functions.
- Use the derivative to find a maximum or a minimum.
What Does “Optimize” Mean?
In mathematics, to optimize means to find the maximum or the minimum of a function. In management there are many situations that call for an optimal decision:
- maximisation: firm profit, production, yield, consumer utility;
- minimisation: average cost, production or delivery time, inventory, the risk of a portfolio.
To find a maximum or a minimum we study how the function varies: over which intervals is it increasing, and over which is it decreasing? The derivative is the tool that answers this question precisely.
Average Rate of Change
The average rate of change of a function \(f\) between \(x_1\) and \(x_2\) is \[ \tau = \frac{f(x_2) - f(x_1)}{x_2 - x_1}. \]
Geometrically, it is the slope of the secant line joining the two points \((x_1, f(x_1))\) and \((x_2, f(x_2))\) on the graph. Economically, it measures the average change of \(f\) per unit of \(x\) — for instance the average change of cost per additional unit produced.
Worked example — average rate of change
For \(f(x) = x^{2}\) between \(x_1 = 1\) and \(x_2 = 3\):
\[ \tau = \frac{f(3) - f(1)}{3 - 1} = \frac{9 - 1}{2} = 4. \]
Instantaneous Rate of Change and the Derivative
If we let the second point get closer and closer to the first (\(x_2 \to x_1\)), the secant line tends towards the tangent line at the point. Its slope is the instantaneous rate of change, called the derivative of \(f\) at \(x_1\), written \(f'(x_1)\).
- \(f'(x) > 0\) on an interval \(\;\Rightarrow\; f\) is increasing there.
- \(f'(x) < 0\) on an interval \(\;\Rightarrow\; f\) is decreasing there.
- \(f'(x) = 0\) at a point where \(f\) changes direction \(\;\Rightarrow\;\) a candidate maximum or minimum (the tangent is horizontal).
Take a point \(x\) and a small increment \(h\). The average rate of change between \(x\) and \(x + h\) is
\[ \frac{f(x + h) - f(x)}{h} = \frac{(x + h)^{2} - x^{2}}{h} = \frac{x^{2} + 2xh + h^{2} - x^{2}}{h} = \frac{2xh + h^{2}}{h} = 2x + h. \]
As \(h\) becomes infinitely small (\(h \to 0\)), this tends to \(2x\). Hence the instantaneous rate of change is
\[ f'(x) = 2x. \]
- Constant \(f(x) = k\): \(\;f'(x) = 0\).
- Affine \(f(x) = a x + b\): \(\;f'(x) = a\) (constant slope).
- Power \(f(x) = x^{n}\): \(\;f'(x) = n\,x^{n-1}\).
- Quadratic \(f(x) = a x^{2} + b x + c\): \(\;f'(x) = 2a x + b\).
Applying the Derivative to Optimization
- Compute the derivative \(f'(x)\).
- Solve \(f'(x) = 0\) to find the candidate point \(x^{\*}\).
- For \(f(x) = a x^{2} + b x + c\), the extremum is at \(x^{\*} = -\dfrac{b}{2a}\): it is a maximum if \(a < 0\) and a minimum if \(a > 0\).
Worked example — maximising profit
A firm’s profit is \(P(x) = -2x^{2} + 40x - 50\) (in thousands of euros), where \(x\) is the quantity produced. Then \(P'(x) = -4x + 40\). Setting \(P'(x) = 0\) gives \(x = 10\). Since \(a = -2 < 0\), the parabola opens downward, so \(x = 10\) is a maximum. The maximum profit is \(P(10) = -2(100) + 400 - 50 = 150\) (thousand euros).
Practice
- Average rate of change of \(f(x) = 3x + 2\) between \(x = 0\) and \(x = 4\). \(\tau = \dfrac{14 - 2}{4} = 3\) (equal to the slope, as expected for an affine function).
- Differentiate \(f(x) = 5x^{2} - 3x + 7\). \(\;f'(x) = 10x - 3\).
- Minimise the average cost \(C(x) = x^{2} - 12x + 40\). \(C'(x) = 2x - 12 = 0 \Rightarrow x = 6\); since \(a > 0\) it is a minimum, \(C(6) = 4\).
TODO: interactive tangent-slope explorer (secant → tangent as \(h \to 0\)) deferred — see plan Complexity Tracking.