Math for economyMM1005

How to find your way

  1. 1Search for the word that confuses you — the box at the top searches the whole course.
  2. 2Look it up in Concepts. Every concept links to the section that explains it. Concepts →
  3. 3Read the Watch out and Common error boxes: they show the mistakes that are actually made.
  4. 4Still stuck? Bring the question to the exercise session or send an email.

Lecturer: Eric Ahlqvist, [email protected] · Put “MM1005” in the subject line.

← 6
Lecture 7 Shape, and then turning round
8 →
7 One variable

Shape, and then turning round

When is a point where the tangent is horizontal a peak, when a trough, and when neither? And if all you know is the rate at which something changes, can you get the thing itself back?

This lecture has a hinge in the middle rather than a single theme, and it is worth naming before we start.

For six lectures every question has run one way: given $f,$ find $f'.$ The first half of today finishes that job. Lecture 6 used $f'$ to locate candidates and $f''$ to certify a global maximum; adding $f''$ at a single point gives the local picture too, and where $f''$ changes sign the curve changes the way it bends. Between them $f'$ and $f''$ describe the whole shape.

Then we turn round. Given $f',$ what was $f$? That question has an answer nobody expects, and it arrives in the fourth subsection.

⏱ 70 min read§ 5 sections

After this lecture you can

  • classify a point where $f'(c)=0$ as a local maximum, a local minimum or neither, by the sign of $f'$ on each side or by the sign of $f''(c),$ and say when $f''(c)$ tells you nothing
  • find the inflection points of a function: candidates from $f''(x)=0,$ confirmed by a change of sign, and say where the curve bends upwards and where downwards
  • find an antiderivative, check it by differentiating, and fix the constant of integration from a condition such as a fixed cost
  • divide first when the numerator's degree is not lower than the denominator's, and then integrate the polynomial and the remainder
  • evaluate a definite integral as $F(b)-F(a),$ and tell the integral (signed area) from the area
  • integrate a product by parts, choosing the factor to differentiate: the polynomial against an exponential, the logarithm against a polynomial
1

Local extreme points

A local maximum can lie lower than a local minimum somewhere else. How can a maximum be below a minimum?

Lecture 6 found the largest and the smallest value of a function on an interval by listing candidates and comparing their values (Method 6.15). Those are global questions: the comparison is against every point. Most of the time a curve has several peaks and troughs, and we want to say what each one is without looking at the others.

The first local maximum (left) is lower than the second local minimum (right): the dashed line at its height runs underneath. The global minimum and maximum are at the two ends.

The marked local maximum lies below the marked local minimum: the dashed line passes underneath it. Nothing is wrong — each point beats its own neighbours, which is all either claim asserts.

Fact 7.3Second-derivative test#

Let $c$ be an interior point with $f'(c)=0$, and let $f$ be twice differentiable near $c$. Then $$ \begin{aligned} &f''(c)<0 \;\Longrightarrow\;\\ &\qquad c \text{ is a local maximum point}\,,\\ &f''(c)>0 \;\Longrightarrow\;\\ &\qquad c \text{ is a local minimum point}\,. \end{aligned} $$ Alternatively, and always reliably, use the sign of $f'$: if $f'$ goes from $+$ to $-$ at $c$ then $c$ is a local maximum, from $-$ to $+$ a local minimum, and if the sign does not change, neither.

The two tests trade against each other. The sign test needs information on a whole interval; the second-derivative test needs it only at the single point $c,$ which is far quicker — and it pays for that convenience by sometimes declining to answer. In words, $f''(c)<0$ says the curve bends downwards at $c,$ so a horizontal tangent there has to be a peak.

Example

Classifying two stationary points

This example is the app's. Let $f(x)=x^{3}-3x^{2}-9x+5.$ Find the points where $f'(x)=0,$ classify each one, and give the value of $f$ there.

Try it yourself first. Then open one step at a time.

Guess first. The next question is the one case the second-derivative test leaves open. Answer it before you read on.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

At an interior point $c$ you find $$f'(c) = 0 \qquad \text{and} \qquad f''(c) = 0$$

What follows?

Example 7.5

Three functions, three outcomes

Three functions with $f'(0)=f''(0)=0,$ and all three possible outcomes: what kind of point is $0$ for $x^{4},$ for $-x^{4}$ and for $x^{3}$?

Try it yourself first. Then open one step at a time.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

A function $f,$ differentiable everywhere, has a local maximum at $x=1$ with $f(1)=2,$ and a local minimum at $x=4$ with $f(4)=5.$ What can you conclude?

2

Inflection points

You compute $f''(c)=0.$ Is $c$ a point where the curve changes the way it bends?

Above, $f;$ below, $f''.$ Where $f''<0$ the curve bends down, where $f''>0$ it bends up, and the dashed line marks where $f''$ changes sign.

Lecture 6 named the two ways a curve can bend: concave (bending downwards, chords below the graph) and convex (bending upwards, chords above), and Fact 6.20 read them off the sign of $f''.$ Most curves do not bend the same way everywhere. The point where the bending changes has a name.

By Fact 6.20(i) that is the same as saying $f$ is concave on one side of $c$ and convex on the other, so an inflection point is exactly where concavity gives out. On a production function it is where marginal product stops rising and starts falling.

Fact 7.7Necessary condition#

If $c$ is an inflection point of $f$ and $f''$ is continuous at $c$, then $f''(c)=0$.

Guess first. Does the converse hold? Answer the question below before you read the Watch out after it.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

You compute $f''(c) = 0$ at an interior point $c$.

Is $c$ an inflection point?

Left, $y=x^{3}{:}$ $f''$ changes sign at $0,$ an inflection. Right, $y=x^{4}{:}$ $f''(0)=0$ too, but $f''\ge0$ throughout, so no inflection.
Example 7.9

Touching zero and crossing zero

(a) Does $f(x)=x^{4}$ have an inflection at $0$? (b) Does $f(x)=x^{3}+x$?

Try it yourself first. Then open one step at a time.

The two halves of this subsection and the last have the same shape, and it is worth extracting once rather than memorising twice.

Example 7.11

The whole shape from two derivatives

Describe the shape of $f(x)=\tfrac19x^{3}-\tfrac16x^{2}-\tfrac23x+1$ completely.

Try it yourself first. Then open one step at a time.

That closes a thread running since Lecture 2. The derivative told us which way a curve goes; the second derivative tells us which way it bends; and between them they settle the shape without our ever plotting a point. The rest of this lecture goes the other way.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

Let $f(x)=x^{5}-5x^{4}.$ Then $$ \begin{aligned} f''(x)&=20x^{3}-60x^{2}\\ &=20x^{2}(x-3)\,. \end{aligned} $$ Where does $f$ have an inflection point?

3

Turning round: antiderivatives

A firm knows its marginal cost, $C'(Q)=2Q+10.$ Can it recover its total cost from that alone?

Every question so far has been: given $f,$ what is $f'$? Now the reverse. Given a rate of change, recover the quantity that was changing.

The sign $\int$ is read “the integral of”, and $dx$ names the variable. Every antiderivative can be checked by differentiating it: the derivative must give back the function under the sign.

Fact 7.13Antiderivatives differ by a constant#

If $F'=G'=f$ on an interval, then $F-G$ is constant there. So the $+C$ in Definition 7.12 describes all the freedom there is. The two antiderivatives to know at once are $$ \begin{aligned} &\int x^{a}\,dx = \frac{x^{a+1}}{a+1}+C \quad (a\ne-1)\,, \\ &\int \frac{1}{x}\,dx = \ln|x|+C\,, \end{aligned} $$ the second being the case the first cannot reach.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

Two students find antiderivatives of the same function $f$. One gets $F(x)$, the other gets $G(x)$, and $F \neq G$.

Can they both be right?

Recap Total, marginal and fixed cost
wordwhat it is
total cost $C(Q)$the cost of producing $Q$ units
marginal cost $C'(Q)$the cost of one more unit, the derivative (Lecture 2)
fixed cost $C(0)$what the firm pays before producing anything
variable cost $C(Q)-C(0)$the part that grows with $Q$
marginal productthe extra output from one more unit of input: the derivative of a production function
Example 7.15

Where the constant is the fixed cost

A firm's marginal cost is $C'(Q)=2Q+10.$ What is its total cost function?

Try it yourself first. Then open one step at a time.

Example

Dividing first, then integrating

This example is the app's; it joins Fact 1.22 of Lecture 1 to this lecture, and nothing in it is new. Find $$ \int \frac{x^{2}+3x+5}{x+1}\,dx \qquad\text{for } x>-1\,. $$

Try it yourself first. Then open one step at a time.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

Which function is an antiderivative of $\dfrac{x+5}{x+2}$ for $x>-2$?

4

The surprise: it measures area

Let $A(t)$ be the area under a curve from $a$ to $t.$ How fast does the area grow as $t$ moves to the right?

So far that is a definition and a piece of notation. The reason it matters is that the same number answers a completely different-looking question.

Guess first. Answer the question below by reasoning about a picture, not with a formula: push $t$ a little to the right, and ask how much area arrives.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

$A(t)$ is the area under the curve $y = f(x)$ between $a$ and $t$.

What is $A'(t)$?

The shaded area is $A(t).$ Moving $t$ by $\Delta t$ adds a strip of width $\Delta t$ and height about $f(t).$
Fact 7.17The area function is an antiderivative#

Let $f$ be continuous and non-negative on $[a,b]$, and let $A(t)$ be the area under the graph of $f$ between $a$ and $t$. Then $$ A'(t) = f(t)\,, $$ so $A$ is an antiderivative of $f$ with $A(a)=0$. Consequently the area under the graph between $a$ and $b$ is exactly $\int_{a}^{b}f(x)\,dx$.

That deserves a pause. Undoing a derivative and measuring the area under a curve look like entirely unrelated problems — one is algebra, the other geometry — and they are the same problem. This is the fundamental theorem of calculus, it is the hinge of the whole second half of this course, and it hands you the computation for free: to find an area, find an antiderivative and subtract.

Try it yourself

Area accumulating

Left, $y=f(x)$ with the area from $a$ to $t$ shaded; right, the area function $A(t)$ drawn as $t$ moves.

  1. Drag $t,$ or press sweep. Compare the two numbers under the panels: the height of $f$ at $t$ and the slope of $A$ at $t.$ They agree everywhere: that is $A'(t)=f(t),$ measured.
  2. Press the button with the formula until it reads $f(x)=2-x,$ the function that goes negative.
  3. Sweep $t$ past $2.$ The area function turns round and comes back down: area below the axis counts as negative, which is the Watch out further down.
Fact 7.18Properties#

For continuous $f$ and $g$ and constants $\alpha,\beta$, $$ \begin{aligned} &\int_{a}^{a}f = 0\,,\\ &\int_{b}^{a}f = -\int_{a}^{b}f\,,\\ &\int_{a}^{b}(\alpha f+\beta g) = \alpha\!\int_{a}^{b}\!f + \beta\!\int_{a}^{b}\!g\,, \end{aligned} $$ $$ \int_{a}^{b}f = \int_{a}^{c}f + \int_{c}^{b}f\,. $$ Each is immediate from (7.1).

Example 7.20

Area, and area that cancels

Evaluate (a) $\displaystyle\int_{0}^{1}x^{2}\,dx$ and (b) $\displaystyle\int_{-2}^{2}\bigl(x-x^{3}-x^{5}\bigr)\,dx.$

Try it yourself first. Then open one step at a time.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

What is $\displaystyle\int_{0}^{3}(x-2)\,dx$?

5

Integration by parts

The integral of a product is not the product of the integrals. So what is $\displaystyle\int x\,e^{x}\,dx$?

There is a pattern behind the whole of this half of the course: every integration rule is a differentiation rule read backwards. The power rule reversed gave $\int x^{a}dx;$ the product rule reversed gives the rule below; and the chain rule reversed will give substitution in Lecture 8. Integration is not a new subject so much as the old one run the other way.

Fact 7.21Integration by parts#

For differentiable $u$ and $v$, $$ \begin{aligned} &\int u(x)\,v'(x)\,dx\\ &\quad= u(x)v(x) - \int u'(x)\,v(x)\,dx\,. \end{aligned} \tag{7.2} $$

Formula (7.2) trades one integral for another, so it is progress only when the new one is easier. That makes the choice, not the formula, the whole skill of integration by parts.

Guess first. The example after the question is the same integral.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

To find $\displaystyle\int x\,e^{x}\,dx$ by parts, using $$\int u\,v'\,dx = uv - \int u'v\,dx$$

which choice works?

Example 7.23

A polynomial times an exponential

Find $\displaystyle\int x\,e^{x}\,dx.$

Try it yourself first. Then open one step at a time.

Example 7.24

From a practice exam

Calculate $\displaystyle\int_{1}^{e} x^{2}\ln x\,dx.$

Try it yourself first. Then open one step at a time.

Check yourself

Pick an answer before reading on. Getting it wrong is fine — that is how you find out what you believe.

By Example 7.23, $F(x)=xe^{x}-e^{x}$ is an antiderivative of $xe^{x}.$ What is $\displaystyle\int_{0}^{1}x\,e^{x}\,dx$?

What you should take away

  • A local extreme point beats its immediate neighbours only, and can sit lower than a local minimum elsewhere. Comparing values settles global extrema; local ones need information near the point.
  • At a stationary point, $f''(c)<0$ gives a local maximum and $f''(c)>0$ a local minimum, while $f''(c)=0$ gives no information — $x^{4},$ $-x^{4}$ and $x^{3}$ are a minimum, a maximum and neither. The sign of $f'$ on either side never fails.
  • An inflection point is where $f''$ changes sign, so it is where concavity gives out. $f''(c)=0$ is necessary and not sufficient: touching zero is not crossing zero.
  • Both classifications are one method: solve an equation for candidates, then confirm with a sign change.
  • Turning round, $\int f\,dx = F+C$ where $F'=f,$ and the $+C$ is all the freedom there is, because a function with zero derivative on an interval is constant. In a cost problem the constant is the fixed cost.
  • $\int_{a}^{b}f = F(b)-F(a),$ and the surprise is that this measures area: the area function $A$ satisfies $A'(t)=f(t),$ by the same squeeze that produced the derivative. Undoing differentiation and measuring a curved region are one problem. Below the axis the area counts as negative, so the integral is signed area.
  • Every integration rule is a differentiation rule backwards. The product rule reversed is $\int uv' = uv-\int u'v;$ choose $u$ to be the factor that simplifies when differentiated, and if the new integral is worse, swap.

Think further

Questions without computation. Think on your own or with a classmate before opening the thought.

  1. Discussion question 1 — what f′(c) = f″(c) = 0 tells you

    At an interior point you find $f'(c)=0$ and $f''(c)=0.$ What follows?

    (A) $c$ is a local maximum;

    (B) $c$ is an inflection point;

    (C) $c$ is neither a maximum nor a minimum;

    (D) nothing — it could be any of the three.

    One way to think about it

    (D). Example 7.5 has all three outcomes with $f'(0)=f''(0)=0{:}$ $x^{4}$ has a minimum at $0,$ $-x^{4}$ a maximum, and $x^{3}$ neither. (A) guesses a direction from nothing; (B) and (C) are both refuted by $x^{4},$ whose $f''=12x^{2}$ never changes sign and whose $0$ is a minimum. The test is silent, and the sign of $f'$ on each side decides.

  2. Discussion question 2 — must an inflection be flat?

    You compute $f''(c)=0.$ Is $c$ an inflection point? Which example from this lecture settles it, and must an inflection point have a horizontal tangent?

    One way to think about it

    Not necessarily. Example 7.9(a) settles it: $x^{4}$ has $f''(0)=0,$ but $f''=12x^{2}$ is never negative, so the bending never changes and $0$ is a minimum, not an inflection. $f''(c)=0$ only makes $c$ a candidate (Watch out 7.8).

    And no, the tangent need not be horizontal: by Example 7.9(b), $x^{3}+x$ has an inflection at $0$ with $f'(0)=1.$ Inflection points and stationary points are unrelated conditions.

  3. Discussion question 3 — two different antiderivatives

    Two students find antiderivatives of the same $f$ and get different answers. Can both be right?

    (A) no — an antiderivative is unique;

    (B) yes, but they can differ only by a constant;

    (C) yes — they can differ by any function whose derivative is zero somewhere;

    (D) yes, but only if one of them made a sign error.

    Why is (c) wrong, and which word is doing the damage?

    One way to think about it

    (B). If $F'=G'=f$ on an interval, then $(F-G)'=0$ on the whole interval, and by Fact 7.13 $F-G$ is a constant.

    (C) is wrong because of the word somewhere. A function whose derivative is zero at one point need not be constant: $x^{3}$ has derivative $0$ at $x=0$ and is not constant. The Fact needs the derivative to be zero everywhere on the interval (Watch out 7.14). So $x^{3}+F(x)$ is not an antiderivative of $f.$ Its derivative is $3x^{2}+f(x).$

  4. Discussion question 4 — the rate, not the average

    $A(t)$ is the area under $y=f(x)$ from $a$ to $t.$ What is $A'(t),$ and why is it not $A(t)/t$?

    One way to think about it

    $A'(t)=f(t)$ (Fact 7.17): pushing $t$ on by $\Delta t$ adds a strip of height about $f(t),$ so area arrives at the rate $f(t).$

    $A(t)/t$ (with $a=0$) is the area so far divided by the width so far: the average height of $f$ on $[0,t].$ It describes the whole region, not what is being added at the edge. With $f(x)=2x$ and $a=0,$ $A(t)=t^{2},$ so $A'(t)=2t$ while $A(t)/t=t.$ It is marginal against average again, as with cost.

  5. Discussion question 5 — an integral of zero over a region that is not empty

    Sketch a continuous $f$ on $[0,4]$ with $\int_{0}^{4}f = 0$ but $f$ not identically zero. What does this say about “the integral” and “the area”?

    One way to think about it

    Take $f(x)=2-x.$ It is above the axis on $[0,2]$ and below it on $[2,4],$ two triangles of area $2$ each. An antiderivative is $2x-\tfrac12x^{2},$ and $$\int_{0}^{4}(2-x)\,dx=(8-8)-0=0\,.$$ The area between the graph and the axis is $4.$ So the integral is signed area (Watch out 7.19): the part below the axis counts as negative, and “the integral” is “the area” only when $f\ge0$ throughout.

  6. Discussion question 6 — which part is u

    To find $\int x e^{x}dx$ by parts, which choice works, and what is the signal that you have chosen the wrong way round?

    One way to think about it

    $u=x$ and $v'=e^{x}{:}$ then $u'=1$ and the new integral is $\int e^{x}\,dx,$ so $\int xe^{x}\,dx=xe^{x}-e^{x}+C$ (Example 7.23). The signal is the one in Method 7.22, step 4: with $u=e^{x}$ and $v'=x$ the new integral is $\int e^{x}\tfrac{x^{2}}{2}\,dx,$ harder than the one you started with. When that happens, swap.

  7. Discussion question 7 — candidates that need confirming

    Both $f'(c)=0$ and $f''(c)=0$ produce candidates that are confirmed by a sign change. Where else this term have you seen an equation produce candidates that something else had to confirm?

    One way to think about it

    Several times. In Lecture 1 the divisors of the constant term are candidates for integer roots, and each must be substituted (Method 1.19, Watch out 1.21). In Lecture 3, $\tfrac{0}{0}$ is a signal that there is work to do, not an answer (Watch out 3.2). In Lecture 6, $f'(c)=0$ gives the candidates for a maximum on an interval, and the comparison of values with the endpoints decides (Method 6.15). The pattern is always the same: a necessary condition makes a shortlist, and something else confirms.