BetaFree coursewareRewritten from MIT OpenCourseWareCC BY-NC-SA 4.0
Open CosmologyPhysics & cosmology, from high school to a graduate year

Curve sketching with the first and second derivative

The lecture first finishes approximations (why linear relations are what engineers look for, a quadratic approximation worked out in full, and how fast (1 + 1/k)ᵏ approaches e). Then it turns to sketching graphs: the sign of f′ says where f rises and falls, the sign of f″ says which way it bends, and critical points, values, zeros and the ends fill in the rest.

You need this first

Full reading path (7 pages)
  1. The derivative: slope of the tangent line and rate of change (18.01)
  2. Limits and continuity (18.01)
  3. Derivatives of sine and cosine, and the product and quotient rules (18.01)
  4. The chain rule and higher derivatives (18.01)
  5. Implicit differentiation and the derivatives of inverse functions (18.01)
  6. Exponentials and logarithms: the number e and its derivatives (18.01)
  7. Linear and quadratic approximations (18.01)
On this page · 9 sections
  1. Why linear relations matter
  2. Why the quadratic term has a ½
  3. How fast (1 + 1/k)ᵏ reaches e
  4. A quadratic approximation worked in full
  5. Curve sketching: what the derivatives say
  6. Example: y = 3x − x³
  7. The notes' rubric, and three examples
  8. The second derivative test
  9. Summary

Jerison starts Lecture 10 by finishing approximations, the subject of the previous lecture, and only then begins the topic in the title: drawing a graph from what the first and second derivatives tell you.

Why linear relations matter#

Take the time dilation formula from last time, T′≈T(1+12v2/c2)T' \approx T(1 + \tfrac12 v^2/c^2). Subtract TT and divide by TT (transcript, p. 1):

Relative change is proportional
ΔTT≈12 v2c2\frac{\Delta T}{T} \approx \frac12\,\frac{v^2}{c^2}
In words

capital delta capital T over capital T is approximately one half v squared over c squared

Both sides are dimensionless, and the content of the formula is a proportionality: the fractional change in time is a fixed multiple, here 12\tfrac12, of v2/c2v^2/c^2. Jerison's point is that this is what engineering looks for everywhere: a linear relation between a small change in an input and the change in an output. A real design (a satellite system, a weather or economic forecast, an asteroid's path) involves dozens of such effects, and only after each is simplified to a rule of this kind can anyone see what is going on (pp. 1–2). [He mentions, too, that for GPS the Earth's rotation and the difference in gravity between the ground and the satellite, from general relativity, add further corrections of the same simple kind.]

The constant of proportionality is a rate of change, and it depends a little on the base point, but that is a second-order effect that usually changes the answer very little (pp. 2–3).

Why the quadratic term has a ½#

Use the quadratic approximation only when the linear one is not enough (p. 3). With base point 0 it reads f(x)≈f(0)+f′(0) x+12f′′(0) x2f(x) \approx f(0) + f'(0)\,x + \tfrac12 f''(0)\,x^2. The ½ is forced: the formula must be exact for a parabola, since a parabola is its own best quadratic approximation. For f(x)=a0+a1x+a2x2f(x) = a_0 + a_1 x + a_2 x^2 (the lecture calls the coefficients a, b and c), f(0)=a0f(0) = a_0 and f′(0)=a1f'(0) = a_1, while f′′=2a2f'' = 2a_2, so a2a_2 is half of f′′(0)f''(0), and no other factor could work (pp. 3–4).

Jerison then works out the two entries of the quadratic list he had not yet derived last time, ln⁡(1+x)≈x−12x2\ln(1 + x) \approx x - \tfrac12 x^2 and (1+x)r≈1+rx+12r(r−1) x2(1 + x)^r \approx 1 + rx + \tfrac12 r(r-1)\,x^2, from f(0)f(0), f′(0)f'(0) and f′′(0)f''(0) (pp. 4, 8). The previous page lists all five.

How fast (1 + 1/k)ᵏ reaches e#

Earlier in the course, ak=(1+1/k)k→ea_k = (1 + 1/k)^k \to e was shown by taking logarithms. With the linear approximation ln⁡(1+x)≈x\ln(1 + x) \approx x at x=1/kx = 1/k (transcript, p. 5):

The limit by linear approximation
ln⁡ak=k ln⁡ ⁣(1+1k)≈k⋅1k=1(k→∞)\ln a_k = k\,\ln\!\left(1 + \frac1k\right) \approx k\cdot\frac1k = 1 \qquad (k \to \infty)
In words

log a sub k equals k log the quantity 1 plus 1 over k, is approximately k times 1 over k equals 1 (k goes to infinity )

To see how fast ln⁡ak\ln a_k approaches 1, you need the next term, which is what the quadratic approximation supplies; the lecture leaves the details to the problem set (p. 5). [The page's own step: with ln⁡(1+x)≈x−12x2\ln(1 + x) \approx x - \tfrac12 x^2, ln⁡ak≈1−12k\ln a_k \approx 1 - \tfrac1{2k}, so the error shrinks like 1/k1/k. For k=100k = 100, ln⁡(1.01100)≈0.99503\ln(1.01^{100}) \approx 0.99503, against 1−0.005=0.9951 - 0.005 = 0.995.]

A quadratic approximation worked in full#

When is linear enough? In real problems nobody says; start with the linear approximation, and use the quadratic one only when forced to, because it is much messier (transcript, p. 6). The lecture's example is the function from last time, e−3x(1+x)−1/2e^{-3x}(1 + x)^{-1/2} near 0. Multiply the two quadratic approximations, 1−3x+92x21 - 3x + \tfrac92 x^2 and 1−12x+12(−12)(−32)x2=1−12x+38x21 - \tfrac12 x + \tfrac12\left(-\tfrac12\right)\left(-\tfrac32\right)x^2 = 1 - \tfrac12 x + \tfrac38 x^2, and keep only terms up to x2x^2 (pp. 6–7):

Quadratic approximation of the product
e−3x(1+x)−1/2≈1−72 x+(32+92+38)x2=1−72 x+518 x2e^{-3x}(1 + x)^{-1/2} \approx 1 - \tfrac72\,x + \left(\tfrac32 + \tfrac92 + \tfrac38\right)x^2 = 1 - \tfrac72\,x + \tfrac{51}{8}\,x^2
In words

e to the power minus 3 x the quantity 1 plus x, all to the power minus one half is approximately 1 minus seven halves x plus the quantity three halves plus nine halves plus three eighths, x squared equals 1 minus seven halves x plus 51 over 8, times x squared

The one good thing about quadratic approximations: all the x3x^3, x4x^4, … terms are dropped, so the long product can be done in your head. For x≈1/100x \approx 1/100 they are of order 10−610^{-6}, while the answer keeps four decimal places (p. 7). [In the lecture Jerison first calls the last quadratic term −38-\tfrac38; it is +38+\tfrac38, which is what gives 518\tfrac{51}{8}.]

Curve sketching: what the derivatives say#

The goal is to draw the graph of ff using the signs of f′f' and f′′f'' (transcript, p. 8; notes, p. 1). A warning first: do not abandon precalculus skills and common sense. They often trump the calculus, which only fills in what you did not already know (p. 9).

First and second derivative
f′>0⇒f increasing,f′<0⇒f decreasing;f′′>0⇒f concave up,f′′<0⇒f concave downf' > 0 \Rightarrow f \text{ increasing}, \quad f' < 0 \Rightarrow f \text{ decreasing}; \qquad f'' > 0 \Rightarrow f \text{ concave up}, \quad f'' < 0 \Rightarrow f \text{ concave down}
In words

f prime greater than 0 which gives f increasing, f prime less than 0 which gives f decreasing; f double prime greater than 0 which gives f concave up, f double prime less than 0 which gives f concave down

The second rule is the first applied one step up: f′′>0f'' > 0 means f′f' is increasing. A graph can be falling and concave up at once: a slope that goes from −4-4 to −3-3 is increasing (p. 9).

Critical points. If f′(x0)=0f'(x_0) = 0, x0x_0 is a critical point and y0=f(x0)y_0 = f(x_0) is the critical value (p. 10). Jerison calls this "the most important definition in this subject". The graph need not turn round at a critical point, which is why "turning point" is not used. (A sharp corner, where f′f' does not exist, is a different kind of special point, discussed later.)

Example: y = 3x − x³#

Work through f(x)=3x−x3f(x) = 3x - x^3 (transcript, pp. 10–13; notes, pp. 2, 7):

  1. Sign of f′. f′(x)=3−3x2=3(1−x)(1+x)f'(x) = 3 - 3x^2 = 3(1 - x)(1 + x). It is positive for −1<x<1-1 < x < 1 (rising) and negative for ∣x∣>1|x| > 1 (falling).
  2. Critical points and values. f′=0f' = 0 at x=±1x = \pm1; f(1)=2f(1) = 2 and f(−1)=−2f(-1) = -2. Plot (1,2)(1, 2) and (−1,−2)(-1, -2): the graph is level there.
  3. Common sense. f(0)=0f(0) = 0, and ff is odd (only odd powers), so the left half mirrors the right.
  4. The ends. For large ∣x∣|x| the −x3-x^3 term wins: f→−∞f \to -\infty as x→+∞x \to +\infty, and f→+∞f \to +\infty as x→−∞x \to -\infty. Jerison stresses this step: it is the part a graphing calculator cannot show you, because it is off the screen (p. 12).
  5. Decoration. f′′(x)=−6xf''(x) = -6x: concave up for x<0x < 0, concave down for x>0x > 0. At x=0x = 0, where f′′=0f'' = 0, the bending changes: an inflection point (p. 13).
The example's derivatives
f(x)=3x−x3,f′(x)=3(1−x)(1+x),f′′(x)=−6xf(x) = 3x - x^3, \qquad f'(x) = 3(1 - x)(1 + x), \qquad f''(x) = -6x
In words

f(x) equals 3 x minus x cubed, f prime (x) equals 3 the quantity 1 minus x, the quantity 1 plus x, f double prime (x) equals minus 6 x

Source: 18.01 Lecture 10 transcript, pp. 10, 13
y=3x−x3y = 3x - x^3 with its first and second derivatives, computed from the formulas. f′f' crosses zero at the critical points x=±1x = \pm 1, where the graph is level; f′′f'' crosses zero at the inflection point x=0x = 0, where the bending changes. The zeros of ff are at 0 and ±3≈±1.73\pm\sqrt{3} \approx \pm 1.73.

The notes' rubric, and three examples#

The notes (written for this lecture, while the transcript reaches only the first example) collect the steps into a rubric (notes, p. 2):

  1. Plot the discontinuities of ff, especially the infinite ones.
  2. Find the critical points, where f′(x)=0f'(x) = 0.
  3. Plot the critical points and values, if easy; decide the sign of f′ between them.
  4. Find the zeros of ff, if easy.
  5. Find the behaviour at the ends (or as x→±∞x \to \pm\infty).

Three examples show why each step matters (notes, pp. 3–5):

  • y=1/xy = 1/x. y′=−1/x2y' = -1/x^2 is never positive, so you might think 1/x1/x decreases everywhere. It does, on each side of 0, but at x=0x = 0 it jumps from −∞-\infty to +∞+\infty. Find the discontinuities first.
  • y=x3−3x2+3xy = x^3 - 3x^2 + 3x. y′=3(x−1)2y' = 3(x - 1)^2: a critical point at x=1x = 1, but y′>0y' > 0 on both sides, so the function increases everywhere and only levels off for a moment at (1,1)(1, 1).
  • y=ln⁡x/xy = \ln x/x (for x>0x > 0). As x→0+x \to 0^+, y→−∞y \to -\infty. y′=(1−ln⁡x)/x2y' = (1 - \ln x)/x^2, so the only critical point is x=ex = e, with critical value 1/e1/e. The only zero is x=1x = 1, and y→0y \to 0 as x→∞x \to \infty.
Critical point of ln⁡x/x\ln x / x
y′=1−ln⁡xx2=0  ⇒  x=e,y(e)=1ey' = \frac{1 - \ln x}{x^2} = 0 \;\Rightarrow\; x = e, \qquad y(e) = \frac1e
In words

y prime equals the quantity 1 minus log x, all over x squared equals 0 which gives x equals e, y(e) equals 1 over e

The second derivative test#

The sign of f′′f'' has two uses (notes, pp. 6–7). It decorates the graph with the right concavity, and it decides what kind of critical point you have:

Second derivative test
f′(x0)=0 and f′′(x0)<0⇒maximum;f′(x0)=0 and f′′(x0)>0⇒minimumf'(x_0) = 0 \text{ and } f''(x_0) < 0 \Rightarrow \text{maximum}; \qquad f'(x_0) = 0 \text{ and } f''(x_0) > 0 \Rightarrow \text{minimum}
In words

f prime ( x nought ) equals 0 and f double prime ( x nought ) less than 0 which gives maximum; f prime ( x nought ) equals 0 and f double prime ( x nought ) greater than 0 which gives minimum

Points where f′′=0f'' = 0 are inflection points; usually the graph changes there from concave up to concave down or back (notes, p. 7). [Not always: x4x^4 has f′′(0)=0f''(0) = 0 but is concave up on both sides. Many books therefore require a change of sign; the lecture uses the simpler definition.]

Worked example

Sketch y=x4−2x2y = x^4 - 2x^2

Sketch f(x)=x4−2x2f(x) = x^4 - 2x^2: critical points and values, the type of each, inflection points, zeros and ends.

Common sense first

No discontinuities. Only even powers, so ff is even: the graph is symmetric about the yy-axis.

Critical points

f′(x)=4x3−4x=4x(x−1)(x+1)f'(x) = 4x^3 - 4x = 4x(x - 1)(x + 1), zero at x=0,±1x = 0, \pm1. Critical values: f(0)=0f(0) = 0, f(±1)=1−2=−1f(\pm1) = 1 - 2 = -1.

Second derivative test

f′′(x)=12x2−4f''(x) = 12x^2 - 4. f′′(0)=−4<0f''(0) = -4 < 0: a maximum at (0,0)(0, 0). f′′(±1)=8>0f''(\pm1) = 8 > 0: minima at (±1,−1)(\pm1, -1).

Inflection points, zeros, ends

f′′=0f'' = 0 at x=±1/3≈±0.577x = \pm1/\sqrt3 \approx \pm0.577, where f=19−23=−59≈−0.556f = \tfrac19 - \tfrac23 = -\tfrac59 \approx -0.556. Zeros: x2(x2−2)=0x^2(x^2 - 2) = 0 gives x=0x = 0 and x=±2≈±1.414x = \pm\sqrt2 \approx \pm1.414. As x→±∞x \to \pm\infty, x4x^4 wins and f→+∞f \to +\infty. The graph is a "W".

Worked example

Sketch y=xe−xy = x e^{-x}

Sketch g(x)=x e−xg(x) = x\,e^{-x}.

Derivatives

By the product rule g′(x)=(1−x) e−xg'(x) = (1 - x)\,e^{-x} and g′′(x)=(x−2) e−xg''(x) = (x - 2)\,e^{-x}.

Critical point

g′=0g' = 0 only at x=1x = 1; g′′(1)=−1/e<0g''(1) = -1/e < 0, so a maximum, with value 1/e≈0.3681/e \approx 0.368.

Inflection and ends

g′′=0g'' = 0 at x=2x = 2, where g=2/e2≈0.271g = 2/e^2 \approx 0.271: concave down before, concave up after. The only zero is x=0x = 0. As x→+∞x \to +\infty, e−xe^{-x} wins and g→0g \to 0; as x→−∞x \to -\infty, g→−∞g \to -\infty.

Summary#

Symbols on this page

Show the 33 symbols used here
Δ\Delta capital delta.
A change or difference in a quantity, e.g. Δx = x₂ − x₁. Say it: “capital delta”.
∞\infty infinity.
Infinity: larger than any number. Say it: “infinity”.
≈\approx approximately equal.
Is approximately equal to. Say it: “is approximately”.
→\to arrow.
Goes to (tends to), or becomes. Say it: “goes to”.
⇒\Rightarrow implies.
Implies: what follows is a consequence of what came before. Say it: “which gives”.
±\pm plus or minus.
Plus or minus: both signs, or an uncertainty (67.3 ± 1.2). Say it: “plus or minus”.
⋅\cdot dot.
Times (multiplication). Between two vectors: the dot product. Say it: “times”.
ln⁡\ln natural logarithm.
Natural logarithm (base e ≈ 2.718). Say it: “log”.
aa a.
In the cosmology note, the scale factor a(t), which measures the size of the universe. Say it: “a”.
cc c.
The speed of light. Unit: m/s. Say it: “c”.
kk k.
A whole number that grows without limit in (1 + 1/k)ᵏ. Say it: “k”.
TT T.
The time shown by the clock on the moving satellite. Unit: s. Say it: “capital T”.
xx x.
The variable on the horizontal axis. Say it: “x”.
yy y.
The function's value, y = f(x), in the notes' examples. Say it: “y”.
tt t.
In the cosmology note, cosmic time. Unit: s. Say it: “t”.
ee e.
Euler's number, e ≈ 2.718. Say it: “e”.
ff f.
The function being sketched (or approximated). Say it: “f”.
gg g.
The function g(x) = x e⁻ˣ of the second worked example. Say it: “g”.
vv v.
The speed of the satellite. Unit: m/s. Say it: “v”.
rr r.
Any fixed real exponent in (1 + x)ʳ. Say it: “r”.
f′f' f prime.
The derivative of f: its sign says where f increases or decreases. Say it: “f prime”.
y′y' y prime.
The derivative dy/dx in the notes' examples. Say it: “y prime”.
x0x_{0} x nought.
A critical point: a place where f′(x₀) = 0. Say it: “x nought”.
y0y_{0} y nought.
The critical value y₀ = f(x₀). Say it: “y nought”.
a1a_{1} a one.
The coefficient of x in a₀ + a₁x + a₂x²; it equals f′(0). Say it: “a one”.
a2a_{2} a two.
The coefficient of x² in a₀ + a₁x + a₂x²; it equals f″(0)/2. Say it: “a two”.
a0a_{0} a nought.
The constant coefficient of a parabola a₀ + a₁x + a₂x²; it equals f(0). Say it: “a nought”.
a¨\ddot{a} a double dot.
The second rate of change of a with time, ä = d²a/dt²: the acceleration (or, if negative, deceleration) of the expansion. Say it: “a double dot”.
g′g' g prime.
The derivative of g(x) = x e⁻ˣ. Say it: “g prime”.
f′′f'' f double prime.
The second derivative of f: its sign says which way the graph bends (concave up or down). Say it: “f double prime”.
T′T' T prime.
The time on a watch on the ground; ΔT = T′ − T. Unit: s. Say it: “capital T prime”.
aka_{k} a k.
The k-th term of the sequence a_k = (1 + 1/k)ᵏ, which tends to e. Say it: “a sub k”.
g′′g'' g double prime.
The second derivative of g(x) = x e⁻ˣ. Say it: “g double prime”.

Tap or click a symbol in a formula to see the same explanation. All symbols: symbols and notation.

Words on this page

Show the 39 words used here

New here

critical point.
A point where a function's derivative is zero, so its graph is level there; maxima and minima are found among such points.
critical value.
The value a function takes at a critical point.
inflection point.
A point where a graph changes the way it bends, from bending up to bending down or the other way.
discontinuity.
A point where a function is not continuous: its graph jumps, has a hole or shoots off to infinity there.
zero of a function.
A value of the input at which a function equals zero, where its graph crosses or touches the horizontal axis; also called a root.

Also used

graph.
The picture of a function: the curve y = f(x) for one variable, or the surface z = f(x, y) for two. Explained in Graphs, straight lines and slope.
second derivative.
The derivative of a derivative: how fast a rate of change itself is changing. Explained in Acceleration in one dimension.
time dilation.
The slowing of a moving clock as seen by an observer it moves past, predicted by special relativity. Explained in Time dilation and length contraction.
p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
dimensionless.
Having no unit, because the units cancel: a ratio such as v/c is the same number in any system of units. Explained in Friction and drag.
proportional.
Of two quantities: always in the same ratio, so that doubling one doubles the other. Explained in Graphs, straight lines and slope.
linear.
Of a relation or equation: using only first powers of the unknowns, so doubling the cause doubles the effect and effects simply add. Explained in Solving and rearranging formulas.
general relativity.
Einstein's 1915 theory of gravity, in which mass and energy curve spacetime and freely falling bodies follow the straightest possible paths through it. Explained in The equivalence principle and metrics.
rate of change.
How fast one quantity changes compared with another, often time: the change in the first divided by the change in the second. Explained in Rates of change and area under a graph.
base point.
The point x₀ around which a function is approximated, such as the point where a tangent line touches the curve. Explained in Linear and quadratic approximations.
quadratic approximation.
Replacing a function near a point by the best-matching expression with squares and products of the small changes, using first and second derivatives. Explained in Linear and quadratic approximations.
parabola.
The U-shaped curve of y = ax² + bx + c, also the path of a thrown ball when air resistance is ignored. Explained in Quadratics and power laws.
logarithm.
The power to which a fixed base must be raised to give a number: log₁₀ 1000 = 3 because 10³ = 1000. Explained in Exponentials and logarithms.
linear approximation.
Replacing a function near a point by the straight line, or flat plane, that best matches it there, using its first derivatives. Explained in Change of variables in double integrals.
concave.
Of a graph: bending, either upwards like a cup (concave up) or downwards like a cap (concave down). Explained in The logarithm from an integral, and areas between curves.
turning point.
A point where a graph changes from rising to falling or back; this course avoids the name and speaks of critical points instead.
symmetric.
Unchanged by some swap, reflection or turn; for an expression in two quantities, unchanged when they are exchanged. Explained in Introduction to Fourier series.
product rule.
The rule for the derivative of a product of two functions: (fg)′ = f′g + fg′. Explained in Circular motion: tangential acceleration and angular acceleration.
scale factor.
The number a(t) that tells how much distances in the universe have stretched: when it doubles, every distance between galaxies doubles. Explained in Towards the universe: an expanding gas cools.
dark energy.
The unknown cause of the speeding up of the universe's expansion, acting like an energy of empty space that does not thin out. Explained in Dark energy and the accelerating universe.
cosmological constant.
A constant term Einstein added to his equations of gravity, equivalent to an energy density of empty space that never changes. Explained in Dark energy and the accelerating universe.
accelerated expansion.
Expansion of the universe that gets faster with time, so the distance between far-apart galaxies grows ever more quickly. Explained in Why inflation: the horizon and flatness problems, and a slowly rolling field.
supernova.
The explosion of a star at the end of its life, briefly as bright as a whole galaxy. Explained in How bright is a distant supernova?.
symmetry.
A change, such as a reflection, a rotation or a shift, that leaves something looking exactly the same. Explained in The derivative: slope of the tangent line and rate of change.
second derivative test.
A way to sort a critical point: if the second derivative there is positive it is a minimum; if negative, a maximum.

Academic

approximation.
Close to, but not exactly, the true value; an approximation is such a value or formula, chosen because it is simpler.
transcript.
A written record of exactly what was said in a recorded lecture, word for word.
derive.
To obtain a result by reasoning or calculation from other known results.
problem set.
A weekly sheet of exercises that students work through and hand in, to practise what the lectures taught.
error.
The difference between a measured or computed value and the true one; often how large that difference may be.
messy.
In calculations, long and complicated, with many terms, though not hard in principle.
of order.
Roughly equal to, within a factor of a few; of order one means neither much bigger nor much smaller than one.
levels off.
Stops rising or falling and settles at a steady value.
dominate.
To be the largest contribution, so that the others hardly matter.

Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).

Where this leads

In cosmology

32 more cosmology pages that build on this

Pages that build on this

Practise

Check your understanding

  1. If f′(x)>0f'(x) > 0 on an interval, then on that interval ff is…
  2. A graph is falling but getting less steep: its slope goes from −4-4 to −3-3. Then f′′f'' is…
  3. y=1/xy = 1/x has y′=−1/x2<0y' = -1/x^2 < 0 everywhere it is defined. Is 1/x1/x decreasing on the whole real line?
  4. For f(x)=3x−x3f(x) = 3x - x^3, what is ff at its critical point x=1x = 1?
  5. With f′(x0)=0f'(x_0) = 0 and f′′(x0)<0f''(x_0) < 0, the critical point x0x_0 is…
0 of 5 answered

Flashcards

1 / 4