← Back to course

Math — Mechina

Derivatives and curve sketching

Summary

The derivative f′(x)f'(x) is the slope of the tangent to the graph at xx. Where it is positive the function increases, where it is negative it decreases, and where it vanishes and changes sign there is an extremum. Curve sketching collects all this into one sketch.

(xn)′=nxn−1,(ex)′=ex,(ln⁡x)′=1x,(sin⁡x)′=cos⁡x,(cos⁡x)′=−sin⁡x(x^n)'=nx^{n-1},\quad (e^x)'=e^x,\quad (\ln x)'=\frac1x,\quad (\sin x)'=\cos x,\quad (\cos x)'=-\sin x
(fg)′=f′g+fg′,(fg)′=f′g−fg′g2,(f(g(x)))′=f′(g(x))⋅g′(x)(fg)'=f'g+fg',\qquad \left(\frac fg\right)'=\frac{f'g-fg'}{g^2},\qquad \big(f(g(x))\big)'=f'(g(x))\cdot g'(x)
  • Domain: ln⁡\ln — a positive argument; a fraction — a nonzero denominator; an even root — a non-negative expression.
  • Vertical asymptote: the function goes to infinity near a forbidden point. Horizontal: lim⁡x→±∞f=c\lim_{x\to\pm\infty}f=c. Oblique: y=mx+ny=mx+n with m=lim⁡fxm=\lim\frac fx, n=lim⁡(f−mx)n=\lim(f-mx).
  • Extremum: f′=0f'=0 and a sign change. Inflection point: f′′=0f''=0 and a sign change.
  • Important limits: ln⁡xx→0\frac{\ln x}{x}\to0, xe−x→0xe^{-x}\to0 as x→∞x\to\infty; xln⁡x→0x\ln x\to0 as x→0+x\to0^+.
-1123456-0.2-0.10.10.20.30.40.50.60.7xyx^2e^{-x}(0, 0)(2, 0.54)
f=x2e−xf=x^2e^{-x}: a minimum at (0,0)(0,0), a maximum at (2,4e−2)(2,4e^{-2}), and the asymptote y=0y=0 as x→∞x\to\infty.

What the derivative says, in words

The derivative is an instantaneous rate of change. If s(t)s(t) is a car's position, s′(t)s'(t) is its speed exactly at time tt — what the speedometer shows. On a graph it is the slope of the line that touches the curve at one point. Where it comes from: take two nearby points on the graph, compute the slope f(x+h)−f(x)h\frac{f(x+h)-f(x)}{h}, and let hh go to zero. Example: for f=x2f=x^2 we get (x+h)2−x2h=2x+h→2x\frac{(x+h)^2-x^2}{h}=2x+h\to2x.

The chain rule — the rule most often forgotten

When there is a function inside a function, differentiate the outer one (leaving the inner one as it is) and multiply by the derivative of the inner one. Examples: ((3x+1)5)′=5(3x+1)4⋅3\left((3x+1)^5\right)'=5(3x+1)^4\cdot3; (ex2)′=ex2⋅2x\left(e^{x^2}\right)'=e^{x^2}\cdot2x; (ln⁡(x2+1))′=2xx2+1\left(\ln(x^2+1)\right)'=\frac{2x}{x^2+1}; (sin⁡2x)′=2cos⁡2x(\sin2x)'=2\cos2x. The sign of a chain: brackets, or a power of an expression rather than of plain xx.

Equation of a tangent — an example

The tangent to f=x3−3xf=x^3-3x at x0=2x_0=2: f(2)=2f(2)=2, f′(x)=3x2−3f'(x)=3x^2-3, so f′(2)=9f'(2)=9. The tangent: y=2+9(x−2)y=2+9(x-2), i.e. y=9x−16y=9x-16. You always need two things: a point (from the function) and a slope (from the derivative).

Investigating a function — the full order

  1. Domain.
  2. Intercepts with the axes (if easy to compute).
  3. Asymptotes: vertical at the forbidden points, horizontal or oblique at infinity.
  4. The derivative, the points where f′=0f'=0, and a sign table — intervals of increase and decrease, and extrema.
  5. If needed — the second derivative, concavity and inflection points.
  6. A sketch that puts it all together, and a check that it agrees with every part.

Optimisation problems — "the most", "the least"

Example: we have 4040 metres of fence and want a rectangle of maximal area. If one side is xx, the other is 20−x20-x, and the area is S=x(20−x)=20x−x2S=x(20-x)=20x-x^2. S′=20−2x=0S'=20-2x=0 gives x=10x=10 — a square of area 100100. The order: (1) one variable, (2) the quantity to maximise or minimise as a function of it, (3) a sensible range for the variable, (4) derivative equal to zero, (5) check it really is a maximum (sign table or the ends of the range).

Common mistakes

  • Forgetting the inner derivative in the chain rule.
  • (fg)′=f′g′(fg)'=f'g' — wrong; correct: f′g+fg′f'g+fg'.
  • Concluding an extremum from f′=0f'=0 without checking a sign change (e.g. x3x^3 at 00).
  • For a tangent, substituting x0x_0 into the derivative but also taking y0y_0 from the derivative instead of the function.
  • Not checking the ends of the range in an optimisation problem.

Question types

1

Extrema and a sign chart

A function with ee or ln⁡\ln; the question asks where it increases and decreases and what the extreme values are.

Worked example

Find the extrema of f(x)=x2e−xf(x)=x^2e^{-x}.

Solution

IdeaThe product rule, then the sign of the derivative from the polynomial factor.
  1. f′(x)=2xe−x−x2e−x=x(2−x)e−xf'(x)=2xe^{-x}-x^2e^{-x}=x(2-x)e^{-x}.

    Why: (e−x)′=−e−x(e^{-x})'=-e^{-x}.

  2. f′=0f'=0 at x=0x=0 and x=2x=2.

    Why: e−x≠0e^{-x}\neq0.

  3. Signs: −- before 00, ++ between 00 and 22, −- after 22.

    Why: Test a point in every interval.

  4. Minimum (0,0)(0,0); maximum (2,4e−2)≈(2,0.541)(2,4e^{-2})\approx(2,0.541).
Checkf≥0f\ge0 always, so a minimum of 00 makes sense ✓.
Common mistakeDifferentiating e−xe^{-x} as e−xe^{-x} and getting f′=(2x+x2)e−xf'=(2x+x^2)e^{-x}.

Variants of this type · 1

1.1A function with a logarithm

Worked example

Find the maximum of g(x)=ln⁡xxg(x)=\frac{\ln x}{x}.

Solution

IdeaThe quotient rule; domain x>0x>0.
  1. g′=1−ln⁡xx2g'=\frac{1-\ln x}{x^2}.
  2. g′=0⇒x=eg'=0\Rightarrow x=e, g(e)=1eg(e)=\frac1e.
Checkg′>0g'>0 for x<ex<e and <0<0 after ✓.
Common mistakeForgetting the domain and looking for an extremum at x<0x<0.
2

Asymptotes

A fraction, an absolute value or a root — asking about the behaviour near forbidden points and at infinity.

Worked example

Find the asymptotes of f(x)=x2+1x−2f(x)=\frac{x^2+1}{x-2}.

Solution

IdeaVertical — where the denominator vanishes; oblique — polynomial division.
  1. Vertical: x=2x=2 (the numerator is 5≠05\neq0).
  2. x2+1=(x−2)(x+2)+5x^2+1=(x-2)(x+2)+5, that is f=x+2+5x−2f=x+2+\frac{5}{x-2}.

    Why: Polynomial division.

  3. Oblique: y=x+2y=x+2 in both directions.
Checkx=100x=100: f≈102.05f\approx102.05, x+2=102x+2=102 ✓.
Common mistakeLooking for a horizontal asymptote when the numerator has a higher degree than the denominator.

Variants of this type · 1

2.1Absolute value — different asymptotes

Worked example

f(x)=x2+3x∣x−1∣f(x)=\frac{x^2+3x}{|x-1|}: what are the asymptotes at ±∞\pm\infty?

Solution

IdeaOpen ∣x−1∣|x-1| on each side.
  1. x>1x>1: x2+3xx−1→y=x+4\frac{x^2+3x}{x-1}\to y=x+4.
  2. x<1x<1: −x2+3xx−1→y=−x−4-\frac{x^2+3x}{x-1}\to y=-x-4.
CheckOn the left f>0f>0, and indeed −x−4>0-x-4>0 as x→−∞x\to-\infty ✓.
Common mistakeThe same asymptote on both sides.
3

Number of solutions from a graph

“How many solutions does f(x)=mf(x)=m have” or an equation with a parameter such as ln⁡x=mx\ln x=mx.

Worked example

How many solutions does ln⁡x=mx\ln x=mx have, depending on mm?

Solution

IdeaRearrange: ln⁡xx=m\frac{\ln x}{x}=m, and use the graph of g=ln⁡xxg=\frac{\ln x}{x}.
  1. gg increases up to x=ex=e (value 1e\frac1e) and decreases to 00 at infinity; near 00 it tends to −∞-\infty.
  2. m≤0m\le0: one solution; 0<m<1e0<m<\frac1e: two; m=1em=\frac1e: one; m>1em>\frac1e: none.
Checkm=0m=0: ln⁡x=0⇒x=1\ln x=0\Rightarrow x=1 — one solution ✓.
Common mistakeForgetting that after x=1x=1 the graph never crosses y=0y=0 again.

Exam-style problems

One problem with several parts on the same data, as on the exam. Each part adds something to the drawing.

Practice · 20

Test yourself with problems and full solutions.

Go to practice