MAT1051 · Week 9 · The Mean Value Theorem and Curve Sketching

The Mean Value Theorem and curve sketching

Rolle's and the Mean Value Theorem, the increasing/decreasing test, first and second derivative tests, concavity, inflection points and step-by-step graph sketching. The full template for a 'Sketch the graph' question.

Rolle's TheoremMean Value Theoremincreasingdecreasingfirst derivative testconcave upconcave downinflection pointsecond derivative testcurve sketching

This week you learn “what the derivative says about the shape of a function”. The theoretical part is the Mean Value Theorem: it is what guarantees that you can extract information about a function from its derivative. The practical part is curve sketching: you read increasing/decreasing from the sign of f′f' and concavity from the sign of f′′f'', and draw the graph. There is almost always a “sketch the graph” question on the final, worth 15-20 points. The main ideas:

  1. MVT: on an interval, at at least one point the tangent slope equals the secant slope.
  2. The sign of f′f' gives increasing/decreasing, and a sign change gives a local extremum.
  3. The sign of f′′f'' gives concavity, and a sign change gives an inflection point.
  4. f′(c)=0f'(c)=0 or f′′(c)=0f''(c)=0 alone proves nothing. Look at the sign.

Rolle’s Theorem

Let ff satisfy three conditions:

  1. continuous on [a,b][a,b],
  2. differentiable on (a,b)(a,b),
  3. f(a)=f(b)f(a)=f(b).

Then there is at least one c∈(a,b)c\in(a,b) with f′(c)=0f'(c)=0.

Intuition: a smooth path that starts and ends at the same height must make a peak or a valley somewhere in between. There the tangent is horizontal.

The Mean Value Theorem (MVT)

If ff is continuous on [a,b][a,b] and differentiable on (a,b)(a,b):

there is a c∈(a,b) with f′(c)=f(b)−f(a)b−a.\text{there is a } c\in(a,b) \text{ with } f'(c)=\frac{f(b)-f(a)}{b-a}.

The right side is the slope of the secant connecting the endpoints. The theorem says that somewhere the tangent is parallel to this secant. Physical interpretation: if you traveled 180 km in 2 hours, at some moment your speedometer showed exactly 90 km/h.

Example 1. f(x)=x2+2xf(x)=x^2+2x, [1,4][1,4].

secant slope = [f(4) - f(1)] / (4 - 1) = (24 - 3) / 3 = 7
f'(c) = 2c + 2 = 7   ->   c = 2.5     (1 < 2.5 < 4, valid)

PITFALL · applying it without checking the conditions. For f(x)=∣x∣f(x)=|x| on [−1,1][-1,1], f(−1)=f(1)f(-1)=f(1) but there is no point with f′(c)=0f'(c)=0. Why? It is not differentiable at 00, so the second condition fails. If the exam says “verify the hypotheses”, write out continuity and differentiability explicitly.

Consequences of the MVT

Consequence 1. If f′(x)=0f'(x)=0 everywhere on (a,b)(a,b), then ff is constant there. (MVT between any two points: f(x2)−f(x1)=0⋅(x2−x1)=0f(x_2)-f(x_1)=0\cdot(x_2-x_1)=0.)

Consequence 2. If f′=g′f'=g', then f=g+Cf=g+C. This is why there is a "+C+C" in integration.

Example 2 (proving an identity). For x>0x>0, arctan⁡x+arctan⁡1x=π2\arctan x+\arctan\dfrac1x=\dfrac{\pi}{2}.

Let h(x)=arctan⁡x+arctan⁡1xh(x)=\arctan x+\arctan\frac1x. Derivative:

h′(x)=11+x2+11+1x2⋅(−1x2)=11+x2−1x2+1=0h'(x)=\frac{1}{1+x^2}+\frac{1}{1+\frac{1}{x^2}}\cdot\left(-\frac{1}{x^2}\right)=\frac{1}{1+x^2}-\frac{1}{x^2+1}=0

hh is constant. At x=1x=1, h(1)=π4+π4=π2h(1)=\tfrac\pi4+\tfrac\pi4=\tfrac\pi2. So h(x)=π2h(x)=\tfrac\pi2 for every x>0x>0.

Example 3 (inequality). For x>0x>0, ln⁡(1+x)<x\ln(1+x)<x.

MVT for f(t)=ln⁡(1+t)f(t)=\ln(1+t) on [0,x][0,x]: ln⁡(1+x)−ln⁡1=11+c⋅x\ln(1+x)-\ln1=\dfrac{1}{1+c}\cdot x, 0<c<x0<c<x. Since 11+c<1\dfrac{1}{1+c}<1, ln⁡(1+x)<x\ln(1+x)<x.

The increasing / decreasing test and the first derivative test

  • If f′>0f'>0 on an interval, ff is increasing there.
  • If f′<0f'<0, it is decreasing.

First derivative test: let cc be a critical point.

Sign of f′f' as it passes through ccResult
from ++ to −-local max
from −- to ++local min
no changeno extremum

To build a sign table: place the critical points and undefined points on the number line, choose a test point in each interval, and look at the sign of f′f'.

Concavity and the second derivative

  • f′′>0f''>0: the graph is concave up, shaped like ∪\cup. The tangents are below the graph.
  • f′′<0f''<0: concave down, shaped like ∩\cap.
  • Inflection point: a point where ff is defined and the concavity changes.

Second derivative test: let f′(c)=0f'(c)=0. If f′′(c)>0f''(c)>0 it is a local min, if f′′(c)<0f''(c)<0 a local max, and if f′′(c)=0f''(c)=0 the test gives no result (go back to the first derivative test).

PITFALL · f′′(c)=0f''(c)=0 does not mean an inflection point. For f(x)=x4f(x)=x^4, f′′(0)=0f''(0)=0 but f′′=12x2≥0f''=12x^2\ge0 everywhere, so the sign does not change. There is no inflection point at 00; there is a minimum. For an inflection point, a sign change is required.

The curve sketching template

A. Domain
B. Intercepts: x = 0 -> y-intercept;  f(x) = 0 -> x-intercepts
C. Symmetry: even / odd / periodic
D. Asymptotes: vertical, horizontal, oblique
E. f': critical points, intervals of increase/decrease, local max/min
F. f'': intervals of concavity, inflection points
G. Mark the important points, draw following the asymptotes

Example 4 (a full sketch). f(x)=x2x−1f(x)=\dfrac{x^2}{x-1}.

A. x≠1x\ne1.

B. f(0)=0f(0)=0; f(x)=0  ⟺  x=0f(x)=0 \iff x=0. The graph passes through the origin.

C. f(−x)≠±f(x)f(-x)\ne\pm f(x), no symmetry.

D. x→1+x\to1^+: 10+→+∞\tfrac{1}{0^+}\to+\infty; x→1−x\to1^-: −∞-\infty. Vertical asymptote x=1x=1. The numerator’s degree is one more; polynomial division: x2=(x−1)(x+1)+1x^2=(x-1)(x+1)+1, so f(x)=x+1+1x−1f(x)=x+1+\dfrac{1}{x-1}. Oblique asymptote y=x+1y=x+1.

E. f′(x)=2x(x−1)−x2(x−1)2=x(x−2)(x−1)2f'(x)=\dfrac{2x(x-1)-x^2}{(x-1)^2}=\dfrac{x(x-2)}{(x-1)^2}. The critical points are 00 and 22.

interval(−∞,0)(-\infty,0)(0,1)(0,1)(1,2)(1,2)(2,∞)(2,\infty)
f′f'++−-−-++
ffincreasingdecreasingdecreasingincreasing

At x=0x=0 there is a local max f(0)=0f(0)=0. At x=2x=2 there is a local min f(2)=4f(2)=4.

F. From the form f(x)=x+1+(x−1)−1f(x)=x+1+(x-1)^{-1}: f′′(x)=2(x−1)−3=2(x−1)3f''(x)=2(x-1)^{-3}=\dfrac{2}{(x-1)^3}. x<1x<1: concave down; x>1x>1: concave up. The sign changes at x=1x=1 but that point is outside the domain: there is no inflection point.

G. On the left branch the graph comes in from (−∞)(-\infty) below the oblique asymptote, peaks at (0,0)(0,0), and drops to −∞-\infty as it approaches x=1x=1. On the right branch it comes down from +∞+\infty, bottoms out at (2,4)(2,4), then rises approaching y=x+1y=x+1 from above.

TIP · take the derivative in a simple form. Finding f′′f'' from x(x−2)(x−1)2\dfrac{x(x-2)}{(x-1)^2} with the quotient rule is long and error-prone. The form x+1+1x−1x+1+\dfrac{1}{x-1} from polynomial division finishes it in two lines.

Common mistakes

Wrong thinkingCorrect
Not checking that the cc found in the MVT is in the intervalc∈(a,b)c\in(a,b) is required; discard the one outside
MVT without writing continuity/differentiabilityWrite the conditions first
f′(c)=0f'(c)=0 means an extremumThe sign must change; not at x=0x=0 in x4−4x3x^4-4x^3
f′′(c)=0f''(c)=0 means an inflection pointThe sign must change; not at 00 in x4x^4
An inflection point at a point outside the domainff must be defined there
Skipping an undefined point in the sign tableVertical asymptotes go in the table too
Second derivative test says “max” when f′′(c)=0f''(c)=0The test is inconclusive, go back to the first derivative test
Only the IVT for “exactly one root”The IVT gives at least one; for at most one, use Rolle

Test yourself

Exam-style questions. Solve them on paper first, then reveal the answer.

Question 1easy

Find all numbers cc that satisfy the conclusion of the Mean Value Theorem for f(x)=x3−xf(x)=x^3-x on [0,2][0,2].

Show answer
c=23≈1.155c=\dfrac{2}{\sqrt3}\approx1.155

Secant slope: f(2)−f(0)2−0=6−02=3\dfrac{f(2)-f(0)}{2-0}=\dfrac{6-0}{2}=3. f′(c)=3c2−1=3⇒c2=43⇒c=±23f'(c)=3c^2-1=3 \Rightarrow c^2=\dfrac43 \Rightarrow c=\pm\dfrac{2}{\sqrt3}. The only one in the interval is c=23≈1.155c=\dfrac{2}{\sqrt3}\approx1.155.

Question 2easy

Verify that f(x)=x2−4x+1f(x)=x^2-4x+1 satisfies the hypotheses of Rolle's Theorem on [0,4][0,4] and find cc.

Show answer
c = 2

A polynomial: continuous and differentiable everywhere. f(0)=1f(0)=1, f(4)=16−16+1=1f(4)=16-16+1=1, the endpoints are equal. By Rolle there is a c∈(0,4)c\in(0,4) with f′(c)=0f'(c)=0: 2c−4=0⇒c=22c-4=0 \Rightarrow c=2.

Question 3easy

Find the number cc guaranteed by the Mean Value Theorem for f(x)=xf(x)=\sqrt{x} on [1,9][1,9].

Show answer
c = 4

Secant slope: 3−19−1=14\dfrac{3-1}{9-1}=\dfrac14. f′(c)=12c=14⇒c=2⇒c=4f'(c)=\dfrac{1}{2\sqrt c}=\dfrac14 \Rightarrow \sqrt c=2 \Rightarrow c=4.

Question 4medium

Use the Mean Value Theorem to prove that ∣sin⁡a−sin⁡b∣≤∣a−b∣|\sin a-\sin b|\le|a-b| for all real a,ba,b.

Show answer
By MVT, sin a - sin b = cos(c)(a - b) and |cos c| ≤ 1.

If a=ba=b the equality is obvious. If a≠ba\ne b, sin⁡\sin is continuous and differentiable between aa and bb. MVT: sin⁡a−sin⁡b=cos⁡c (a−b)\sin a-\sin b=\cos c\,(a-b), where cc is a number in between. Absolute value: ∣sin⁡a−sin⁡b∣=∣cos⁡c∣ ∣a−b∣≤∣a−b∣|\sin a-\sin b|=|\cos c|\,|a-b|\le|a-b|, because ∣cos⁡c∣≤1|\cos c|\le1.

Question 5hard

Show that the equation x5+3x+1=0x^5+3x+1=0 has exactly one real root.

Show answer
IVT gives at least one root; f' > 0 (Rolle) gives at most one.

At least one: f(x)=x5+3x+1f(x)=x^5+3x+1 is continuous, f(−1)=−3<0f(-1)=-3<0, f(0)=1>0f(0)=1>0. By the IVT there is a root in (−1,0)(-1,0). At most one: If there were two roots a<ba<b, then f(a)=f(b)=0f(a)=f(b)=0 and by Rolle there would be an f′(c)=0f'(c)=0 in between. But f′(x)=5x4+3≥3>0f'(x)=5x^4+3\ge3>0, which is never zero. Contradiction. There is exactly one root.

Question 6medium

Find the intervals on which f(x)=x4−4x3f(x)=x^4-4x^3 is increasing or decreasing, and find its local extrema.

Show answer
decreasing on (-∞, 3), increasing on (3, ∞); local min f(3) = -27; no extremum at x = 0

f′(x)=4x3−12x2=4x2(x−3)f'(x)=4x^3-12x^2=4x^2(x-3). The critical points are 00 and 33. Sign: x<0x<0: 4x2>04x^2>0, x−3<0x-3<0, f′<0f'<0. 0<x<30<x<3: again f′<0f'<0. x>3x>3: f′>0f'>0. At x=0x=0 the sign does not change, so there is no extremum. At x=3x=3 it goes from −- to ++: local min f(3)=81−108=−27f(3)=81-108=-27.

Question 7medium

For f(x)=x4−4x3f(x)=x^4-4x^3, find the intervals of concavity and the inflection points.

Show answer
concave up on (-∞, 0) and (2, ∞), concave down on (0, 2); inflection points (0, 0) and (2, -16)

f′′(x)=12x2−24x=12x(x−2)f''(x)=12x^2-24x=12x(x-2). x<0x<0: f′′>0f''>0 (concave up). 0<x<20<x<2: f′′<0f''<0 (concave down). x>2x>2: f′′>0f''>0. The sign changes at both points: the inflection points are (0,f(0))=(0,0)(0,f(0))=(0,0) and (2,16−32)=(2,−16)(2,16-32)=(2,-16).

Question 8medium

Find the inflection point of f(x)=xe−xf(x)=xe^{-x}.

Show answer
(2, 2/e²)

f′=e−x(1−x)f'=e^{-x}(1-x). f′′=−e−x(1−x)+e−x(−1)=e−x(x−2)f''=-e^{-x}(1-x)+e^{-x}(-1)=e^{-x}(x-2). e−x>0e^{-x}>0, so the sign comes from x−2x-2; at x=2x=2 it changes from −- to ++. The point: (2,2e−2)≈(2,0.271)(2,2e^{-2})\approx(2,0.271).

Question 9medium

Use the Second Derivative Test to classify the critical points of f(x)=2x3−3x2−12x+4f(x)=2x^3-3x^2-12x+4.

Show answer
local max f(-1) = 11, local min f(2) = -16

f′=6x2−6x−12=6(x−2)(x+1)f'=6x^2-6x-12=6(x-2)(x+1), critical points −1-1, 22. f′′=12x−6f''=12x-6. f′′(−1)=−18<0f''(-1)=-18<0: local max, f(−1)=−2−3+12+4=11f(-1)=-2-3+12+4=11. f′′(2)=18>0f''(2)=18>0: local min, f(2)=16−12−24+4=−16f(2)=16-12-24+4=-16.

Question 10hard

For f(x)=x2x2−4f(x)=\dfrac{x^2}{x^2-4}, find the asymptotes, the intervals of increase and decrease, local extrema, and concavity.

Show answer
VA x = ±2, HA y = 1; increasing on (-∞,-2), (-2,0); decreasing on (0,2), (2,∞); local max (0,0); concave up for |x| > 2, down for |x| < 2

Asymptotes: the degrees are equal, so y=1y=1; the denominator is zero at x=±2x=\pm2 and the numerator is 4≠04\ne0: vertical asymptotes. f′=2x(x2−4)−x2⋅2x(x2−4)2=−8x(x2−4)2f'=\dfrac{2x(x^2-4)-x^2\cdot2x}{(x^2-4)^2}=\dfrac{-8x}{(x^2-4)^2}. The denominator is positive and the sign comes from −8x-8x: increasing for x<0x<0, decreasing for x>0x>0 (except ±2\pm2). Local max f(0)=0f(0)=0 at x=0x=0. f′′=24x2+32(x2−4)3f''=\dfrac{24x^2+32}{(x^2-4)^3}; the numerator is always positive and the sign comes from (x2−4)3(x^2-4)^3: concave up for ∣x∣>2|x|>2, concave down for ∣x∣<2|x|<2. There is no inflection point (the points ±2\pm2 where the sign changes are outside the domain).

Question 11hard

Find aa and bb so that f(x)=x3+ax2+bf(x)=x^3+ax^2+b has an inflection point at (1,4)(1,4).

Show answer
a = -3, b = 6

f′′(x)=6x+2af''(x)=6x+2a. At an inflection point f′′(1)=0f''(1)=0: 6+2a=0⇒a=−36+2a=0 \Rightarrow a=-3. The point is on the graph: f(1)=1−3+b=4⇒b=6f(1)=1-3+b=4 \Rightarrow b=6. Check: f′′=6x−6f''=6x-6 changes sign at x=1x=1.

Question 12easy

Find f(x)f(x) if f′(x)=3x2+2f'(x)=3x^2+2 for all xx and f(1)=5f(1)=5.

Show answer
f(x) = x³ + 2x + 2

The function g(x)=x3+2xg(x)=x^3+2x also has derivative 3x2+23x^2+2. By the MVT consequence, two functions with equal derivatives differ by a constant: f(x)=x3+2x+Cf(x)=x^3+2x+C. f(1)=3+C=5⇒C=2f(1)=3+C=5 \Rightarrow C=2.

Verification: All answers were checked with node (verify/MAT1051/09.mjs): the c values in the MVT by comparing f'(c) with the secant slope, derivative and second derivative formulas with a numerical derivative, the single-root claim by counting sign changes on [-10,10], the sine inequality with 20000 random pairs.

Review card

ROLLE: continuous on [a,b], differentiable on (a,b), f(a) = f(b) -> there is a c with f'(c) = 0 MVT: same conditions -> f'(c) = [f(b) - f(a)] / (b - a) (tangent slope = secant slope) Consequence: f' = 0 everywhere -> f is constant; f' = g' -> f = g + C "Exactly one root": IVT (at least one) + Rolle/f' ≠ 0 (at most one) f' > 0 increasing, f' < 0 decreasing 1st derivative test: f' sign + -> - : local max; - -> + : local min; no change: none f'' > 0 concave up (∪), f'' < 0 concave down (∩) Inflection point: f'' CHANGES SIGN and f is defined there (f'' = 0 alone is not enough) 2nd derivative test: f'(c) = 0 and f''(c) > 0 -> min; < 0 -> max; = 0 -> test inconclusive SKETCH: domain, intercepts, symmetry, asymptotes, f' table, f'' table, points