Navigation

Concept Review

Differential Calculus

The Derivative: Definition and Interpretation

The derivative is the central object of differential calculus: it turns the geometric question "what is the slope of a curve at a point?" and the physical question "how fast is this quantity changing right now?" into one and the same limit. Everything that follows in the course — the differentiation rules, related rates, curve sketching, optimisation, l'Hopital's Rule — is either a shortcut for evaluating this limit or an application of it. Here we build it directly from the limit machinery of the previous topics, before any rules are available.

The difference quotient

Let ff be defined on an open interval containing aa, and let h0h\ne 0 be small enough that a+ha+h is also in that interval. The average rate of change of ff from aa to a+ha+h is the difference quotient

f(a+h)f(a)h\frac{f(a+h)-f(a)}{h}

Geometrically it is the slope of the secant line through (a,f(a))(a,f(a)) and (a+h,f(a+h))(a+h,f(a+h)). Writing x=a+hx=a+h gives the equivalent form f(x)f(a)xa\dfrac{f(x)-f(a)}{x-a}, the slope of the secant through (a,f(a))(a,f(a)) and (x,f(x))(x,f(x)).

The two equivalent definitions

Definition. ff is differentiable at aa if the following limit exists and is a finite number, and then that number is the derivative of ff at aa:

f(a)=limh0f(a+h)f(a)h=limxaf(x)f(a)xaf'(a)=\lim_{h\to 0}\frac{f(a+h)-f(a)}{h}=\lim_{x\to a}\frac{f(x)-f(a)}{x-a}

The substitution x=a+hx=a+h (so h0h\to 0 exactly when xax\to a) shows the two limits are the same limit written twice. Two hypotheses are hiding in the definition: ff must be defined on an open interval around aa (so that both h>0h>0 and h<0h<0 are allowed), and the limit must be two-sided. The one-sided derivatives

f(a)=limh0f(a+h)f(a)h,f+(a)=limh0+f(a+h)f(a)hf'_-(a)=\lim_{h\to 0^-}\frac{f(a+h)-f(a)}{h},\qquad f'_+(a)=\lim_{h\to 0^+}\frac{f(a+h)-f(a)}{h}

are defined by these one-sided limits whenever those limits exist — either or both may fail to exist (for g(x)=xsin(1/x)g(x)=x\sin(1/x) with g(0)=0g(0)=0, neither one-sided derivative exists at 00; the value at 00 must be assigned before the quotient even makes sense) — and f(a)f'(a) exists exactly when both exist, are finite, and are equal. At a domain endpoint only the relevant one-sided derivative can be discussed.

Tangent line as the limit of secants

As h0h\to 0 the second point slides along the graph towards (a,f(a))(a,f(a)) and the secant lines rotate towards a limiting position: the tangent line. Its slope is f(a)f'(a), so

y=f(a)+f(a)(xa)(tangent at x=a)y=f(a)+f'(a)(x-a)\qquad\text{(tangent at }x=a\text{)}

The normal line at the same point is y=f(a)1f(a)(xa)y=f(a)-\dfrac{1}{f'(a)}(x-a), valid when f(a)0f'(a)\ne 0; if f(a)=0f'(a)=0 the tangent is horizontal and the normal line is the vertical line x=ax=a. Suppose instead the difference quotient becomes infinite. If ff is continuous at aa and the two-sided quotient tends to ++\infty, or tends to -\infty — the same sign from both sides — then the secants rotate towards a vertical line and the graph has a vertical tangent x=ax=a; even then f(a)f'(a) does not exist, because a derivative must be a finite number. Both hypotheses are needed: if the quotient tends to ++\infty on one side and -\infty on the other, the point is a cusp, not a vertical tangent (this is x2/3x^{2/3} at 00); and without continuity there is no tangent at all (for f(x)=sgn(x)f(x)=\text{sgn}(x) with f(0)=0f(0)=0 the quotient is 1/h+1/\lvert h\rvert\to+\infty from both sides, yet the graph merely jumps).

Instantaneous rate of change and units

If y=f(x)y=f(x), then f(a)f'(a) is the instantaneous rate of change of yy with respect to xx at x=ax=a. Its units are always (units of ff) per (unit of xx). The sign tells direction (f(a)>0f'(a)>0: increasing at aa; f(a)<0f'(a)<0: decreasing), the size tells steepness, and for small Δx\Delta x,

f(a+Δx)f(a)+f(a)Δxf(a+\Delta x)\approx f(a)+f'(a)\,\Delta x

SituationFunction and variablesDerivative meansUnits of the derivative
particle on a lines(t)s(t) in m, tt in svelocity s(t)=v(t)s'(t)=v(t)m/s
same particlev(t)v(t) in m/sacceleration v(t)=s(t)v'(t)=s''(t)m/s2^2
productionC(x)C(x) in dollars, xx itemsmarginal cost C(x)C'(x)dollars per item
draining tankV(t)V(t) in litres, tt in minflow rate V(t)V'(t)litres per minute
cooling coffeeT(t)T(t) in ^\circC, tt in mincooling rate T(t)T'(t)^\circC per minute
populationP(t)P(t) individuals, tt yearsgrowth rate P(t)P'(t)individuals per year

Worked example 1 — a polynomial, from the definition

Find f(x)f'(x) for f(x)=3x25x+1f(x)=3x^2-5x+1 and the tangent line at x=2x=2.

f(x+h)=3(x+h)25(x+h)+1=3x2+6xh+3h25x5h+1f(x+h)f(x)=6xh+3h25h=h(6x+3h5)f(x+h)f(x)h=6x+3h5(h0)f(x)=limh0(6x+3h5)=6x5\begin{aligned} f(x+h)&=3(x+h)^2-5(x+h)+1\\ &=3x^2+6xh+3h^2-5x-5h+1\\ f(x+h)-f(x)&=6xh+3h^2-5h=h(6x+3h-5)\\ \frac{f(x+h)-f(x)}{h}&=6x+3h-5\qquad (h\ne 0)\\ f'(x)&=\lim_{h\to 0}(6x+3h-5)=6x-5 \end{aligned}

Cancelling hh before taking the limit is the whole game: only after cancelling is the expression continuous in hh at h=0h=0. At x=2x=2: f(2)=1210+1=3f(2)=12-10+1=3 and f(2)=7f'(2)=7, so the tangent is y=3+7(x2)y=3+7(x-2), i.e. y=7x11y=7x-11.

Worked example 2 — a square root, from the definition

Find f(x)f'(x) for f(x)=2x+1f(x)=\sqrt{2x+1} (domain x12x\ge-\frac12).

f(x+h)f(x)h=2x+2h+12x+1h=2x+2h+12x+1h2x+2h+1+2x+12x+2h+1+2x+1=(2x+2h+1)(2x+1)h(2x+2h+1+2x+1)=2hh(2x+2h+1+2x+1)=22x+2h+1+2x+1f(x)=222x+1=12x+1,x>12\begin{aligned} \frac{f(x+h)-f(x)}{h}&=\frac{\sqrt{2x+2h+1}-\sqrt{2x+1}}{h}\\ &=\frac{\sqrt{2x+2h+1}-\sqrt{2x+1}}{h}\cdot\frac{\sqrt{2x+2h+1}+\sqrt{2x+1}}{\sqrt{2x+2h+1}+\sqrt{2x+1}}\\ &=\frac{(2x+2h+1)-(2x+1)}{h\left(\sqrt{2x+2h+1}+\sqrt{2x+1}\right)}\\ &=\frac{2h}{h\left(\sqrt{2x+2h+1}+\sqrt{2x+1}\right)}=\frac{2}{\sqrt{2x+2h+1}+\sqrt{2x+1}}\\ f'(x)&=\frac{2}{2\sqrt{2x+1}}=\frac{1}{\sqrt{2x+1}},\qquad x>-\frac12 \end{aligned}

Note the domain shrank: ff is defined at x=12x=-\frac12 but ff' is not. At x=4x=4, f(4)=3f(4)=3 and f(4)=13f'(4)=\frac13, so the tangent is y=3+13(x4)y=3+\frac13(x-4).

Worked example 3 — a rational function, using the xax\to a form

For f(x)=1xf(x)=\dfrac1x and a0a\ne 0:

f(a)=limxa1x1axa=limxaaxaxxa=limxa(xa)ax(xa)=limxa1ax=1a2\begin{aligned} f'(a)&=\lim_{x\to a}\frac{\frac1x-\frac1a}{x-a} =\lim_{x\to a}\frac{\frac{a-x}{ax}}{x-a}\\ &=\lim_{x\to a}\frac{-(x-a)}{ax(x-a)} =\lim_{x\to a}\frac{-1}{ax}=-\frac{1}{a^2} \end{aligned}

The derivative as a function, and notation

Letting aa vary produces a new function ff' whose domain is {xdomf: f(x) exists}\{x\in\text{dom}\,f:\ f'(x)\text{ exists}\}, a subset of domf\text{dom}\, f that may be strictly smaller (Worked example 2).

NotationNameComment
f(x)f'(x), yy'Lagrange (prime)value at a point: f(a)f'(a)
dydx\dfrac{dy}{dx}, dfdx\dfrac{df}{dx}Leibnizone symbol, not a fraction of two numbers
ddx[f(x)]\dfrac{d}{dx}\left[f(x)\right]operator formddx\dfrac{d}{dx} acts on what follows
DxfD_xfEulercommon in DE courses
y˙\dot yNewtonused only for derivatives in time

To evaluate Leibniz notation at a point write dydxx=a\left.\dfrac{dy}{dx}\right|_{x=a}. Higher derivatives: ff'', ff''', then f(4),,f(n)f^{(4)},\dots,f^{(n)}, or d2ydx2, dnydxn\dfrac{d^2y}{dx^2},\ \dfrac{d^ny}{dx^n}.

Differentiability implies continuity

Theorem. If ff is differentiable at aa, then ff is continuous at aa.

Proof. For xax\ne a write f(x)f(a)=f(x)f(a)xa(xa)f(x)-f(a)=\dfrac{f(x)-f(a)}{x-a}\cdot(x-a). By the Product Law for limits, limxa(f(x)f(a))=f(a)0=0\lim_{x\to a}\left(f(x)-f(a)\right)=f'(a)\cdot 0=0, so limxaf(x)=f(a)\lim_{x\to a}f(x)=f(a). ∎

The converse is false. f(x)=xf(x)=|x| is continuous at 00, yet f+(0)=limh0+hh=1f'_+(0)=\lim_{h\to 0^+}\frac{|h|}{h}=1 while f(0)=limh0hh=1f'_-(0)=\lim_{h\to 0^-}\frac{|h|}{h}=-1, so f(0)f'(0) does not exist.

The useful working form is the contrapositive: if ff is not continuous at aa, then ff is not differentiable at aa.

How differentiability fails

Failure typeExample (at a=0a=0)Behaviour of the difference quotient
cornerf(x)=xf(x)=\lvert x\rvertone-sided limits 1-1 and 11: finite but unequal
cuspf(x)=x2/3f(x)=x^{2/3}h1/3+h^{-1/3}\to+\infty from the right, \to-\infty from the left
vertical tangentf(x)=x1/3f(x)=x^{1/3}h2/3+h^{-2/3}\to+\infty from both sides; tangent is x=0x=0
discontinuity (jump/removable)any ff with a jump at 00quotient unbounded; excluded by the theorem above
infinite oscillationf(x)=xsin(1/x)f(x)=x\sin(1/x), f(0)=0f(0)=0quotient =sin(1/h)=\sin(1/h), no limit at all

Higher derivatives

f=(f)f''=(f')', f=(f)f'''=(f'')', and in general f(n)=(f(n1))f^{(n)}=\left(f^{(n-1)}\right)', each defined only where the previous derivative is itself differentiable. Interpretation: ff'' is the rate of change of the rate of change — acceleration for position, concavity for a graph. Example: f(x)=x32xf(x)=x^3-2x gives f=3x22f'=3x^2-2, f=6xf''=6x, f=6f'''=6, f(4)=0f^{(4)}=0. Differentiability does not cascade: f(x)=xxf(x)=x|x| has f(x)=2xf'(x)=2|x| everywhere (including f(0)=0f'(0)=0), but f(0)f''(0) does not exist.

Common mistakes

  • Plugging in h=0h=0 too early. Wrong: limh0f(x+h)f(x)h=00\lim_{h\to0}\frac{f(x+h)-f(x)}{h}=\frac{0}{0}. Right: simplify the quotient algebraically until the hh in the denominator cancels, then let h0h\to0.
  • Mis-substituting. Wrong: f(x+h)=f(x)+hf(x+h)=f(x)+h. Right: replace every xx, e.g. for f(x)=x24xf(x)=x^2-4x, f(x+h)=(x+h)24(x+h)=x2+2xh+h24x4hf(x+h)=(x+h)^2-4(x+h)=x^2+2xh+h^2-4x-4h.
  • Splitting roots. Wrong: x+h=x+h\sqrt{x+h}=\sqrt x+\sqrt h. Right: multiply by the conjugate x+h+xx+h+x\dfrac{\sqrt{x+h}+\sqrt x}{\sqrt{x+h}+\sqrt x}.
  • Dropping the limit symbol. Every line before the final one must still say limh0\lim_{h\to0}; an equation between an expression in hh and a number is false.
  • Reversing the theorem. Wrong: "ff is continuous at aa, so f(a)f'(a) exists." Right: differentiability \Rightarrow continuity only; x|x| at 00 kills the converse.
  • Tangent line slips. Wrong: y=f(a)(xa)y=f'(a)(x-a) (missing f(a)f(a)), or leaving the slope as the function f(x)f'(x). The slope must be the number f(a)f'(a).
  • Confusing average with instantaneous. f(b)f(a)ba\frac{f(b)-f(a)}{b-a} is a secant slope over an interval; f(a)f'(a) is a tangent slope at a point.
  • Ignoring the domain of ff'. For f(x)=xf(x)=\sqrt x, domf=[0,)\text{dom}\,f=[0,\infty) but domf=(0,)\text{dom}\,f'=(0,\infty): the right-hand quotient at 00 is hh=1h+\frac{\sqrt h}{h}=\frac{1}{\sqrt h}\to+\infty.
  • Differentiating a constant by accident. ddx[f(a)]=0\frac{d}{dx}\left[f(a)\right]=0 because f(a)f(a) is a number; what you mean is ddxf(x)x=a\left.\frac{d}{dx}f(x)\right|_{x=a}.
  • Notation for second derivatives. d2ydx2\dfrac{d^2y}{dx^2} is not (dydx)2\left(\dfrac{dy}{dx}\right)^2, and f(x)f''(x) is not (f(x))2\left(f'(x)\right)^2.
  • Dropping units. If VV is in litres and tt in minutes, V(10)=3.5V'(10)=-3.5 means 3.5-3.5 litres per minute, not 3.5-3.5 litres.

Key terms

  • difference quotient
  • average rate of change
  • secant line
  • tangent line
  • derivative at a point
  • instantaneous rate of change
  • one-sided derivative
  • differentiable
  • derivative as a function
  • Leibniz notation
  • prime (Lagrange) notation
  • differentiability implies continuity
  • corner
  • cusp
  • vertical tangent
  • normal line
  • linear approximation
  • second derivative
  • higher derivatives
  • units of a derivative

Practice Problems

Use the limit definition of the derivative to compute f(x)f'(x) for f(x)=43x2f(x)=4-3x^2 Then find an equation of the tangent line to y=f(x)y=f(x) at x=2x=2.

Show hint

Write out f(x+h)f(x+h) in full, expand, and look for the factor of hh that must cancel before you let h0h\to0.

Show answer

Step 1 — build f(x+h)f(x+h).

f(x+h)=43(x+h)2=43(x2+2xh+h2)=43x26xh3h2f(x+h)=4-3(x+h)^2=4-3\left(x^2+2xh+h^2\right)=4-3x^2-6xh-3h^2

Step 2 — subtract and factor.

f(x+h)f(x)=(43x26xh3h2)(43x2)=6xh3h2=h(6x3h)f(x+h)-f(x)=\left(4-3x^2-6xh-3h^2\right)-\left(4-3x^2\right)=-6xh-3h^2=h(-6x-3h)

Step 3 — divide (legal, since h0h\ne0 in the limit) and take the limit.

f(x)=limh0h(6x3h)h=limh0(6x3h)=6x\begin{aligned} f'(x)&=\lim_{h\to 0}\frac{h(-6x-3h)}{h}\\ &=\lim_{h\to 0}\left(-6x-3h\right)\\ &=-6x \end{aligned}

So f(x)=6xf'(x)=-6x, valid for all real xx.

Step 4 — tangent line at x=2x=2.

f(2)=43(4)=8,f(2)=6(2)=12f(2)=4-3(4)=-8,\qquad f'(2)=-6(2)=-12

y=f(2)+f(2)(x2)=812(x2)=12x+16y=f(2)+f'(2)(x-2)=-8-12(x-2)=-12x+16

Answer: f(x)=6xf'(x)=-6x and the tangent line is y=12x+16y=-12x+16.

Check: at x=2x=2 the line gives 24+16=8=f(2)-24+16=-8=f(2), so the line does pass through the point of tangency.

Each of the following limits is secretly a derivative f(a)f'(a). In each case identify a function ff and a number aa, then evaluate the limit.

(a) limh0(3+h)481h\displaystyle\lim_{h\to 0}\frac{(3+h)^4-81}{h}

(b) limx2x38x2\displaystyle\lim_{x\to 2}\frac{x^3-8}{x-2}

(c) limh09+h3h\displaystyle\lim_{h\to 0}\frac{\sqrt{9+h}-3}{h}

Show hint

Compare each expression with the two standard forms of the definition and ask: what is being plugged into what, and what number is playing the role of aa?

Show answer

(a) The pattern is limh0f(a+h)f(a)h\lim_{h\to0}\frac{f(a+h)-f(a)}{h} with f(x)=x4f(x)=x^4 and a=3a=3 (indeed f(3)=81f(3)=81). Evaluate directly by expanding:

(3+h)4=81+108h+54h2+12h3+h4(3+h)^4=81+108h+54h^2+12h^3+h^4

limh0(3+h)481h=limh0108h+54h2+12h3+h4h=limh0(108+54h+12h2+h3)=108\begin{aligned} \lim_{h\to 0}\frac{(3+h)^4-81}{h}&=\lim_{h\to 0}\frac{108h+54h^2+12h^3+h^4}{h}\\ &=\lim_{h\to 0}\left(108+54h+12h^2+h^3\right)=108 \end{aligned}

So the limit is f(3)=108f'(3)=108.

(b) The pattern is limxaf(x)f(a)xa\lim_{x\to a}\frac{f(x)-f(a)}{x-a} with f(x)=x3f(x)=x^3 and a=2a=2 (indeed f(2)=8f(2)=8). Factor the difference of cubes:

limx2x38x2=limx2(x2)(x2+2x+4)x2=limx2(x2+2x+4)=4+4+4=12\lim_{x\to 2}\frac{x^3-8}{x-2}=\lim_{x\to 2}\frac{(x-2)\left(x^2+2x+4\right)}{x-2}=\lim_{x\to 2}\left(x^2+2x+4\right)=4+4+4=12

So the limit is f(2)=12f'(2)=12.

(c) The pattern is limh0f(a+h)f(a)h\lim_{h\to0}\frac{f(a+h)-f(a)}{h} with f(x)=xf(x)=\sqrt{x} and a=9a=9 (indeed f(9)=3f(9)=3). Rationalise:

limh09+h3h=limh09+h3h9+h+39+h+3=limh0(9+h)9h(9+h+3)=limh019+h+3=13+3=16\begin{aligned} \lim_{h\to 0}\frac{\sqrt{9+h}-3}{h}&=\lim_{h\to 0}\frac{\sqrt{9+h}-3}{h}\cdot\frac{\sqrt{9+h}+3}{\sqrt{9+h}+3}\\ &=\lim_{h\to 0}\frac{(9+h)-9}{h\left(\sqrt{9+h}+3\right)}\\ &=\lim_{h\to 0}\frac{1}{\sqrt{9+h}+3}=\frac{1}{3+3}=\frac16 \end{aligned}

So the limit is f(9)=16f'(9)=\dfrac16.

Answers: (a) f(x)=x4f(x)=x^4, a=3a=3, limit =108=108; (b) f(x)=x3f(x)=x^3, a=2a=2, limit =12=12; (c) f(x)=xf(x)=\sqrt x, a=9a=9, limit =16=\frac16.

A tank is being drained. Let V(t)V(t) be the volume of water in the tank, in litres, tt minutes after draining begins. Suppose V(10)=180V(10)=180 and V(10)=3.5V'(10)=-3.5.

(a) State the units of V(10)V'(10) and explain in one sentence what V(10)=3.5V'(10)=-3.5 means physically.

(b) Estimate V(10.5)V(10.5) and V(12)V(12).

(c) Which of the two estimates in (b) do you trust more, and why?

Show hint

The units of a derivative are always the units of the output divided by the units of the input; for the estimates use the linear approximation built from the tangent line.

Show answer

(a) Units and meaning. VV is measured in litres and tt in minutes, so

V(t) has units litresminuteV'(t)\ \text{has units}\ \frac{\text{litres}}{\text{minute}}

V(10)=3.5V'(10)=-3.5 litres per minute means that at the instant t=10t=10 minutes the water is leaving the tank (the sign is negative, so VV is decreasing) at an instantaneous rate of 3.53.5 litres per minute.

(b) Linear estimates. The tangent line at t=10t=10 is

L(t)=V(10)+V(10)(t10)=1803.5(t10)L(t)=V(10)+V'(10)(t-10)=180-3.5(t-10)

For t=10.5t=10.5 (so Δt=0.5\Delta t=0.5):

V(10.5)1803.5(0.5)=1801.75=178.25 litresV(10.5)\approx 180-3.5(0.5)=180-1.75=178.25\ \text{litres}

For t=12t=12 (so Δt=2\Delta t=2):

V(12)1803.5(2)=1807=173 litresV(12)\approx 180-3.5(2)=180-7=173\ \text{litres}

(c) The estimate for V(10.5)V(10.5) is more trustworthy. The approximation V(t)V(10)+V(10)(t10)V(t)\approx V(10)+V'(10)(t-10) replaces the graph of VV by its tangent line at t=10t=10, which is only close to the graph for small Δt\Delta t. Over 0.50.5 minutes the drainage rate has little time to change; over 22 minutes it may change substantially (a draining tank typically empties more slowly as the water level drops, i.e. VV' increases towards 00), so the tangent-line value drifts away from the true value.

Answers: (a) litres per minute; the volume is decreasing at 3.53.5 L/min at t=10t=10. (b) V(10.5)178.25V(10.5)\approx 178.25 L, V(12)173V(12)\approx 173 L. (c) The t=10.5t=10.5 estimate, because the linear approximation is only reliable for small changes in tt.

A cup of coffee cools in a room. Its temperature TT (in ^\circC) is recorded at time tt (in minutes):

tt (min)02468
TT ({}^\circC)9280716459

(a) Compute the average rate of change of TT over [0,8][0,8].

(b) Estimate T(4)T'(4) using a backward difference, a forward difference, and the symmetric (centred) difference.

(c) What do the estimates suggest about the sign of TT'', and what does that mean physically?

Show hint

A difference quotient built from two table entries is exactly a secant slope; the centred estimate uses the entries on either side of t=4t=4.

Show answer

(a) Average rate of change on [0,8][0,8].

T(8)T(0)80=59928=338=4.125 C per minute\frac{T(8)-T(0)}{8-0}=\frac{59-92}{8}=\frac{-33}{8}=-4.125\ ^\circ\text{C per minute}

(b) Three estimates of T(4)T'(4). Each is a difference quotient centred on, or ending at, t=4t=4.

Backward difference (uses t=2t=2 and t=4t=4):

T(4)T(2)42=71802=92=4.5 C/min\frac{T(4)-T(2)}{4-2}=\frac{71-80}{2}=\frac{-9}{2}=-4.5\ ^\circ\text{C/min}

Forward difference (uses t=4t=4 and t=6t=6):

T(6)T(4)64=64712=72=3.5 C/min\frac{T(6)-T(4)}{6-4}=\frac{64-71}{2}=\frac{-7}{2}=-3.5\ ^\circ\text{C/min}

Symmetric difference (uses t=2t=2 and t=6t=6):

T(6)T(2)62=64804=164=4 C/min\frac{T(6)-T(2)}{6-2}=\frac{64-80}{4}=\frac{-16}{4}=-4\ ^\circ\text{C/min}

Note the symmetric estimate is exactly the average of the other two, 12(4.53.5)=4\frac12(-4.5-3.5)=-4, and it is normally the most accurate because the two one-sided errors partly cancel. So T(4)4 T'(4)\approx -4\ ^\circC per minute: at t=4t=4 minutes the coffee is cooling at about 44 degrees Celsius per minute.

(c) Sign of TT''. Successive secant slopes over [0,2],[2,4],[4,6],[6,8][0,2],[2,4],[4,6],[6,8] are

80922=6,71802=4.5,64712=3.5,59642=2.5\frac{80-92}{2}=-6,\qquad \frac{71-80}{2}=-4.5,\qquad \frac{64-71}{2}=-3.5,\qquad \frac{59-64}{2}=-2.5

These are increasing (6<4.5<3.5<2.5-6<-4.5<-3.5<-2.5). Five data points cannot prove anything about TT'' — infinitely many functions pass through the same five points — but a steadily increasing run of secant slopes is exactly what an increasing TT' looks like, so the data indicate that TT' is increasing and hence that T>0T''>0 on [0,8][0,8]. (Strictly, TT' increasing forces only T0T''\ge 0 wherever TT'' exists; the strict inequality is the natural reading here.) Physically: the coffee is still cooling (T<0T'<0) but the cooling is slowing down as the coffee approaches room temperature; the graph of TT is concave up.

Answers: (a) 4.125 -4.125\ ^\circC/min. (b) 4.5-4.5, 3.5-3.5 and 4 -4\ ^\circC/min respectively; best estimate T(4)4 T'(4)\approx-4\ ^\circC/min. (c) the data indicate T>0T''>0 (graph concave up): the rate of cooling is becoming less negative, so cooling slows over time.

Let f(x)=xx+3f(x)=\dfrac{x}{x+3}.

(a) Use the limit definition to find f(x)f'(x).

(b) State the domain of ff and the domain of ff'.

(c) Find the tangent line to y=f(x)y=f(x) at x=1x=-1, and explain why ff has no horizontal tangent anywhere.

Show hint

Combine the two fractions in the numerator of the difference quotient over a common denominator first; a factor of hh will appear on top and cancel.

Show answer

(a) Derivative from the definition.

f(x+h)f(x)=x+hx+h+3xx+3=(x+h)(x+3)x(x+h+3)(x+h+3)(x+3)\begin{aligned} f(x+h)-f(x)&=\frac{x+h}{x+h+3}-\frac{x}{x+3}\\ &=\frac{(x+h)(x+3)-x(x+h+3)}{(x+h+3)(x+3)} \end{aligned}

Expand the numerator carefully:

(x+h)(x+3)=x2+3x+hx+3hx(x+h+3)=x2+hx+3xdifference=(x2+3x+hx+3h)(x2+hx+3x)=3h\begin{aligned} (x+h)(x+3)&=x^2+3x+hx+3h\\ x(x+h+3)&=x^2+hx+3x\\ \text{difference}&=\left(x^2+3x+hx+3h\right)-\left(x^2+hx+3x\right)=3h \end{aligned}

Therefore

f(x+h)f(x)h=1h3h(x+h+3)(x+3)=3(x+h+3)(x+3)(h0)f(x)=limh03(x+h+3)(x+3)=3(x+3)2\begin{aligned} \frac{f(x+h)-f(x)}{h}&=\frac{1}{h}\cdot\frac{3h}{(x+h+3)(x+3)}\\ &=\frac{3}{(x+h+3)(x+3)}\qquad (h\ne 0)\\ f'(x)&=\lim_{h\to 0}\frac{3}{(x+h+3)(x+3)}=\frac{3}{(x+3)^2} \end{aligned}

Check (with the Quotient Rule, available later): (1)(x+3)x(1)(x+3)2=3(x+3)2\dfrac{(1)(x+3)-x(1)}{(x+3)^2}=\dfrac{3}{(x+3)^2}. Agrees.

(b) Domains. domf={x:x3}=(,3)(3,)\text{dom}\,f=\{x:x\ne-3\}=(-\infty,-3)\cup(-3,\infty), and domf\text{dom}\,f' is the same set. (Here the two domains coincide; that is not automatic — for x\sqrt x they differ.)

(c) Tangent line at x=1x=-1.

f(1)=11+3=12,f(1)=3(1+3)2=34f(-1)=\frac{-1}{-1+3}=\frac{-1}{2},\qquad f'(-1)=\frac{3}{(-1+3)^2}=\frac{3}{4}

y=12+34(x(1))=12+34x+34=34x+14y=-\frac12+\frac34\left(x-(-1)\right)=-\frac12+\frac34 x+\frac34=\frac34 x+\frac14

Check: at x=1x=-1 the line gives 34+14=12-\frac34+\frac14=-\frac12. Correct.

No horizontal tangent exists because a horizontal tangent needs f(x)=0f'(x)=0, but f(x)=3(x+3)2f'(x)=\dfrac{3}{(x+3)^2} has numerator 303\ne0, so f(x)>0f'(x)>0 for every xx in the domain. (Consequently ff is increasing on (,3)(-\infty,-3) and on (3,)(-3,\infty) separately — not on their union, since the two branches are separated by the vertical asymptote x=3x=-3.)

Answers: (a) f(x)=3(x+3)2f'(x)=\dfrac{3}{(x+3)^2}. (b) both domains are x3x\ne-3. (c) y=34x+14y=\frac34x+\frac14; ff' is never zero, so there is no horizontal tangent.

Let f(x)=xf(x)=\sqrt{x}.

(a) Use the form f(a)=limxaf(x)f(a)xaf'(a)=\displaystyle\lim_{x\to a}\frac{f(x)-f(a)}{x-a} to compute f(9)f'(9).

(b) Find the tangent line at (9,3)(9,3) and its xx-intercept.

(c) The number 00 lies in the domain of ff. Explain carefully why f(0)f'(0) nevertheless does not exist, and describe the geometry.

Show hint

For (a) treat x9x-9 as a difference of squares in terms of x\sqrt{x}; for (c) write down the only one-sided difference quotient that even makes sense at 00.

Show answer

(a) Derivative at 99. Since x9=(x3)(x+3)x-9=\left(\sqrt x-3\right)\left(\sqrt x+3\right) for x0x\ge0,

f(9)=limx9x3x9=limx9x3(x3)(x+3)=limx91x+3(cancel x30 for x9)=13+3=16\begin{aligned} f'(9)&=\lim_{x\to 9}\frac{\sqrt{x}-3}{x-9}\\ &=\lim_{x\to 9}\frac{\sqrt{x}-3}{\left(\sqrt x-3\right)\left(\sqrt x+3\right)}\\ &=\lim_{x\to 9}\frac{1}{\sqrt x+3}\qquad\left(\text{cancel }\sqrt x-3\ne0\ \text{for}\ x\ne 9\right)\\ &=\frac{1}{3+3}=\frac16 \end{aligned}

(b) Tangent line and intercept.

y=3+16(x9)=x6+32y=3+\frac16(x-9)=\frac{x}{6}+\frac{3}{2}

Set y=0y=0:

0=x6+32  x6=32  x=90=\frac{x}{6}+\frac32\ \Rightarrow\ \frac{x}{6}=-\frac32\ \Rightarrow\ x=-9

So the xx-intercept is (9,0)(-9,0).

Check: at x=9x=9 the line gives 96+32=1.5+1.5=3\frac96+\frac32=1.5+1.5=3. Correct.

(c) Why f(0)f'(0) fails to exist. ff is only defined for x0x\ge 0, so at a=0a=0 the two-sided limit in the definition cannot even be formed; the best we can ask for is the right-hand derivative:

f+(0)=limh0+f(0+h)f(0)h=limh0+h0h=limh0+1h=+f'_+(0)=\lim_{h\to 0^+}\frac{f(0+h)-f(0)}{h}=\lim_{h\to 0^+}\frac{\sqrt h-0}{h}=\lim_{h\to 0^+}\frac{1}{\sqrt h}=+\infty

The quotient grows without bound, so the limit does not exist as a (finite) real number, and by definition ff is not differentiable at 00. Geometrically the secant lines from (0,0)(0,0) to (h,h)\left(h,\sqrt h\right) get steeper and steeper as h0+h\to0^+: they rotate towards the vertical, so the graph has a one-sided vertical tangent x=0x=0 at the origin. (It is only one-sided: 00 is the left endpoint of domf\text{dom}\,f, so unlike the two-sided vertical tangent of x1/3x^{1/3} there is no left-hand quotient to check.) This also explains the domain discrepancy: domf=[0,)\text{dom}\,f=[0,\infty) but domf=(0,)\text{dom}\,f'=(0,\infty), with f(x)=12xf'(x)=\dfrac{1}{2\sqrt x} there.

Answers: (a) f(9)=16f'(9)=\frac16. (b) y=x6+32y=\frac{x}{6}+\frac32, xx-intercept (9,0)(-9,0). (c) The right-hand difference quotient 1/h+1/\sqrt h\to+\infty, so no finite derivative exists; the graph has a one-sided vertical tangent x=0x=0 at the origin.

Let f(x)=x2f(x)=|x-2|.

(a) Show that ff is continuous at x=2x=2.

(b) Compute f(2)f'_-(2) and f+(2)f'_+(2) from the definition and conclude that f(2)f'(2) does not exist.

(c) What does this example prove about the statement "differentiable \Rightarrow continuous"?

(d) Write ff' as a piecewise function and give its domain.

Show hint

Split the absolute value according to the sign of hh in (2+h)2|(2+h)-2|, and handle h>0h>0 and h<0h<0 as two separate limits.

Show answer

(a) Continuity at 22. For any xx, x2=x20\left|\,|x-2|\,\right|=|x-2|\to 0 as x2x\to 2, so

limx2f(x)=limx2x2=0=22=f(2)\lim_{x\to 2}f(x)=\lim_{x\to 2}|x-2|=0=|2-2|=f(2)

All three requirements of continuity hold (f(2)f(2) defined, the limit exists, they are equal), so ff is continuous at 22.

(b) One-sided derivatives. With a=2a=2,

f(2+h)f(2)h=(2+h)20h=hh\frac{f(2+h)-f(2)}{h}=\frac{|(2+h)-2|-0}{h}=\frac{|h|}{h}

If h>0h>0 then h=h|h|=h, so the quotient equals 11:

f+(2)=limh0+hh=limh0+1=1f'_+(2)=\lim_{h\to 0^+}\frac{|h|}{h}=\lim_{h\to 0^+}1=1

If h<0h<0 then h=h|h|=-h, so the quotient equals 1-1:

f(2)=limh0hh=limh0(1)=1f'_-(2)=\lim_{h\to 0^-}\frac{|h|}{h}=\lim_{h\to 0^-}(-1)=-1

Both one-sided derivatives exist and are finite, but 111\ne-1, so the two-sided limit

limh0f(2+h)f(2)h\lim_{h\to 0}\frac{f(2+h)-f(2)}{h}

does not exist. Hence f(2)f'(2) does not exist: the graph has a corner at (2,0)(2,0).

(c) Consequence. ff is continuous at 22 but not differentiable at 22, so the converse of the theorem "differentiable at aa \Rightarrow continuous at aa" is false. Continuity is a necessary but not a sufficient condition for differentiability.

(d) The derivative function. For x>2x>2 we have f(x)=x2f(x)=x-2, a line of slope 11; for x<2x<2 we have f(x)=2xf(x)=2-x, a line of slope 1-1. (Each of these can be confirmed from the definition exactly as in part (b), since near such an xx the absolute value is given by a single linear formula.) Thus

f(x)={1,x<21,x>2f'(x)=\begin{cases}-1,& x<2\\ 1,& x>2\end{cases}

with domf=(,2)(2,)\text{dom}\,f'=(-\infty,2)\cup(2,\infty). Note ff' itself has a jump discontinuity at x=2x=2, and domf\text{dom}\,f' is strictly smaller than domf=(,)\text{dom}\,f=(-\infty,\infty).

Answers: (a) continuous, both sides give 00; (b) f+(2)=1f'_+(2)=1, f(2)=1f'_-(2)=-1, so f(2)f'(2) does not exist; (c) the converse of the theorem is false; (d) f(x)=1f'(x)=-1 for x<2x<2, f(x)=1f'(x)=1 for x>2x>2, domain x2x\ne2.

Find the values of the constants aa and bb that make f(x)={x2,x1ax+b,x>1f(x)=\begin{cases}x^2,& x\le 1\\ ax+b,& x>1\end{cases} differentiable at x=1x=1. Justify your answer by computing the one-sided derivatives from the definition (do not simply "match the derivative formulas"), and explain why continuity is not optional.

Show hint

Differentiability at a point forces continuity there, so get one equation from continuity first; then the right-hand difference quotient will simplify only because of that equation.

Show answer

Step 1 — continuity is forced. If ff is differentiable at 11 then ff is continuous at 11. Now f(1)=12=1f(1)=1^2=1 and

limx1f(x)=limx1x2=1,limx1+f(x)=limx1+(ax+b)=a+b\lim_{x\to 1^-}f(x)=\lim_{x\to1^-}x^2=1,\qquad \lim_{x\to 1^+}f(x)=\lim_{x\to1^+}(ax+b)=a+b

so continuity requires

a+b=1(i)a+b=1\qquad\text{(i)}

Step 2 — left-hand derivative. For h<0h<0, 1+h<11+h<1, so f(1+h)=(1+h)2f(1+h)=(1+h)^2:

f(1)=limh0(1+h)21h=limh01+2h+h21h=limh0h(2+h)h=limh0(2+h)=2\begin{aligned} f'_-(1)&=\lim_{h\to 0^-}\frac{(1+h)^2-1}{h}\\ &=\lim_{h\to 0^-}\frac{1+2h+h^2-1}{h}\\ &=\lim_{h\to 0^-}\frac{h(2+h)}{h}=\lim_{h\to 0^-}(2+h)=2 \end{aligned}

Step 3 — right-hand derivative. For h>0h>0, 1+h>11+h>1, so f(1+h)=a(1+h)+bf(1+h)=a(1+h)+b:

f(1+h)f(1)h=a(1+h)+b1h=(a+b1)+ahh\frac{f(1+h)-f(1)}{h}=\frac{a(1+h)+b-1}{h}=\frac{(a+b-1)+ah}{h}

This is where (i) does its work. If a+b10a+b-1\ne0, the numerator tends to the nonzero number a+b1a+b-1 while the denominator tends to 0+0^+, so the quotient blows up to ±\pm\infty and no right-hand derivative exists (consistent with ff being discontinuous there). Using (i), a+b1=0a+b-1=0, so

f+(1)=limh0+ahh=limh0+a=af'_+(1)=\lim_{h\to 0^+}\frac{ah}{h}=\lim_{h\to 0^+}a=a

Step 4 — match. Differentiability at 11 requires f(1)=f+(1)f'_-(1)=f'_+(1):

2=a2=a

and then (i) gives b=1a=1b=1-a=-1.

Verification. With a=2, b=1a=2,\ b=-1:

f(x)={x2,x12x1,x>1f(x)=\begin{cases}x^2,& x\le1\\ 2x-1,& x>1\end{cases}

Continuity: limx1+(2x1)=1=f(1)\lim_{x\to1^+}(2x-1)=1=f(1). Derivatives: f(1)=2f'_-(1)=2 and f+(1)=2f'_+(1)=2, so f(1)=2f'(1)=2. Notice the geometric meaning: y=2x1y=2x-1 is exactly the tangent line to y=x2y=x^2 at (1,1)(1,1), so the parabola is continued by its own tangent line — the only linear continuation that produces no corner.

Answer: a=2a=2 and b=1b=-1.

Classify the failure of differentiability at x=0x=0 for each function, by computing the relevant one-sided difference-quotient limits. Say in each case whether the graph has a corner, a cusp, a vertical tangent, or a discontinuity.

(a) f(x)=x2/3f(x)=x^{2/3}

(b) g(x)=x1/3g(x)=x^{1/3}

(c) k(x)={x,x<0x+2,x0k(x)=\begin{cases}x,& x<0\\ x+2,& x\ge 0\end{cases}

Show hint

In (a) and (b) put hh into the difference quotient and simplify the exponent; remember that odd roots of negative numbers are negative.

Show answer

(a) f(x)=x2/3f(x)=x^{2/3}, f(0)=0f(0)=0.

f(0+h)f(0)h=h2/3h=h2/31=h1/3=1h1/3\frac{f(0+h)-f(0)}{h}=\frac{h^{2/3}}{h}=h^{2/3-1}=h^{-1/3}=\frac{1}{h^{1/3}}

As h0+h\to 0^+: h1/30+h^{1/3}\to 0^+, so 1h1/3+\dfrac{1}{h^{1/3}}\to+\infty. As h0h\to 0^-: h1/30h^{1/3}\to 0^- (the cube root of a negative number is negative), so 1h1/3\dfrac{1}{h^{1/3}}\to-\infty.

Both one-sided limits are infinite and of opposite sign. The derivative does not exist, and the graph has a cusp at the origin: the curve comes into (0,0)(0,0) with infinitely steep slope on both sides, but the two branches point in opposite directions (like the sharp tip of the graph of y=x2/3y=x^{2/3}).

(b) g(x)=x1/3g(x)=x^{1/3}, g(0)=0g(0)=0.

g(0+h)g(0)h=h1/3h=h1/31=h2/3=1(h1/3)2\frac{g(0+h)-g(0)}{h}=\frac{h^{1/3}}{h}=h^{1/3-1}=h^{-2/3}=\frac{1}{\left(h^{1/3}\right)^{2}}

The denominator is a square, hence positive for every h0h\ne 0, and it tends to 00. So

limh0+h2/3=+andlimh0h2/3=+\lim_{h\to 0^+}h^{-2/3}=+\infty\quad\text{and}\quad\lim_{h\to 0^-}h^{-2/3}=+\infty

Both sides tend to ++\infty, so g(0)g'(0) does not exist, but the secant lines rotate to a single limiting position: the graph has a vertical tangent line x=0x=0 at the origin. (Unlike (a), the curve passes smoothly through, merely infinitely steeply.)

(c) kk. First check continuity: k(0)=0+2=2k(0)=0+2=2, while

limx0k(x)=limx0x=02\lim_{x\to 0^-}k(x)=\lim_{x\to0^-}x=0\ne 2

so kk has a jump discontinuity at 00. By the contrapositive of "differentiable \Rightarrow continuous", kk is not differentiable at 00. Directly from the definition, for h>0h>0,

k(h)k(0)h=(h+2)2h=1  1\frac{k(h)-k(0)}{h}=\frac{(h+2)-2}{h}=1\ \to\ 1

but for h<0h<0,

k(h)k(0)h=h2h=12h  +(h0, since 2/h>0 and +)\frac{k(h)-k(0)}{h}=\frac{h-2}{h}=1-\frac{2}{h}\ \to\ +\infty\quad (h\to 0^-,\ \text{since }-2/h>0\text{ and }\to+\infty)

so the two-sided limit certainly fails to exist.

Answers: (a) cusp (quotient +\to+\infty on the right, -\infty on the left); (b) vertical tangent x=0x=0 (quotient +\to+\infty on both sides); (c) jump discontinuity, hence not differentiable. In none of the three cases is there a corner — a corner requires finite but unequal one-sided derivatives, as for x|x|.

Let f(x)=1xf(x)=\dfrac1x, x0x\ne0.

(a) Compute f(x)f'(x) from the definition.

(b) Compute f(x)f''(x) by applying the definition of the derivative to ff' (not by any rule).

(c) Compute f(x)f'''(x) the same way and conjecture a formula for f(n)(x)f^{(n)}(x). Check your formula for n=1,2,3n=1,2,3.

Show hint

At every stage you are differentiating a rational function, so put the two fractions in the numerator over a common denominator before dividing by hh.

Show answer

(a) First derivative.

f(x+h)f(x)h=1h(1x+h1x)=1hx(x+h)x(x+h)=1hhx(x+h)=1x(x+h)(h0)f(x)=limh01x(x+h)=1x2\begin{aligned} \frac{f(x+h)-f(x)}{h}&=\frac{1}{h}\left(\frac{1}{x+h}-\frac1x\right)\\ &=\frac{1}{h}\cdot\frac{x-(x+h)}{x(x+h)}\\ &=\frac{1}{h}\cdot\frac{-h}{x(x+h)}=\frac{-1}{x(x+h)}\qquad(h\ne0)\\ f'(x)&=\lim_{h\to 0}\frac{-1}{x(x+h)}=-\frac{1}{x^2} \end{aligned}

(b) Second derivative. Now differentiate f(x)=x2f'(x)=-x^{-2} from the definition:

f(x+h)f(x)h=1h(1(x+h)2+1x2)=1hx2+(x+h)2x2(x+h)2=1h2xh+h2x2(x+h)2=2x+hx2(x+h)2(h0)f(x)=limh02x+hx2(x+h)2=2xx2x2=2x3\begin{aligned} \frac{f'(x+h)-f'(x)}{h}&=\frac{1}{h}\left(\frac{-1}{(x+h)^2}+\frac{1}{x^2}\right)\\ &=\frac{1}{h}\cdot\frac{-x^2+(x+h)^2}{x^2(x+h)^2}\\ &=\frac{1}{h}\cdot\frac{2xh+h^2}{x^2(x+h)^2}\\ &=\frac{2x+h}{x^2(x+h)^2}\qquad(h\ne0)\\ f''(x)&=\lim_{h\to 0}\frac{2x+h}{x^2(x+h)^2}=\frac{2x}{x^2\cdot x^2}=\frac{2}{x^3} \end{aligned}

(c) Third derivative. Differentiate f(x)=2x3f''(x)=2x^{-3} from the definition:

f(x+h)f(x)h=2h(1(x+h)31x3)=2hx3(x+h)3x3(x+h)3=2h(3x2h+3xh2+h3)x3(x+h)3=2(3x2+3xh+h2)x3(x+h)3(h0)f(x)=limh02(3x2+3xh+h2)x3(x+h)3=23x2x3x3=6x4\begin{aligned} \frac{f''(x+h)-f''(x)}{h}&=\frac{2}{h}\left(\frac{1}{(x+h)^3}-\frac{1}{x^3}\right)\\ &=\frac{2}{h}\cdot\frac{x^3-(x+h)^3}{x^3(x+h)^3}\\ &=\frac{2}{h}\cdot\frac{-\left(3x^2h+3xh^2+h^3\right)}{x^3(x+h)^3}\\ &=\frac{-2\left(3x^2+3xh+h^2\right)}{x^3(x+h)^3}\qquad(h\ne0)\\ f'''(x)&=\lim_{h\to 0}\frac{-2\left(3x^2+3xh+h^2\right)}{x^3(x+h)^3}=\frac{-2\cdot 3x^2}{x^3\cdot x^3}=-\frac{6}{x^4} \end{aligned}

Conjecture. The pattern of the numerators is 1,2,6,=n!1,2,6,\dots=n! and the signs alternate starting with -, while the power in the denominator is n+1n+1:

f(n)(x)=(1)nn!xn+1,x0, n1f^{(n)}(x)=\frac{(-1)^n\,n!}{x^{\,n+1}},\qquad x\ne0,\ n\ge 1

Check: n=1n=1: (1)11!x2=1x2\dfrac{(-1)^1\cdot 1!}{x^2}=-\dfrac{1}{x^2} — matches (a). n=2n=2: (1)22!x3=2x3\dfrac{(-1)^2\cdot 2!}{x^3}=\dfrac{2}{x^3} — matches (b). n=3n=3: (1)33!x4=6x4\dfrac{(-1)^3\cdot 3!}{x^4}=-\dfrac{6}{x^4} — matches (c).

Every one of these functions has domain x0x\ne 0.

Answers: (a) f(x)=1x2f'(x)=-\dfrac{1}{x^2}; (b) f(x)=2x3f''(x)=\dfrac{2}{x^3}; (c) f(x)=6x4f'''(x)=-\dfrac{6}{x^4} and f(n)(x)=(1)nn!xn+1f^{(n)}(x)=\dfrac{(-1)^n n!}{x^{n+1}}.

Define

g(x)={xsin(1x),x00,x=0f(x)={x2sin(1x),x00,x=0g(x)=\begin{cases}x\sin\left(\frac1x\right),& x\ne0\\ 0,& x=0\end{cases} \qquad f(x)=\begin{cases}x^2\sin\left(\frac1x\right),& x\ne0\\ 0,& x=0\end{cases}

(a) Show that both gg and ff are continuous at 00.

(b) Show that gg is not differentiable at 00.

(c) Show that ff is differentiable at 00 and find f(0)f'(0).

(d) What moral does the pair (g,f)(g,f) illustrate?

Show hint

You never need the value of sin(1/x)\sin(1/x) — only the bound 1sin(θ)1-1\le \sin(\theta)\le 1 — so reach for the Squeeze Theorem.

Show answer

Throughout we use only the bound 1sinθ1-1\le\sin\theta\le 1, valid for every real θ\theta, together with the Squeeze Theorem. Note sin(1/x)\sin(1/x) has no limit as x0x\to 0, so no limit law may be applied to it directly.

(a) Continuity at 00. For x0x\ne 0,

xxsin(1x)x-|x|\le x\sin\left(\frac1x\right)\le |x|

Since limx0(x)=0=limx0x\lim_{x\to0}(-|x|)=0=\lim_{x\to0}|x|, the Squeeze Theorem gives limx0g(x)=0=g(0)\lim_{x\to0}g(x)=0=g(0), so gg is continuous at 00. The identical argument with x2x2sin(1/x)x2-x^2\le x^2\sin(1/x)\le x^2 gives limx0f(x)=0=f(0)\lim_{x\to0}f(x)=0=f(0), so ff is continuous at 00.

(b) gg is not differentiable at 00. By the definition,

g(0+h)g(0)h=hsin(1h)0h=sin(1h)(h0)\frac{g(0+h)-g(0)}{h}=\frac{h\sin\left(\frac1h\right)-0}{h}=\sin\left(\frac1h\right)\qquad(h\ne0)

So the question is whether limh0sin(1/h)\lim_{h\to0}\sin(1/h) exists — and it does not. Take two sequences tending to 00:

hn=12πn  sin(1hn)=sin(2πn)=0h_n=\frac{1}{2\pi n}\ \Rightarrow\ \sin\left(\frac{1}{h_n}\right)=\sin(2\pi n)=0 kn=1π2+2πn  sin(1kn)=sin(π2+2πn)=1k_n=\frac{1}{\frac{\pi}{2}+2\pi n}\ \Rightarrow\ \sin\left(\frac{1}{k_n}\right)=\sin\left(\frac{\pi}{2}+2\pi n\right)=1

Both hn0h_n\to 0 and kn0k_n\to 0, yet the difference quotient tends to 00 along one sequence and to 11 along the other. A limit, if it existed, would have to be unique, so no limit exists. Hence g(0)g'(0) does not exist. This is not a corner, cusp or vertical tangent: the quotient stays bounded between 1-1 and 11 but oscillates infinitely often.

(c) ff is differentiable at 00.

f(0+h)f(0)h=h2sin(1h)0h=hsin(1h)(h0)\frac{f(0+h)-f(0)}{h}=\frac{h^2\sin\left(\frac1h\right)-0}{h}=h\sin\left(\frac1h\right)\qquad(h\ne0)

Now the extra factor of hh saves us:

hhsin(1h)h-|h|\le h\sin\left(\frac1h\right)\le|h|

and limh0(h)=limh0h=0\lim_{h\to0}\left(-|h|\right)=\lim_{h\to0}|h|=0, so by the Squeeze Theorem

f(0)=limh0hsin(1h)=0f'(0)=\lim_{h\to0}h\sin\left(\frac1h\right)=0

The derivative exists and equals 00: the tangent line at the origin is the horizontal line y=0y=0, even though the graph crosses it infinitely often in every interval around 00.

(d) Moral. Continuity at a point tells you nothing about differentiability there (gg is continuous but not differentiable), and failure of differentiability need not look like the standard pictures — there is no corner, cusp, vertical tangent or jump in gg at 00, only infinitely fast oscillation. Conversely, differentiability is a genuinely stronger, more delicate condition than continuity: multiplying by one extra factor of xx is enough to turn the same oscillation from fatal into harmless.

Answers: (a) both continuous at 00 by squeezing; (b) g(0)g'(0) does not exist because sin(1/h)\sin(1/h) has no limit; (c) f(0)=0f'(0)=0 by the Squeeze Theorem; (d) continuity does not imply differentiability, and non-differentiability is not always a corner or cusp.

A particle moves along a straight line with position s(t)=t36t2+9t metres,t0 secondss(t)=t^3-6t^2+9t\ \text{metres},\qquad t\ge 0\ \text{seconds}

(a) Find the velocity v(t)=s(t)v(t)=s'(t) directly from the limit definition.

(b) At what times is the particle at rest?

(c) Find the acceleration a(t)=v(t)a(t)=v'(t) directly from the limit definition.

(d) Give v(2)v(2), a(2)a(2), v(4)v(4), a(4)a(4) with units, and say at each of t=2t=2 and t=4t=4 whether the particle is speeding up or slowing down.

Show hint

Expand (t+h)3(t+h)^3 and (t+h)2(t+h)^2 in full; for (d) remember that speed increases exactly when velocity and acceleration have the same sign.

Show answer

(a) Velocity from the definition. Expand:

s(t+h)=(t+h)36(t+h)2+9(t+h)=(t3+3t2h+3th2+h3)6(t2+2th+h2)+9t+9h=t3+3t2h+3th2+h36t212th6h2+9t+9h\begin{aligned} s(t+h)&=(t+h)^3-6(t+h)^2+9(t+h)\\ &=\left(t^3+3t^2h+3th^2+h^3\right)-6\left(t^2+2th+h^2\right)+9t+9h\\ &=t^3+3t^2h+3th^2+h^3-6t^2-12th-6h^2+9t+9h \end{aligned}

Subtract s(t)=t36t2+9ts(t)=t^3-6t^2+9t:

s(t+h)s(t)=3t2h+3th2+h312th6h2+9h=h(3t2+3th+h212t6h+9)s(t+h)-s(t)=3t^2h+3th^2+h^3-12th-6h^2+9h=h\left(3t^2+3th+h^2-12t-6h+9\right)

Divide by h0h\ne0 and take the limit:

v(t)=s(t)=limh0(3t2+3th+h212t6h+9)=3t212t+9\begin{aligned} v(t)=s'(t)&=\lim_{h\to0}\left(3t^2+3th+h^2-12t-6h+9\right)\\ &=3t^2-12t+9 \end{aligned}

Numerical check: s(2)=824+18=2s(2)=8-24+18=2 and s(2.001)=1.997000001s(2.001)=1.997000001 exactly, so 1.99700000120.001=2.999999\frac{1.997000001-2}{0.001}=-2.999999, which agrees with v(2)=1224+9=3v(2)=12-24+9=-3 to five decimal places.

(b) At rest. Solve v(t)=0v(t)=0:

3t212t+9=3(t24t+3)=3(t1)(t3)=0  t=1 s, t=3 s3t^2-12t+9=3\left(t^2-4t+3\right)=3(t-1)(t-3)=0\ \Rightarrow\ t=1\ \text{s},\ t=3\ \text{s}

(c) Acceleration from the definition. With v(t)=3t212t+9v(t)=3t^2-12t+9,

v(t+h)v(t)=[3(t+h)212(t+h)+9][3t212t+9]=3t2+6th+3h212t12h+93t2+12t9=6th+3h212h=h(6t+3h12)a(t)=v(t)=limh0(6t+3h12)=6t12\begin{aligned} v(t+h)-v(t)&=\left[3(t+h)^2-12(t+h)+9\right]-\left[3t^2-12t+9\right]\\ &=3t^2+6th+3h^2-12t-12h+9-3t^2+12t-9\\ &=6th+3h^2-12h=h(6t+3h-12)\\ a(t)=v'(t)&=\lim_{h\to 0}(6t+3h-12)=6t-12 \end{aligned}

So a(t)=s(t)=6t12a(t)=s''(t)=6t-12.

(d) Values and interpretation.

v(2)=3(4)12(2)+9=1224+9=3 m/s,a(2)=6(2)12=0 m/s2v(2)=3(4)-12(2)+9=12-24+9=-3\ \text{m/s},\qquad a(2)=6(2)-12=0\ \text{m/s}^2 v(4)=3(16)12(4)+9=4848+9=9 m/s,a(4)=6(4)12=12 m/s2v(4)=3(16)-12(4)+9=48-48+9=9\ \text{m/s},\qquad a(4)=6(4)-12=12\ \text{m/s}^2

At t=2t=2 s the particle is moving in the negative direction at 33 m/s, and the acceleration is exactly 00. Since a(t)=6t12a(t)=6t-12 is negative for t<2t<2 and positive for t>2t>2, the velocity is at its minimum (3-3 m/s) at t=2t=2, so the speed v|v| is at a local maximum: the particle is neither speeding up nor slowing down at that instant — it is the changeover moment between the two.

At t=4t=4 s, v(4)=9>0v(4)=9>0 and a(4)=12>0a(4)=12>0 have the same sign, so the speed is increasing: the particle is speeding up.

Answers: (a) v(t)=3t212t+9v(t)=3t^2-12t+9 m/s; (b) t=1t=1 s and t=3t=3 s; (c) a(t)=6t12a(t)=6t-12 m/s2^2; (d) v(2)=3v(2)=-3 m/s, a(2)=0a(2)=0 m/s2^2 (instantaneously neither speeding up nor slowing down — maximum speed in the negative direction); v(4)=9v(4)=9 m/s, a(4)=12a(4)=12 m/s2^2 (same sign, so speeding up).