Limits
Substituting $x=2$ into $\dfrac{3x^{2}+3x-18}{x-2}$ gives $\tfrac{0}{0}.$ Is there a limit, and what is it?
Every derivative is a limit: the Newton quotient $\bigl(f(a+h)-f(a)\bigr)/h$ has no value at $h=0,$ and the derivative is what it approaches. Before the definition, one function to look at. The quotient $$ f(x)=\frac{e^{x}-1}{x} $$ has no value at $x=0{:}$ substituting gives $\tfrac{0}{0}.$ But it has values as near to $0$ as we like, on both sides.
| $x$ | $f(x)$ |
|---|---|
| $-0.1$ | $0.9516$ |
| $-0.01$ | $0.9950$ |
| $0.01$ | $1.0050$ |
| $0.1$ | $1.0517$ |
The values close in on $1$ from below and from above. That number, which the function approaches and never has to reach, is what the definition names.
Two features of this are worth saying out loud, because between them they are the whole of the matter. First, the limit does not care about $f(a){:}$ the value of $f$ at $a$ is excluded from the definition, and $f$ need not even be defined there. Second, $x$ must be allowed to approach $a$ from both sides, and the same number $A$ must come out either way. This is a working definition and not the final word; Lecture 5 makes it precise.
Guess first. The next question is the one under the heading of this section. Answer it before you read on.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
You are asked for $$\lim_{x \to 2} \frac{3x^2 + 3x - 18}{x - 2}$$
Substituting $x = 2$ gives $\tfrac{0}{0}$. What does that tell you?
- Why is that answer tempting? Reads an indeterminate form as a verdict. The commonest limit error there is — and fatal, because every derivative is a 0/0.
- Why is that answer tempting? Treats 0/0 as ordinary arithmetic, resolving it to the numerator.
- Why is that answer tempting? Also treats 0/0 as ordinary arithmetic, resolving it the other way. Pairs with B: whichever rule you reach for, the error is the same.
$\tfrac{0}{0}$ tells you only that substitution has failed. It says nothing about whether the limit exists.
Here the numerator vanishes at $x = 2,$ so it has $(x-2)$ as a factor: $$\begin{aligned} \frac{3x^2 + 3x - 18}{x-2} &= \frac{3(x-2)(x+3)}{x-2} \\ &= 3(x+3) \end{aligned}$$ for every $x \neq 2$ — which is all the limit ever looks at. So the limit is $3 \cdot 5 = 15.$
And this is not an exotic case. Put $h = 0$ in $\dfrac{f(a+h)-f(a)}{h}$ and you get $\tfrac{0}{0},$ every single time. If A were right, there would be no derivatives and no calculus.
A limit where substitution gives 0/0
Find $\displaystyle\lim_{x\to 2}\frac{3x^{2}+3x-18}{x-2}.$
Try it yourself first. Then open one step at a time.
Substituting $x=2$ gives $0/0,$ so there is work to do.
The numerator vanishes at $x=2,$ and therefore has $x-2$ as a factor: $$ \begin{aligned} &\frac{3x^{2}+3x-18}{x-2} \\ &\quad= \frac{3(x-2)(x+3)}{x-2} \\ &\quad= 3(x+3) \end{aligned} $$ for every $x\ne2,$ which is all the limit ever looks at.
Hence the limit is $3\cdot5=15.$
The limit is $15.$
Cancelling $x-2$ is legal precisely because $x\ne2$ — the same move that made the Newton quotient work in Lecture 2, where one factor of $h$ was cancelled under the standing assumption $h\ne0.$
That the numerator has the factor $x-2$ is the factor theorem of Lecture 1 (Fact 1.17): a polynomial that is zero at $x=2$ is $x-2$ times another polynomial. The other factor is found by division or, as here, by taking out the $3$ and factoring $x^{2}+x-6.$
Suppose $\lim_{x\to a}f(x)=A$ and $\lim_{x\to a}g(x)=B.$ Then $$ \begin{aligned} \lim_{x\to a}\bigl(f(x)\pm g(x)\bigr) &= A\pm B\,,\\ \lim_{x\to a} f(x)g(x) &= AB\,,\\ \lim_{x\to a}\frac{f(x)}{g(x)} &= \frac{A}{B}\ \ (B\ne0)\,, \end{aligned} $$ together with $\lim_{x\to a}c=c$ for a constant $c,$ and $\lim_{x\to a}x=a.$
Applying these repeatedly to $\lim_{x\to a}x = a$ builds up every polynomial, and then every rational function whose denominator is not zero at $a.$ For such functions, therefore, you just substitute. That has a consequence worth stating plainly: the only limits that require any thought at all are the ones where substituting gives $\tfrac{0}{0}$ — which is why every limit in the exercises looks the way it does, and why the derivative is a serious idea rather than a triviality.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
A function is given by $$ \begin{aligned} f(x)&=\frac{x^{2}-9}{x-3}\quad\text{for } x\ne3\,,\\ f(3)&=10\,. \end{aligned} $$ What is $\displaystyle\lim_{x\to3}f(x)?$
- Why is that answer tempting? Takes the limit to be the value at the point. Definition 3.1 excludes $x=3{:}$ the limit is decided by the values near $3$ and $f(3)$ plays no part.
- Why is that answer tempting? The limit exists whenever the values near $3$ settle on one number. Whether that number equals $f(3)$ is a different question, which Lecture 5 takes up.
- Why is that answer tempting? Reads $\tfrac{0}{0}$ as $0.$ Substituting $x=3$ into the quotient only shows that substitution has failed (Watch out 3.2).
For every $x\ne3,$ $$ f(x)=\frac{(x-3)(x+3)}{x-3}=x+3\,, $$ and the limit looks only at such $x.$ So the limit is $3+3=6.$ The value $f(3)=10$ was chosen freely and changes nothing: the limit does not care about $f(a).$
The rules that need no thought
What is the derivative of $5-\dfrac{2}{x^{3}},$ and is it positive or negative for $x>0?$
In Lecture 2 the derivative of $x^{2}$ took five lines of work with the Newton quotient (Example 2.19). The first rules cost nothing of that kind: each is read off from the definition in one line, and after that it is simply used.
Let $A$ be a constant and let $g$ and $h$ be differentiable. Then $$ \begin{aligned} f(x) = A &\Longrightarrow f'(x) = 0\\ f(x) = A + g(x) &\Longrightarrow f'(x) = g'(x)\\ f(x) = A\cdot g(x) &\Longrightarrow f'(x) = A\,g'(x)\\ f(x) = x^{a} &\Longrightarrow f'(x) = a\,x^{a-1}\\ f(x) = g(x)+h(x) &\Longrightarrow f'(x) = g'(x)+h'(x)\\ f(x) = g(x)-h(x) &\Longrightarrow f'(x) = g'(x)-h'(x) \end{aligned} $$ In words: additive constants disappear, multiplicative constants survive.
Every one of these is a single line from Definition 2.17, and they all have the same shape. The constant-multiple rule, for instance: the Newton quotient of $Ag$ is $$ \frac{Ag(x+h)-Ag(x)}{h} = A\cdot\frac{g(x+h)-g(x)}{h}\,, $$ so $A$ comes out of the quotient, out of the limit by Fact 3.4, and lands in front of $g'(x).$ Nothing here is worth memorising as a separate fact.
One caveat about the power rule, stated honestly. As proved from the definition it covers $f(x)=x^{n}$ for a natural number $n;$ the quotient rule below extends it to negative integers, and Fact 4.14 in Lecture 4 finishes the job for every real exponent using logarithms. It is stated here in full because it is true in full and you will use it in full.
Try it before you read the example. The question is the one under the heading of this section.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
Find $f'(x)$.
- Why is that answer tempting? Right power, one minus sign lost. There are two — the $-2$ out front and the $-3$ in the exponent — and they cancel.
- Why is that answer tempting? Carries the additive constant through. Additive constants disappear: that is the second line of Fact 3.5.
- Why is that answer tempting? Subtracts 1 from the size of the exponent instead of from the exponent: $-3$ goes to $-2$ rather than $-4.$ The characteristic negative-exponent error.
Rewrite before differentiating — that is the whole technique: $$f(x) = 5 - 2x^{-3}$$
The constant $5$ disappears. The power rule gives $$f'(x) = -2 \cdot (-3) x^{-4} = 6x^{-4} = \frac{6}{x^{4}}$$
Two minus signs, so the answer is positive. A sanity check that costs nothing: for $x > 0$, $2/x^3$ is falling, so $-2/x^3$ is rising, so $f'$ must be positive.
| exponent | derivative | |
|---|---|---|
| correct | $-3 \to -4$ | $6x^{-4}$ |
| error D | $-3 \to -2$ | $-6x^{-2}$ |
Rewrite, then differentiate
Differentiate $f(x) = 5 - \dfrac{2}{x^{3}}.$
Try it yourself first. Then open one step at a time.
Rewrite before differentiating — that is the whole technique. Anything of the form a constant over a power should become a negative exponent before you touch it: $$ f(x) = 5 - 2x^{-3}\,, $$
so $$ \begin{aligned} f'(x) &= -2\cdot(-3)x^{-4} \\ &= 6x^{-4} = \frac{6}{x^{4}}\,. \end{aligned} $$ The additive constant $5$ disappears. There are two minus signs — the $-2$ in front and the $-3$ in the exponent — and they cancel, so the answer is positive.
A check that costs nothing: for $x>0$ the quantity $2/x^{3}$ is falling, so $-2/x^{3}$ is rising, so $f'$ must indeed be positive.
$f'(x)=\dfrac{6}{x^{4}},$ which is positive for every $x\ne0.$
The same rewriting deals with roots, since $\sqrt{x}=x^{1/2}$ is a power like any other. The next example is the app's own, not one of the notes' numbered examples.
A root, a constant multiple and a constant
Differentiate $f(x)=6\sqrt{x}+\dfrac{x^{5}}{5}-7$ for $x>0.$
Try it yourself first. Then open one step at a time.
Rewrite. The root is a power with exponent $\tfrac12,$ and $\dfrac{x^{5}}{5}$ is the constant $\tfrac15$ times $x^{5}{:}$ $$ f(x)=6x^{1/2}+\tfrac15x^{5}-7\,. $$
Term by term. The exponent $\tfrac12$ goes to $\tfrac12-1=-\tfrac12,$ the constants $6$ and $\tfrac15$ survive and the $-7$ disappears: $$ \begin{aligned} f'(x) &= 6\cdot\tfrac12x^{-1/2}+\tfrac15\cdot5x^{4} \\ &= \frac{3}{\sqrt{x}}+x^{4}\,. \end{aligned} $$
Check. For $x>0$ both $\sqrt{x}$ and $x^{5}$ are rising, so $f'$ should be positive, and it is.
Products and quotients
The derivative of a sum is the sum of the derivatives. Is the derivative of a product the product of the derivatives?
Here guessing fails. The derivative of a product is not the product of the derivatives, and the reason is worth a picture.
Think of a rectangle $f$ wide and $g$ tall, so that its area is $fg.$ Grow both sides a little. The new area arrives in three pieces — two strips and a corner: $$ g\,\Delta f \;+\; f\,\Delta g \;+\; \Delta f\,\Delta g\,. $$
Divide by $\Delta x$ and let $\Delta x\to0.$ The two strips give $f'g$ and $fg'.$ The corner has two small factors, so even after dividing by one $\Delta x$ it still carries a factor tending to zero, and it vanishes. That corner is exactly the $f'g'$ that everybody wants to write down: not a random wrong guess, but a real part of the growth — the one part too small to survive the limit.
If $f$ and $g$ are differentiable, then $$ (fg)'(x) = f'(x)g(x) + f(x)g'(x)\,. \tag{3.1} $$
The obstacle, and the trick. The obstacle in $\bigl(f(x+h)g(x+h)-f(x)g(x)\bigr)/h$ is that no Newton quotient is visible anywhere in it. The trick is to subtract and add $f(x)g(x+h),$ which changes nothing and lets the numerator regroup: $$ \begin{aligned} &\frac{f(x+h)-f(x)}{h}\cdot g(x+h) \\ &\quad+\; f(x)\cdot\frac{g(x+h)-g(x)}{h}\,. \end{aligned} $$
Let $h$ tend to $0.$ Both quotients tend to derivatives, and $g(x+h)\to g(x),$ so Fact 3.4 gives (3.1). Note that the first term carries $g(x+h)$ and not $g(x){:}$ that is the corner again, in algebra.
Guess first. If no formula comes to mind, raise the price by one krona and ask what you gain on the units you were already selling, and what you lose because some customers walk away.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
A firm sells $D(P)$ units at price $P$, so its revenue is $$R(P) = P \cdot D(P)$$
Demand falls when the price rises, so $D'(P) < 0$.
What is $R'(P)$?
- Why is that answer tempting? This is f′g′ in disguise: the derivative of P is 1, times D′. The exact error the area picture was built to prevent.
- Why is that answer tempting? Differentiates D and treats P as a constant. Forgets that the first factor is the variable.
- Why is that answer tempting? Multiplies the function by its own derivative — pattern-matching on ‘the product rule has a product in it’.
Raise the price by one krona:
- you gain a krona on each of the $D(P)$ units you already sold
- you lose the customers who walk away, worth $P\,D'(P)$ — negative
What you gain minus what you lose. The two terms are the two strips; $D'(P)$ on its own is the corner.
Marginal revenue
A firm sells $D(P)$ units at price $P,$ so its revenue is $R(P)=P\cdot D(P).$ Demand falls as the price rises, so $D'(P)<0.$ Find $R'(P)$ and read it economically.
Try it yourself first. Then open one step at a time.
By (3.1), with the two factors $P$ and $D(P),$ $$ \begin{aligned} R'(P) &= 1\cdot D(P) + P\cdot D'(P) \\ &= D(P) + P\,D'(P)\,. \end{aligned} $$
Raise the price by one krona. You gain a krona on each of the $D(P)$ units you were already selling, which is the first term; and you lose the customers who walk away, which is the second and is negative. Revenue rises or falls according to which is larger.
The two terms are the two strips of the rectangle — and $D'(P)$ on its own, the tempting wrong answer, is the corner.
$R'(P)=D(P)+P\,D'(P){:}$ the gain on the units still sold, plus the (negative) loss from the units no longer sold.
Recap The economics words used in this lecture
| word | symbol | what it means |
|---|---|---|
| quantity, demand | $Q,$ $D(P)$ | units sold |
| price | $P$ | price per unit |
| revenue | $R = P\cdot Q$ | money in |
| cost | $C(Q)$ | money out |
| marginal anything | $R',$ $C'$ | the effect of one more unit: the derivative |
| average cost | $C(x)/x$ | cost per unit produced |
| real wage | $W/P$ | the wage $W$ measured in what it buys at the price level $P$ |
If $f$ and $g$ are differentiable and $g(x)\ne0,$ then $$ \left(\frac{f}{g}\right)'(x) = \frac{f'(x)g(x)-f(x)g'(x)}{g(x)^{2}}\,. \tag{3.2} $$
No new idea is needed. Write $f = \dfrac{f}{g}\cdot g$ and differentiate both sides with the product rule: $f' = \bigl(\tfrac{f}{g}\bigr)'g + \tfrac{f}{g}\,g'.$ Solving for $\bigl(\tfrac{f}{g}\bigr)'$ and putting the right-hand side over the common denominator $g^{2}$ gives (3.2).
Average cost against marginal cost
A firm producing $x$ units at total cost $C(x)$ has average cost $A(x)=C(x)/x$ and marginal cost $C'(x).$ When is average cost rising?
Try it yourself first. Then open one step at a time.
By (3.2) with $f=C$ and $g=x,$ $$ \begin{aligned} A'(x) &= \frac{C'(x)\,x - C(x)}{x^{2}} \\ &= \frac{1}{x}\left(C'(x) - \frac{C(x)}{x}\right)\,, \end{aligned} $$ so for $x>0$ the sign of $A'(x)$ is the sign of $C'(x)-A(x).$
Average cost is rising exactly when marginal cost exceeds average cost, falling exactly when it is below, and stationary exactly when the two are equal.
The next unit pulls the average towards itself — which is the same reason a batting average rises only after a good innings.
Average cost is rising exactly where $C'(x)>A(x){:}$ where the next unit costs more than the average so far.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
Which of these is the derivative of $\dfrac{x}{x+2}$ for $x\ne-2?$
- Why is that answer tempting? The numerator in the wrong order, $fg'-f'g.$ Put $g\equiv1$ in what you wrote: it gives $-f',$ so the signs are the wrong way round (Watch out 3.12).
- Why is that answer tempting? The derivative of the top over the derivative of the bottom, $f'/g'=1/1.$ A quotient is no more differentiated piece by piece than a product is.
- Why is that answer tempting? The right numerator over $g$ and not over $g^{2}.$ The denominator of (3.2) is squared.
With $f(x)=x$ and $g(x)=x+2$ we have $f'=1$ and $g'=1,$ so by (3.2) $$ \begin{aligned} \left(\frac{x}{x+2}\right)'&=\frac{1\cdot(x+2)-x\cdot1}{(x+2)^{2}}\\ &=\frac{2}{(x+2)^{2}}\,. \end{aligned} $$ A check on the sign: $\dfrac{x}{x+2}=1-\dfrac{2}{x+2},$ which rises as $x$ grows past $-2,$ so a positive derivative is right.
Relative rates: growth in per cent
Nominal wages rise by $8\%$ a year and prices by $3\%$ a year. About how fast does the real wage $W/P$ rise?
Both rules have a second reading, in terms of proportional rather than absolute change, and for economics it is the more useful one.
For instance, a monthly wage of $40\,000$ kronor that is rising by $2\,000$ kronor a year has the relative rate of change $2\,000/40\,000=0.05$ a year: it is rising by $5\%$ a year. The same $2\,000$ kronor on a wage of $20\,000$ would be $10\%.$
Wherever the quantities are nonzero, $$ \begin{aligned} \frac{(fg)'}{fg} &= \frac{f'}{f} + \frac{g'}{g}\,,\\ \frac{(f/g)'}{f/g} &= \frac{f'}{f} - \frac{g'}{g}\,. \end{aligned} $$ Relative rates add for products and subtract for quotients.
Divide the two rules through. Divide (3.1) by $fg,$ and (3.2) by $f/g;$ in each case the terms simplify to the ones shown.
A second route, through the logarithm. There is a second route that explains why the result looks so much like something already seen: Lecture 2 gave $\ln(fg)=\ln f+\ln g$ and $\ln(f/g)=\ln f-\ln g.$ Differentiating those, once we know from (4.2) in Lecture 4 that $\ln u$ differentiates to $u'/u,$ produces exactly these two identities. The logarithm rules and the relative-rate rules are one fact seen twice.
Now the question under the heading of this section.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
Nominal wages are rising by 8% a year. Prices are rising by 3% a year.
The real wage is $w = W/P$. About how fast is it rising?
- Why is that answer tempting? Adds the two rates. Would be right for a product, $WP$ — which is not a quantity anyone wants.
- Why is that answer tempting? Divides the percentages, $8/3.$ Confuses ‘the quantity is a quotient’ with ‘the rates are a quotient’ — the exact thing Fact 3.15 is about.
- Why is that answer tempting? Right magnitude, sign flipped: subtracts the wage growth from inflation instead of the other way round.
A quotient, so the relative rates subtract. This is Fact 3.15 with $f = W$ and $g = P{:}$ $$\begin{aligned} \frac{w'}{w} &= \frac{W'}{W} - \frac{P'}{P} \\ &= 8\% - 3\% = 5\% \end{aligned}$$
That is exact for instantaneous rates. Read the 8% and 3% as year-on-year factors instead, and $$\begin{aligned} \frac{w(t+1)}{w(t)} &= \frac{W(t+1)/W(t)}{P(t+1)/P(t)} \\ &= \frac{1.08}{1.03} = 1.0485, \end{aligned}$$ so $4.85\%.$ Subtracting is an excellent approximation for small rates, and it is how the number is always quoted.
This is the most-used derivative formula in economics. If nominal wages $W$ grow at $8\%$ a year and prices $P$ at $3\%,$ the real wage $w=W/P$ grows at about $8-3=5\%;$ exactly, $1.08/1.03=1.0485,$ so $4.85\%,$ and the subtraction is an excellent approximation for small rates. If wages and prices rise at the same rate the real wage is constant, which is what people mean when they say a pay rise was eaten by inflation.
The product half of Fact 3.15 is used in the same way. The next example is the app's own.
Revenue when the price rises and sales fall
A shop raises its price $P$ by $4\%$ a year, and the quantity $Q$ it sells falls by $1\%$ a year. About how fast does the revenue $R=PQ$ change?
Try it yourself first. Then open one step at a time.
A product, so the relative rates add. The quantity is falling, so its relative rate is negative: $Q'/Q=-1\%.$ By Fact 3.15, $$ \begin{aligned} \frac{R'}{R}&=\frac{P'}{P}+\frac{Q'}{Q}\\ &=4\%+(-1\%)=3\%\,. \end{aligned} $$
Compare with the year-on-year factors. After one year the price is $1.04$ times and the quantity $0.99$ times what it was, so the revenue is $$ 1.04\times0.99=1.0296 $$ times what it was: a rise of $2.96\%.$ The sum $3\%$ is the approximation, and a good one.
Revenue rises by about $3\%$ a year ($2.96\%$ if the rates are read as year-on-year factors).
The chain rule
If $z$ moves three times as fast as $y,$ and $y$ moves five times as fast as $x,$ how fast does $z$ move compared with $x?$
Most functions met in practice are built by composition: $z$ depends on $y,$ and $y$ depends on $x.$ The rule for differentiating through the chain is the one rule in this lecture that needs practice rather than merely understanding.
Let $F(x) = g\bigl(f(x)\bigr),$ with $f$ differentiable at $x$ and $g$ differentiable at $f(x).$ Then $$ F'(x) = g'\bigl(f(x)\bigr)\cdot f'(x)\,. \tag{3.3} $$ Writing $z=g(y)$ and $y=f(x),$ the same statement in Leibniz's notation is $$ \frac{dz}{dx} = \frac{dz}{dy}\cdot\frac{dy}{dx}\,. $$
In words: differentiate the outside, evaluated at the inside, then multiply by the derivative of the inside. Better still, in words about rates: if $z$ moves three times as fast as $y$ and $y$ moves five times as fast as $x,$ then $z$ moves fifteen times as fast as $x.$ Nobody finds that surprising, and it is the entire rule. The Leibniz form is easiest to remember because the $dy$ appears to cancel — but that is a mnemonic, not a proof, since $dy$ is not a number you may cancel.
Rates multiply
Three tracks: $x$ drives $y,$ and $y$ drives $z.$
- Drag the slider for $x$ and watch the dots for $y$ and $z{:}$ they move at different speeds.
- Press Δx → 0. The three printed ratios $\Delta y/\Delta x,$ $\Delta z/\Delta y$ and $\Delta z/\Delta x$ settle on $f'(x),$ $g'(y)$ and their product.
- Look at where the middle rate is read off: at $y,$ not at $x.$
- Press the button outer once, so that it shows $z=1/y.$ The middle rate is now negative, so $z$ falls while $y$ still rises.
The outer derivative at the inner value
Let $F(x) = \bigl(2-x^{2}\bigr)^{3}.$ Find $F'(-3).$
Try it yourself first. Then open one step at a time.
Here $F=g\circ f$ with $g(y)=y^{3}$ and $f(x)=2-x^{2},$ so $g'(y)=3y^{2}$ and $f'(x)=-2x.$
The inner value at $x=-3$ is $f(-3)=2-9=-7,$ and therefore $$ \begin{aligned} F'(-3) &= g'\bigl(f(-3)\bigr)\cdot f'(-3) \\ &= 3\cdot(-7)^{2}\cdot 6 \\ &= 147\cdot6 = 882\,. \end{aligned} $$
Evaluating the outer derivative at $-3$ instead would give $3\cdot(-3)^{2}=27$ and the answer $162.$ Nothing on the page announces which of $882$ and $162$ is right; only the habit of substituting the inner value does.
$F'(-3)=882.$ The outer derivative $3y^{2}$ is evaluated at the inner value $y=-7,$ not at $x=-3.$
Guess first. Before any formula, write down the units of the two numbers in the next question.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
At today's price, demand for butter falls by about 5 000 kg for each 1 krona the price rises.
The price is rising by 0.05 kronor per month.
About how fast is demand falling?
- Why is that answer tempting? Reports dx/dp and ignores dp/dt entirely — answers a question about price with a rate per month attached.
- Why is that answer tempting? Divides instead of multiplying: 5 000 / 0.05. Dimensionally impossible, and a units check kills it instantly.
- Why is that answer tempting? True in general — both rates do vary with the price — but the stem fixes them at today's price. Worth respecting rather than dismissing.
The units do the whole job: $$\frac{\text{kg}}{\text{krona}} \times \frac{\text{krona}}{\text{month}} = \frac{\text{kg}}{\text{month}}$$
Kronor cancel, exactly as the $dy$ appears to in $\frac{dz}{dy}\frac{dy}{dx}.$
C deserves credit. In reality $dx/dp$ does depend on the price, and a careful economist would ask. The stem says "at today's price" precisely to fix it — and noticing that the question needed fixing is a better instinct than not noticing.
Rates multiply, and the units say so
At today's price, demand for butter falls by about $5\,000$ kg for each krona the price rises, and the price is rising by $0.05$ kronor per month. How fast is demand falling?
Try it yourself first. Then open one step at a time.
Write $x$ for demand, $p$ for price and $t$ for time. We are given $dx/dp = -5\,000$ and $dp/dt = 0.05,$ and want $dx/dt{:}$ $$ \begin{aligned} \frac{dx}{dt} &= \frac{dx}{dp}\cdot\frac{dp}{dt} \\ &= (-5\,000)\times 0.05 \\ &= -250\ \text{kg per month.} \end{aligned} $$
The units settle the whole question, including whether to multiply or divide: $$ \frac{\text{kg}}{\text{krona}}\times\frac{\text{krona}}{\text{month}} = \frac{\text{kg}}{\text{month}}\,, $$ the kronor cancelling exactly as the $dy$ appears to in $\frac{dz}{dy}\frac{dy}{dx}.$
Dividing instead would have produced kg $\cdot$ month per $\text{krona}^{2},$ which is not a thing. Chain-rule problems are units problems: write the units down first and the arithmetic follows.
Demand is falling by $250$ kg per month.
With five rules in play the difficulty is no longer any single rule but knowing which to reach for, and that is decided by structure rather than by appearance.
The Method at work, on an expression that needs two rules. The example is the app's own.
Method 3.20 on a product with a bracket to a power
Differentiate $h(x)=x\,(2x+1)^{3}.$
Try it yourself first. Then open one step at a time.
Step 1, rewrite. There is nothing to rewrite. Multiplying the bracket out would be possible, and slow.
Step 2, the outermost operation. To evaluate $h$ at a number you would compute $2x+1,$ cube it, and last multiply by $x.$ The last operation is a product, so the product rule comes first: $$ \begin{aligned} h'(x)&=1\cdot(2x+1)^{3}\\ &\quad+x\cdot\bigl((2x+1)^{3}\bigr)'\,. \end{aligned} $$
Step 3, a fresh problem. $(2x+1)^{3}$ is a composition: outside $y^{3},$ inside $y=2x+1.$ By the chain rule its derivative is $3(2x+1)^{2}\cdot2=6(2x+1)^{2}.$ So $$ \begin{aligned} h'(x) &= (2x+1)^{3} \\ &\quad+6x(2x+1)^{2} \\ &= (2x+1)^{2}(2x+1+6x) \\ &= (2x+1)^{2}(8x+1)\,. \end{aligned} $$
Step 4, check. The outer derivative $3y^{2}$ was evaluated at the inner value $2x+1,$ and the product rule gave two terms. A number: $h(0)=0$ and $h(1)=27,$ so $h$ rises on the way, and $h'(0)=1$ and $h'(1)=81$ are both positive.
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
You are about to differentiate $$ F(x)=\Bigl(x^{2}+\frac{1}{x}\Bigr)^{5}. $$ According to Method 3.20, which rule do you apply first?
- Why is that answer tempting? The sum is the first thing you compute when evaluating $F$ at a number, and the last thing you differentiate. Method 3.20 asks for the last operation, which is the fifth power.
- Why is that answer tempting? $\dfrac{1}{x}$ is a constant over a power: step 1 rewrites it as $x^{-1}$ and no quotient rule is needed. And it sits inside the bracket, so its turn comes later.
- Why is that answer tempting? This differentiates the outside and stops. The power rule is for $x^{a},$ with $x$ itself inside. Here the inside is a function, and its derivative is missing as a factor.
Evaluating $F$ at a number, the last thing you do is raise the bracket to the fifth power. So $F$ is a composition with outside $y^{5}$ and inside $y=x^{2}+x^{-1},$ and the chain rule comes first: $$ F'(x)=5\Bigl(x^{2}+\frac1x\Bigr)^{4}\cdot\Bigl(2x-\frac{1}{x^{2}}\Bigr). $$ The sum rule and the power rule are used inside, on $x^{2}+x^{-1},$ which is the fresh problem of step 3.
Looking ahead: two derivatives borrowed from Lecture 4. This paragraph is not in the lecture notes at this point. Some of the practice problems of this lecture contain $e^{x}$ or $\ln x,$ whose derivatives are found in Lecture 4 (Fact 4.2 and Fact 4.5): $$ \bigl(e^{x}\bigr)'=e^{x}\,,\qquad \bigl(\ln x\bigr)'=\frac{1}{x}\quad(x>0)\,. $$ Take them on trust for now. With the chain rule they give, for example, $\bigl(e^{3x}\bigr)'=e^{3x}\cdot3$ and $\bigl(\ln(2x+1)\bigr)'=\dfrac{1}{2x+1}\cdot2$ for $x>-\tfrac12.$
Higher-order derivatives
$f'$ says which way the curve goes. What does the derivative of $f'$ say?
Mechanically there is nothing new: differentiate, then differentiate the answer. What is new is the reading.
For instance, $f(x)=x^{4}$ has $$ \begin{aligned} f'(x)&=4x^{3}, & f''(x)&=12x^{2},\\ f'''(x)&=24x, & f^{(4)}(x)&=24\,, \end{aligned} $$ and every derivative after the fourth is $0.$
On an interval where $f$ is twice differentiable,
- $f''>0{:}$ the slope is increasing, the curve bends upwards, and its tangents lie below it;
- $f''<0{:}$ the slope is decreasing, the curve bends downwards, and its tangents lie above it.
So $f'$ tells you which way the curve goes and $f''$ tells you how that is changing — a rate of change of a rate of change. Position, speed and acceleration are the standard illustration; the economic one matters more here. If $C(Q)$ is total cost then $C'(Q)$ is marginal cost, and $C''(Q)$ says whether marginal cost is itself rising, which is the difference between the lazy-S cost curve of Lecture 1 and a parabola. Lecture 6 puts $f'$ and $f''$ together to turn candidate maxima into answers, and Lecture 7 uses them to classify local ones. Every rule in this lecture is machinery for that.
A cost curve of that lazy-S kind, with numbers. The example is the app's own.
A cost curve that bends both ways
The total cost of producing $Q$ units is $C(Q)=Q^{3}-6Q^{2}+15Q+10$ for $Q\ge0.$ Find the marginal cost and say for which $Q$ it is falling and for which it is rising. Does total cost ever fall?
Try it yourself first. Then open one step at a time.
Differentiate twice. $$ \begin{aligned} C'(Q)&=3Q^{2}-12Q+15\,,\\ C''(Q)&=6Q-12=6(Q-2)\,. \end{aligned} $$
Read the sign of $C''.$ For $0\le Q<2$ we have $C''(Q)<0{:}$ marginal cost is falling, and the cost curve bends downwards. For $Q>2$ we have $C''(Q)>0{:}$ marginal cost is rising, and the curve bends upwards. In numbers, $C'(1)=6,$ $C'(2)=3$ and $C'(3)=6.$
Read the sign of $C'.$ Completing the square, $$ \begin{aligned} C'(Q)&=3(Q-2)^{2}+3\\ &\ge 3>0\,, \end{aligned} $$ so total cost rises throughout (Fact 2.23). The curve never turns round. It only changes the way it bends, at $Q=2.$
Marginal cost $C'(Q)=3Q^{2}-12Q+15$ falls for $Q<2$ and rises for $Q>2;$ its smallest value is $C'(2)=3.$ Total cost rises for every $Q,$ since $C'(Q)\ge3.$
Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.
Let $f(x)=x^{3}-3x^{2}.$ For which $x$ does the graph of $f$ bend upwards?
- Why is that answer tempting? That is part of where $f$ is increasing: $f'(x)=3x(x-2)>0$ for $x>2.$ Which way the curve goes is read from $f'.$ How it bends is read from $f''.$
- Why is that answer tempting? The right second derivative with the inequality turned round: $6x-6$ is negative for $x<1,$ and there the curve bends downwards.
- Why is that answer tempting? Comes from $f''(x)=6x,$ with the term $-3x^{2}$ forgotten in the second differentiation. It contributes $-6.$
$f'(x)=3x^{2}-6x$ and $f''(x)=6x-6=6(x-1).$ By Fact 3.22 the curve bends upwards where $f''>0,$ that is for $x>1.$
Notice that between $x=1$ and $x=2$ the curve bends upwards while $f$ is still decreasing, since $f'(x)=3x(x-2)<0$ there: the slope is negative and increasing.
What you should take away
- $\lim_{x\to a}f(x)=A$ ignores $f(a)$ entirely and requires both sides to agree. For polynomials and for rational functions with a nonzero denominator you may simply substitute — so the only interesting limits are the ones where substitution gives $\tfrac00,$ and $\tfrac00$ is a signal, never a verdict.
- Additive constants disappear and multiplicative constants survive; $(x^{a})'=ax^{a-1},$ with the $1$ subtracted from the exponent and not from its size; and sums differentiate term by term.
- $(fg)' = f'g+fg'$ — two strips, and the corner $f'g'$ is precisely the piece that does not survive. $(f/g)' = (f'g-fg')/g^{2},$ whose sign order is checked in five seconds by putting $g\equiv1.$
- Divided through, those become the relative-rate rules: $f'/f + g'/g$ for a product and $f'/f - g'/g$ for a quotient. Percentages add and subtract even when the quantities multiply and divide, which is why economists speak in percentages.
- Chain rule: $F=g\circ f$ has $F' = g'(f(x))\cdot f'(x)$ — rates multiply, and the outer derivative is evaluated at the inner value. The units of the two factors decide whether to multiply or divide.
- $f''$ is the rate at which the slope changes: positive means bending upwards, negative bending downwards. With $C$ a cost function, $C''$ says whether marginal cost is rising.
Think further
Questions without computation. Think on your own or with a classmate before opening the thought.
Discussion question 1 — what 0/0 tells you
Substituting $x=2$ into $\dfrac{x^{2}-4}{x^{2}-3x+2}$ gives $\tfrac00.$ What does that tell you?
(A) the limit does not exist;
(B) the limit is $0;$
(C) the limit is $1;$
(D) nothing yet.
One way to think about it
(D). $\tfrac00$ says only that substitution has failed (Watch out 3.2). Both polynomials vanish at $x=2,$ so both have the factor $x-2{:}$ $$ \begin{aligned} \frac{x^{2}-4}{x^{2}-3x+2}&=\frac{(x-2)(x+2)}{(x-2)(x-1)}\\ &=\frac{x+2}{x-1} \end{aligned} $$ for $x\ne2.$ Now substitution works, and the limit is $\dfrac{4}{1}=4.$ So the limit exists, and it is neither $0$ nor $1.$
Discussion question 2 — a constant over a power
Differentiate $f(x)=3-\dfrac{1}{x^{2}}.$ Which of the following is right?
(A) $2x^{-3};$
(B) $-2x^{-3};$
(C) $2x^{-1};$
(D) $3+2x^{-3}.$
One way to think about it
(A). Rewrite first: $f(x)=3-x^{-2}.$ The constant $3$ disappears, and the exponent goes from $-2$ to $-3{:}$ $$ f'(x)=-(-2)x^{-3}=2x^{-3}\,. $$ (B) has lost one of the two minus signs, (C) subtracts one from the size of the exponent (Watch out 3.6), and (D) carries the additive constant along. A check on the sign: for $x>0$ the quantity $1/x^{2}$ falls, so $f$ rises.
Discussion question 3 — the price at which revenue is largest
In Example 3.10, at what price is revenue at its largest, in terms of $D$ and $D'?$ What has become of the corner there?
One way to think about it
Where revenue is at its largest, a small change of price must neither raise nor lower it, so $R'(P)=0$ there (Lecture 6 makes this step precise): $$ \begin{aligned} D(P)+P\,D'(P)&=0\,,\quad\text{that is} \\ P&=-\frac{D(P)}{D'(P)}\,, \end{aligned} $$ which is positive because $D'(P)<0.$ In words: the krona gained on each unit still sold is exactly balanced by the loss from the customers who leave. The two strips have the same size and opposite signs.
The corner has not come back into the derivative. But since the two strips cancel, the small terms that the limit throws away are all that is left of the change in revenue, and the corner $\Delta P\,\Delta D$ is one of them. It is negative whichever way the price moves, because $\Delta P$ and $\Delta D$ have opposite signs.
Discussion question 4 — a falling average cost
A firm's average cost is falling at the current output. What does that tell you about marginal cost, and does it tell you that average cost is low?
One way to think about it
By Example 3.13 the sign of $A'(x)$ is the sign of $C'(x)-A(x).$ So a falling average cost says exactly that marginal cost is below average cost: the next unit costs less than the average so far and pulls the average down.
It says nothing about the level. With $C(x)=100+2x$ the average cost at $x=1$ is $102$ and falling, because the marginal cost is $2.$ The average is high there. It is falling because it is high compared with the cost of the next unit.
Discussion question 5 — wages and prices at the same rate
Nominal wages rise by $6\%$ a year and prices by $6\%$ a year. What happens to the real wage, and what happens to the wage bill $WP?$
One way to think about it
The real wage is the quotient $W/P,$ so its relative rate is $6\%-6\%=0{:}$ it is constant. (Here that is exact, since $1.06/1.06=1.$) The pay rise was eaten by inflation.
The product $WP$ has relative rate $6\%+6\%=12\%$ by Fact 3.15. Read as year-on-year factors it is $1.06\times1.06=1.1236,$ a rise of $12.36\%.$ The sum is the approximation.
Discussion question 6 — a root of a sum as a composition
Write $F(x)=\sqrt{1+x^{2}}$ as $g(f(x))$ and differentiate it. At which point is the outer derivative evaluated?
One way to think about it
Inside $f(x)=1+x^{2},$ outside $g(y)=\sqrt{y}=y^{1/2}.$ Then $f'(x)=2x$ and $g'(y)=\tfrac12y^{-1/2},$ that is $\dfrac{1}{2\sqrt{y}},$ so by (3.3) $$ F'(x)=\frac{1}{2\sqrt{1+x^{2}}}\cdot2x=\frac{x}{\sqrt{1+x^{2}}}\,. $$ The outer derivative is evaluated at the inner value $y=1+x^{2},$ not at $x.$ For example at $x=0$ it is evaluated at $y=1,$ where it is $\tfrac12,$ and $F'(0)=\tfrac12\cdot0=0.$
Discussion question 7 — a positive second derivative
If $f''(x)>0$ everywhere, must $f$ be increasing? Must $f'$ be increasing?
One way to think about it
$f$ need not be increasing. Take $f(x)=x^{2}{:}$ $f''(x)=2>0$ everywhere, but $f$ is decreasing for $x\le0.$
$f'$ must be increasing. $f''$ is the derivative of $f',$ and a function whose derivative is positive on an interval is strictly increasing there (Fact 2.23, used on $f'$ in place of $f$). That is the first line of Fact 3.22: the slope is increasing. In the example the slope $2x$ rises from negative values through $0$ to positive ones.