Differentiation in context: rates of change, tangents and optimisation

IB Math AI · Calculus

The derivative as a rate

In AI the derivative is read as a rate with units. If $C(x)$ is cost in dollars for $x$ units, then $C'(x)$ is dollars per unit; if $V(t)$ is volume in litres at time $t$ minutes, $V'(t)$ is litres per minute. Every answer should carry those units.

$$\frac{d}{dx}x^{n}=nx^{n-1},\qquad \frac{d}{dx}e^{kx}=ke^{kx},\qquad \frac{d}{dx}\ln x=\frac{1}{x}$$

Tangents and normals

At $x=a$ the tangent has gradient $f'(a)$ and passes through the point with height $f(a)$; the normal has gradient $-\dfrac{1}{f'(a)}$. Note that $f(a)$ gives the height and $f'(a)$ the slope: using one for the other is the standard slip.

Optimisation, in five steps

Write the quantity to be optimised; use the constraint to reduce it to one variable; state the valid domain; solve $f'(x)=0$; and justify the nature of the stationary point using the second derivative or a sign table. The domain step is the one candidates skip, and it is where marks are lost.

Second derivative

A positive second derivative at $a$ means a local minimum, a negative one means a local maximum. If it is zero the test says nothing and a sign table for $f'$ is required.

Reading a model

A GDC will find maxima and minima directly, so the marks in AI sit in the modelling: choosing the variable, stating the domain, and saying what the answer means for the person who asked.

P′(36) = 0 — lợi nhuận cực đại 528 P′(20) = 16 > 0 còn tăng được P′ < 0: sản xuất thêm làm giảm lợi nhuận x = 36 x (sản lượng) P (lợi nhuận) O
The derivative is not a number to be calculated and discarded; it is the slope of the tangent line, and this figure shows why its sign answers the business question directly. At output level $x=20$, the green tangent slopes upward: $P'(20)=-20+36=16>0$, meaning producing one more unit still raises profit by about $16$ units of money. At $x=36$, the red tangent is horizontal: $P'(36)=0$, and that is the condition that defines a stationary point. To the right of $x=36$ the curve goes down so $P'<0$: producing more starts to reduce profit, even though revenue is still rising. Note what the figure says that the formula does not say at once: the peak is not where profit is “growing fastest”, but where it stops growing. And since the second derivative equals $-1<0$ everywhere, the curve is concave down over the whole domain, so that single stationary point is certainly a maximum without needing to test any other value.

Worked example: an open box cut from a sheet of card: modeling and rejecting a solution

A rectangular sheet of card $40$ cm $\times$ $25$ cm has four squares of side $x$ cm cut from its four corners and is then folded up to make an open box.

Write an expression for the volume in terms of $x$, state the valid domain, and find $x$ for the maximum volume.

Solution

Step 1: build the function. After folding, the height is $x$ and the two base dimensions are $40-2x$ and $25-2x$:

$$V(x)=x(40-2x)(25-2x)=4x^{3}-130x^{2}+1000x$$

Step 2: valid domain. We need $x>0$ and both base dimensions positive, that is, $25-2x>0$:

$$0<x<12.5$$

Writing this line earns a separate mark, and in this problem it even decides the answer.

Step 3: stationary points.

$$V'(x)=12x^{2}-260x+1000=4(3x^{2}-65x+250)=0$$$$x=\frac{65\pm\sqrt{65^{2}-4(3)(250)}}{6}=\frac{65\pm\sqrt{1225}}{6}=\frac{65\pm 35}{6}$$$$x=5\quad\text{or}\quad x=16.7$$

The solution $16.7$ is rejected because it lies outside the domain: you cannot cut a corner $16.7$ cm wide from a sheet only $25$ cm wide; after cutting, the two edges would already overlap.

Step 4: prove it is a maximum. The second derivative is $24x-260$, and at $x=5$ it equals $120-260=-140<0$, so $x=5$ gives a maximum.

$$V(5)=5(30)(15)=2250\ \text{cm}^{3}$$

Check with two neighboring values: $V(4)=4(32)(17)=2176$ and $V(6)=6(28)(13)=2184$, both less than $2250$. This test takes ten seconds and catches both derivative errors and equation-solving errors.

Worked example: the growth rate of an exponential model

The number of users of an app is modeled by $N(t)=2400e^{0.08t}$, where $t$ is the number of months since launch.

Calculate $N(10)$ and $N'(10)$, explain the meaning of each number with units, and find the month when the number of users is increasing by $600$ per month.

Solution

Step 1: value and rate.

$$N(10)=2400e^{0.8}=2400(2.2255)=5341\ \text{users}$$$$N'(t)=2400(0.08)e^{0.08t}=192e^{0.08t}\;\Longrightarrow\;N'(10)=192(2.2255)=427\ \text{users/month}$$

Step 2: interpretation, and this is the part that earns marks. After $10$ months, the app has about $5341$ users, and at that moment the number of users is increasing at a rate of about $427$ per month.

These two quantities differ in nature, not just in number: $N(10)$ is an amount, $N'(10)$ is a rate. The units make that clear: “users” versus “users per month”.

Step 3: solving backwards.

$$192e^{0.08t}=600\;\Longrightarrow\;e^{0.08t}=3.125\;\Longrightarrow\;0.08t=\ln 3.125=1.1394$$$$t=14.2\ \text{months}$$

A remark worth remembering about exponential models: here $N'(t)=0.08\,N(t)$ holds for every $t$. The growth rate is always proportional to the current size, which is the very definition of exponential growth, and also the reason this model cannot stay true forever. At $t=60$ it forecasts $2400e^{4.8}=290\,000$ users growing at $23\,000$ per month, a figure no finite market could sustain. That is when we must switch to a logistic model.

Common mistake

First trap: skipping the domain step in an optimization problem. The equation $f'(x)=0$ often has two solutions, and a solution that is absurd geometrically is rejected only by the domain; nothing in the calculation gives it away. Second trap: using $f(a)$ as the gradient of the tangent. For $y=3x^{2}-5x+2$ at $x=2$, $f(2)=4$ and $f'(2)=7$; writing $y-4=4(x-2)$ uses the height as the slope. Third trap: concluding an extremum without proof. IB papers almost always have a mark reserved for showing that the second derivative is negative or setting up a sign table; writing straight “so this is a maximum” loses that mark. Fourth trap: confusing a value with a rate. The question “how many users after $10$ months” needs $N(10)$, while “how fast is the number of users growing” needs $N'(10)$; the two numbers $5341$ and $427$ are both reasonable so choosing the wrong one does not reveal itself. Fifth trap: answering the wrong quantity. If the problem asks for the “maximum volume” the answer is $2250$ cm$^{3}$, not $x=5$ cm; if it asks “what side should be cut” it is the other way around. Rereading the question after finishing the calculation is the cheapest habit in the whole chapter.

Key takeaway

In AI, the hard part of differentiation is not taking the derivative, since the calculator does that, but the three jobs before and after it: building a function of one variable from the context, stating the valid domain, and reading the result out as a sentence with units. Those three jobs make up most of the marks of every optimization question in real exams.

← Distributions and hypothesis tests: binomial, normal, chi-squared and t · All IB Math AI lessons · Practice IB Math AI questions (free, instant scoring) · Integration and numerical methods: area and the trapezoidal rule →