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 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.
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.
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.
The candidates. $$ \begin{aligned} f'(x)&=3x^{2}-6x-9\\ &=3(x+1)(x-3)\,, \end{aligned} $$ so $f'(x)=0$ at $x=-1$ and at $x=3.$
The second-derivative test. $f''(x)=6x-6,$ so $$ \begin{aligned} f''(-1)&=-12<0\,,\\ f''(3)&=12>0\,. \end{aligned} $$ By Fact 7.3, $x=-1$ is a local maximum point and $x=3$ a local minimum point. Neither value of $f''$ is $0,$ so the test answers both times.
The values. $f(-1)=-1-3+9+5=10$ and $f(3)=27-27-27+5=-22.$
The same with the sign of $f'$. The factor $3(x+1)(x-3)$ is $+$ for $x<-1,$ $-$ between $-1$ and $3,$ and $+$ for $x>3{:}$ from $+$ to $-$ at $-1,$ from $-$ to $+$ at $3.$ The two tests agree, as they must when both answer.
A local maximum at $x=-1$ with $f(-1)=10,$ and a local minimum at $x=3$ with $f(3)=-22.$
Guess first. The next question is the one case the second-derivative test leaves open. 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.
At an interior point $c$ you find $$f'(c) = 0 \qquad \text{and} \qquad f''(c) = 0$$
What follows?
- Why is that answer tempting? Guesses a direction from no information. There is nothing in $f''=0$ pointing either way.
- Why is that answer tempting? A common answer, and false: $x^{4}$ has $f'(0)=f''(0)=0$ and a strict minimum at $0.$ $f''=0$ is necessary for an inflection, not sufficient — which is the next section.
- Why is that answer tempting? Over-corrects. $x^{4}$ shows it can perfectly well be a minimum.
Three functions, all with $f'(0) = f''(0) = 0$, and all three outcomes:
| $f''$ | at $x = 0$ | |
|---|---|---|
| $x^{4}$ | $12x^{2} \ge 0$ | strict minimum |
| $-x^{4}$ | $-12x^{2} \le 0$ | strict maximum |
| $x^{3}$ | $6x$ | neither |
So $f''(c) = 0$ genuinely carries no information. Go back to the sign of $f'$ on either side, which always works.
The second-derivative test is a shortcut that sometimes declines to answer. That is not a flaw — a shortcut that always worked would be the whole theorem.
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.
$f(x)=x^{4}{:}$ $\;f''(x)=12x^{2}\ge0,$ strict local minimum at $0.$
$f(x)=-x^{4}{:}$ $\;f''(x)=-12x^{2}\le0,$ strict local maximum at $0.$
$f(x)=x^{3}{:}$ $\;f''(x)=6x,$ neither.
So $f''(c)=0$ genuinely carries no information at all, and the sign of $f'$ on either side settles each case in a line: for $x^{4}$ it runs $-$ then $+,$ for $-x^{4}$ it runs $+$ then $-,$ and for $x^{3}$ it is $+$ on both sides.
A minimum, a maximum and neither — with $f''(0)=0$ every time.
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?
- Why is that answer tempting? A local maximum only beats the points near it (Definition 7.1). Nothing compares it with a point as far away as $x=4.$ The figure of Watch out 7.2 shows exactly this.
- Why is that answer tempting? Whether a point is a local maximum is decided by its neighbours, not by comparing with other peaks. Comparing values across peaks proves nothing about local extrema.
- Why is that answer tempting? A local minimum beats its neighbours only. Just to the right of $x=1$ the function falls below $f(1)=2,$ so there are values smaller than $f(4)=5.$
Local is not global. Between $x=1$ and $x=4$ the function can fall from $2$ to something lower, climb to a peak above $5,$ and come down to $5$ at $x=4.$ Each marked point beats its own neighbours, which is all Definition 7.1 asks.
Inflection points
You compute $f''(c)=0.$ Is $c$ a point where the curve changes the way it bends?
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.
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.
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?
- Why is that answer tempting? Necessary read as sufficient. The counterexample is $x^{4},$ the function of Example 7.5 and of the question in the previous section.
- Why is that answer tempting? Adds a hypothesis already assumed by writing $f''$ at all. Hedging rather than answering.
- Why is that answer tempting? Confuses inflections with stationary points. They are independent: $x^{3}+x$ has $f''(0)=0$ and $f'(0)=1,$ and $0$ is an inflection.
$x^{4}$ has $f'' = 12x^{2}$, which is $0$ at the origin and never negative. The bending never changes, so there is no inflection — the curve is convex throughout, and $0$ is a minimum.
An inflection needs $f''$ to actually cross zero, not merely touch it.
On D. Inflections and stationary points are unrelated conditions. $f(x) = x^{3} + x$ has $f''(x) = 6x$, so $x = 0$ is an inflection — and $f'(0) = 1$, a perfectly ordinary sloping tangent.
The pattern, one last time. $f'(c) = 0$ gives candidate extrema; $f''(c) = 0$ gives candidate inflections. Both are confirmed by a sign change, and neither is confirmed by the equation alone.
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.
(a) No. Here $f''(x)=12x^{2},$ which vanishes at $0$ and is never negative, so the bending never changes: the curve is convex throughout and $0$ is a minimum. The candidate fails the sign test.
(b) Yes. Here $f''(x)=6x,$ which is negative for $x<0$ and positive for $x>0,$ so the bending does change and $0$ is an inflection point. Note that $f'(0)=1{:}$ the tangent there is perfectly ordinary and sloping. Inflection points and stationary points are unrelated conditions, and the habit of picturing every inflection as a flat spot comes from meeting $x^{3}$ first.
(a) No: $0$ is a minimum of $x^{4},$ not an inflection. (b) Yes, and the tangent there has slope $f'(0)=1,$ not $0.$
The two halves of this subsection and the last have the same shape, and it is worth extracting once rather than memorising twice.
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.
Differentiating twice, $$ \begin{aligned} f'(x) &= \tfrac13x^{2}-\tfrac13x-\tfrac23\\ &= \tfrac13(x+1)(x-2)\,, \end{aligned} $$ $$ \begin{aligned} f''(x) &= \tfrac23x-\tfrac13\\ &= \tfrac23\bigl(x-\tfrac12\bigr)\,. \end{aligned} $$
Extreme points. $f'=0$ at $x=-1$ and $x=2.$ The factor $\tfrac13(x+1)(x-2)$ is $+$ for $x<-1,$ $-$ between, and $+$ for $x>2,$ so $-1$ is a local maximum and $2$ a local minimum. The second-derivative test agrees and is quicker here: $f''(-1)=-1<0$ and $f''(2)=1>0.$
Inflection. $f''=0$ only at $x=\tfrac12,$ and $f''$ changes from $-$ to $+$ there, so $x=\tfrac12$ is an inflection point.
That is the whole shape: rising to a local maximum at $-1,$ falling to a local minimum at $2,$ rising thereafter, and bending downwards until $x=\tfrac12$ and upwards after it. Three numbers determine the entire picture.
Local maximum at $x=-1,$ local minimum at $x=2,$ inflection point at $x=\tfrac12$ (concave before it, convex after it).
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.
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?
- Why is that answer tempting? Both are candidates, since $f''=0$ there. But $20x^{2}\ge0,$ so near $0$ the sign of $f''$ is the sign of $x-3{:}$ negative on both sides of $0.$ Touching zero is not crossing zero.
- Why is that answer tempting? Inflections and stationary points are unrelated conditions (Example 7.9). At $0$ the sign of $f''$ does not change, so it is no inflection, whatever $f'$ does there.
- Why is that answer tempting? An inflection needs a change in the sign of $f'',$ nothing about $f'.$ The tangent at an inflection can slope, as for $x^{3}+x$ at $0.$
By Method 7.10: the candidates are $x=0$ and $x=3.$ The factor $20x^{2}$ is positive on both sides of each, so the sign of $f''$ is the sign of $x-3.$ It is $-$ on both sides of $0$ (no change) and goes from $-$ to $+$ at $3.$ So $x=3$ is the only inflection point.
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.
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.
If $F'=G'$ then $(F-G)'=0$ throughout the interval, and a function with zero derivative on an interval is constant — which is the third line of Fact 2.23. That theorem is what makes “$+C$” a complete description rather than a hedge.
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?
- Why is that answer tempting? Forgets the constant entirely. Differentiation destroys additive constants, so going backwards cannot recover them.
- Why is that answer tempting? ‘Somewhere’ against ‘everywhere’. Plenty of non-constant functions have zero derivative at a point; the theorem needs it on the whole interval.
- Why is that answer tempting? Treats the freedom as a mistake rather than a feature.
If $F' = G' = f$ then $(F - G)' = 0$ everywhere on the interval, and by Lecture 2's result a function with zero derivative on an interval is constant. So $$F(x) - G(x) = C$$ and that is the only freedom there is.
Why it matters. If $C'(Q)$ is marginal cost, then integrating recovers total cost — and the constant is the fixed cost. It is not a formality; it is the part of the cost you pay before producing anything, and no amount of marginal information can tell you what it is.
Recap Total, marginal and fixed cost
| word | what 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 product | the extra output from one more unit of input: the derivative of a production function |
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.
Integrating, $$ \begin{aligned} C(Q) &= \int (2Q+10)\,dQ\\ &= Q^{2}+10Q+K \end{aligned} $$ for some constant $K.$
Setting $Q=0$ gives $C(0)=K{:}$ the constant is exactly the fixed cost, what the firm pays before producing anything.
If we are told in addition that fixed costs are $100,$ then $C(Q)=Q^{2}+10Q+100;$ if we are not, no amount of marginal information will supply it. The $+C$ is not a formality — it is a real quantity that differentiation threw away.
$C(Q)=Q^{2}+10Q+K,$ where $K=C(0)$ is the fixed cost. With fixed costs of $100{:}$ $C(Q)=Q^{2}+10Q+100.$
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.
Why divide. The numerator has degree $2$ and the denominator degree $1,$ so this is an improper rational function and Fact 1.22 applies. We have no antiderivative of a quotient as it stands, but we have one for a polynomial and for one over $x.$
The division. $(x+1)(x+2)=x^{2}+3x+2,$ which leaves the remainder $3{:}$ $$ \frac{x^{2}+3x+5}{x+1}=x+2+\frac{3}{x+1}\,. $$ Check by multiplying back: $(x+1)(x+2)+3=x^{2}+3x+5.$
Integrate term by term. By Fact 7.13 the polynomial gives $\tfrac12x^{2}+2x.$ For the last term, the derivative of $\ln(x+1)$ is $\dfrac{1}{x+1}$ by the chain rule and $(\ln u)'=1/u$ (Fact 4.5). For $x>-1$ we have $x+1>0,$ so $\ln|x+1|=\ln(x+1).$ Hence $$ \begin{aligned} &\int \frac{x^{2}+3x+5}{x+1}\,dx\\ &\quad= \tfrac12x^{2}+2x\\ &\qquad+3\ln(x+1)+C\,. \end{aligned} $$
Check by differentiating. The derivative of the answer is $x+2+\dfrac{3}{x+1},$ the function after the division.
$\tfrac12x^{2}+2x+3\ln(x+1)+C$ for $x>-1.$
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$?
- Why is that answer tempting? Integrates the numerator and the denominator separately. There is no such rule: the integral of a quotient is not the quotient of the integrals, just as the derivative is not.
- Why is that answer tempting? Treats the numerator as a constant in front of $\frac{1}{x+2}.$ But $x+5$ varies, and differentiating $(x+5)\ln(x+2)$ gives an extra term $\ln(x+2).$
- Why is that answer tempting? Takes the constant term $5$ of the numerator as the remainder. Divide first: $x+5=(x+2)+3,$ so the remainder is $3.$
Divide first, as in the example above: $$ \frac{x+5}{x+2}=1+\frac{3}{x+2}\,. $$ An antiderivative is $x+3\ln(x+2),$ and differentiating it gives $1+\dfrac{3}{x+2}$ back. (Any constant may be added.)
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.
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)$?
- Why is that answer tempting? Differentiates the wrong object — pattern-matches ‘derivative of the area of f’ onto ‘derivative of f’. The confusion between f and f′ one last time.
- Why is that answer tempting? A real quantity (average height), but not a derivative. Confuses accumulated-per-unit with rate-of-accumulation — the marginal-versus-average slip in a new costume.
- Why is that answer tempting? Gets the height right and multiplies by the wrong thing — that is the area of a rectangle from 0, not the rate at which area is arriving.
The extra area is a strip of width $\Delta t$ and height about $f(t)$, so $\Delta A/\Delta t \approx f(t)$ — the Newton quotient of $A$. Letting $\Delta t \to 0$ gives $$A'(t) = f(t)$$
Read what that says. Undoing differentiation and measuring a curved region are the same operation, and it hands you the computation free: $$\int_{a}^{b} f(x)\,dx = F(b) - F(a)$$
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$.
A sliver of extra area. Push $t$ along by a small $\Delta t.$ The extra area is a sliver sitting under the graph between $t$ and $t+\Delta t{:}$ it is very nearly a rectangle of width $\Delta t$ and height $f(t),$ and exactly a rectangle of width $\Delta t$ and some height between the smallest and largest values of $f$ there.
The squeeze. So $$ \frac{A(t+\Delta t)-A(t)}{\Delta t} $$ lies between those two values, and as $\Delta t\to0$ continuity squeezes them both onto $f(t).$ The left-hand side is the Newton quotient of $A,$ so $A'(t)=f(t).$ It is the same squeeze that produced the derivative in Lecture 2, run on a different quantity.
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.
Area accumulating
Left, $y=f(x)$ with the area from $a$ to $t$ shaded; right, the area function $A(t)$ drawn as $t$ moves.
- 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.
- Press the button with the formula until it reads $f(x)=2-x,$ the function that goes negative.
- 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.
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).
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.
(a) An antiderivative of $x^{2}$ is $x^{3}/3,$ so $$ \begin{aligned} \int_{0}^{1}x^{2}\,dx &= \Bigl[\tfrac13x^{3}\Bigr]_{0}^{1}\\ &= \tfrac13-0 = \tfrac13\,. \end{aligned} $$ The region sits inside the unit square and fills about a third of it, which is a sanity check worth doing every time.
(b) An antiderivative is $\tfrac12x^{2}-\tfrac14x^{4}-\tfrac16x^{6},$ and every term is even, so it takes the same value at $2$ and at $-2$ and the difference is $0.$ The integral is zero — and the region is certainly not empty. The part below the axis has cancelled the part above it exactly, which is Watch out 7.19 in action.
(a) $\tfrac13.$ (b) $0,$ although the region between the graph and the axis is not empty.
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$?
- Why is that answer tempting? This is the geometric area: the triangle below the axis on $[0,2]$ has area $2$ and the one above it on $[2,3]$ has area $\tfrac12.$ The integral counts the part below the axis as negative (Watch out 7.19).
- Why is that answer tempting? The right size with the wrong sign: probably $F(0)-F(3)$ instead of $F(3)-F(0).$ The upper limit goes first, as in (7.1).
- Why is that answer tempting? Only the part above the axis, on $[2,3].$ The part below the axis is not left out; it counts as negative.
An antiderivative is $F(x)=\tfrac12x^{2}-2x,$ so $$ \begin{aligned} \int_{0}^{3}(x-2)\,dx &= F(3)-F(0)\\ &= \tfrac92-6 = -\tfrac32\,. \end{aligned} $$ In pictures: $\tfrac12-2,$ the triangle above the axis minus the larger one below it.
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.
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} $$
The product rule says $(uv)' = u'v + uv'.$ Integrating both sides, and using that $uv$ is an antiderivative of $(uv)',$ $$ \begin{aligned} u(x)v(x) &= \int u'(x)v(x)\,dx\\ &\quad+ \int u(x)v'(x)\,dx\,, \end{aligned} $$ which rearranges to (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.
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?
- Why is that answer tempting? Legal but useless: it leaves ∫eˣ x²/2 dx, which is worse than what you started with. The signal that you chose wrong is that the new integral is harder.
- Why is that answer tempting? Gives v = x and u′ = eˣ(1 + x) — the new integral is ∫x eˣ(1+x) dx, worse again, and it needed the product rule to get there.
- Why is that answer tempting? It applies to any product. The question is never whether it applies but whether it helps.
With $u = x$ and $v' = e^{x}{:}$ $u' = 1$ and $v = e^{x},$ so $$ \begin{aligned} \int x e^{x}\,dx &= x e^{x} - \int 1 \cdot e^{x}\,dx\\ &= x e^{x} - e^{x} + C \end{aligned} $$
Why that choice. Differentiating $x$ makes it $1$ — simpler. The remaining integral $\int e^x dx$ is trivial.
Swap them and $x$ gets integrated into $x^2/2,$ which is worse. The rule still holds; it just carries you the wrong way.
| choice | new integral | |
|---|---|---|
| $u = x$ | $\int e^{x}dx$ | easy |
| $u = e^{x}$ | $\int e^{x}\tfrac{x^{2}}{2}dx$ | harder |
A polynomial times an exponential
Find $\displaystyle\int x\,e^{x}\,dx.$
Try it yourself first. Then open one step at a time.
Take $u=x$ and $v'=e^{x},$ so that $u'=1$ and $v=e^{x}.$ Then (7.2) gives $$ \begin{aligned} \int x e^{x}\,dx &= x e^{x} - \int 1\cdot e^{x}\,dx\\ &= x e^{x} - e^{x} + C\,. \end{aligned} $$ Check: differentiating $xe^{x}-e^{x}$ gives $e^{x}+xe^{x}-e^{x}=xe^{x}.$ ✓
The other choice is legal and useless. With $u=e^{x}$ and $v'=x$ we get $v=x^{2}/2$ and the new integral is $\int e^{x}x^{2}/2\,dx,$ which is worse than the one we started with. The rule applies to every product; the question is never whether it applies but whether it helps.
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.
Choosing the parts. The integrand is a product of $x^{2}$ and $\ln x,$ so Method 7.22 applies, and the question is which factor is $u.$
- $\ln x$ is hard to integrate (we have no antiderivative of it yet), but easy to differentiate: by Fact 4.5, its derivative is $1/x.$
- $x^{2}$ is easy to integrate: an antiderivative is $x^{3}/3.$
So take $$ \begin{aligned} u&=\ln x\,,& v'&=x^{2}\,,\\ u'&=\frac1x\,,& v&=\frac{x^{3}}{3}\,. \end{aligned} $$ Notice that the polynomial is $v'$ here, not $u$ as in Example 7.23. The rule of thumb in Method 7.22 is about polynomials against exponentials. Against a logarithm the logarithm must be $u,$ because it is the factor we cannot integrate.
Step 1: an antiderivative. By (7.2), $$ \begin{aligned} &\int x^{2}\ln x\,dx\\ &= \frac{x^{3}}{3}\ln x - \int \frac1x\cdot\frac{x^{3}}{3}\,dx\\ &= \frac{x^{3}}{3}\ln x - \int \frac{x^{2}}{3}\,dx\\ &= \frac{x^{3}}{3}\ln x - \frac{x^{3}}{9} + C\,. \end{aligned} $$ The new integral was easier than the old one: the $1/x$ cancelled one power of $x$ and the logarithm disappeared. That is the sign that the choice was right.
Check: by the product rule, the derivative of $\frac{x^{3}}{3}\ln x - \frac{x^{3}}{9}$ is $$ \begin{aligned} &x^{2}\ln x + \frac{x^{3}}{3}\cdot\frac1x - \frac{x^{2}}{3}\\ &= x^{2}\ln x + \frac{x^{2}}{3} - \frac{x^{2}}{3}\\ &= x^{2}\ln x\,.\ \checkmark \end{aligned} $$
Step 2: evaluate. With $F(x)=\frac{x^{3}}{3}\ln x - \frac{x^{3}}{9},$ Definition 7.16 gives $\int_{1}^{e}x^{2}\ln x\,dx = F(e)-F(1).$ Using $\ln e=1$ and $\ln 1=0,$ $$ \begin{aligned} F(e) &= \frac{e^{3}}{3}\cdot 1 - \frac{e^{3}}{9} = \frac{2e^{3}}{9}\,, \\ F(1) &= \frac{1}{3}\cdot 0 - \frac{1}{9} = -\frac19\,, \end{aligned} $$ so $$ \begin{aligned} &\int_{1}^{e} x^{2}\ln x\,dx\\ &= \frac{2e^{3}}{9} - \Bigl(-\frac19\Bigr)\\ &= \frac{2e^{3}+1}{9}\approx 4.57\,. \end{aligned} $$ Watch the sign in $F(1){:}$ the term $-\frac19$ is subtracted, and subtracting a negative number adds $\frac19.$
Sanity check. On $[1,e]$ both $x^{2}$ and $\ln x$ are $\ge0,$ so the answer must be positive. Also $x^{2}\ln x\le e^{2}\cdot 1\approx 7.4$ there and the interval has length $e-1\approx1.72,$ so the answer must be below $7.4\cdot1.72\approx12.7.$ The value $4.57$ passes both tests.
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$?
- Why is that answer tempting? Comes from $xe^{x}+e^{x}{:}$ the minus sign before the new integral in (7.2) became a plus. Differentiating $xe^{x}+e^{x}$ gives $xe^{x}+2e^{x},$ not $xe^{x}.$
- Why is that answer tempting? This is $F(1)$ alone. The value at the lower limit must be subtracted, and $F(0)=0-1=-1$ is not zero.
- Why is that answer tempting? Only $\bigl[xe^{x}\bigr]_{0}^{1},$ the term $uv,$ with the new integral $\int_{0}^{1}e^{x}\,dx$ left out.
$$ \begin{aligned} \int_{0}^{1}xe^{x}\,dx &= F(1)-F(0)\\ &= (e-e)-(0-1) = 1\,. \end{aligned} $$ Subtracting $F(0)=-1$ adds $1,$ as subtracting $-\frac19$ added $\frac19$ in Example 7.24.
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.
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.
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.
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).$
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.
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.
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.
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.