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 be defined on an open interval containing , and let be small enough that is also in that interval. The average rate of change of from to is the difference quotient
Geometrically it is the slope of the secant line through and . Writing gives the equivalent form , the slope of the secant through and .
The two equivalent definitions
Definition. is differentiable at if the following limit exists and is a finite number, and then that number is the derivative of at :
The substitution (so exactly when ) shows the two limits are the same limit written twice. Two hypotheses are hiding in the definition: must be defined on an open interval around (so that both and are allowed), and the limit must be two-sided. The one-sided derivatives
are defined by these one-sided limits whenever those limits exist — either or both may fail to exist (for with , neither one-sided derivative exists at ; the value at must be assigned before the quotient even makes sense) — and 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 the second point slides along the graph towards and the secant lines rotate towards a limiting position: the tangent line. Its slope is , so
The normal line at the same point is , valid when ; if the tangent is horizontal and the normal line is the vertical line . Suppose instead the difference quotient becomes infinite. If is continuous at and the two-sided quotient tends to , or tends to — the same sign from both sides — then the secants rotate towards a vertical line and the graph has a vertical tangent ; even then does not exist, because a derivative must be a finite number. Both hypotheses are needed: if the quotient tends to on one side and on the other, the point is a cusp, not a vertical tangent (this is at ); and without continuity there is no tangent at all (for with the quotient is from both sides, yet the graph merely jumps).
Instantaneous rate of change and units
If , then is the instantaneous rate of change of with respect to at . Its units are always (units of ) per (unit of ). The sign tells direction (: increasing at ; : decreasing), the size tells steepness, and for small ,
| Situation | Function and variables | Derivative means | Units of the derivative |
|---|---|---|---|
| particle on a line | in m, in s | velocity | m/s |
| same particle | in m/s | acceleration | m/s |
| production | in dollars, items | marginal cost | dollars per item |
| draining tank | in litres, in min | flow rate | litres per minute |
| cooling coffee | in C, in min | cooling rate | C per minute |
| population | individuals, years | growth rate | individuals per year |
Worked example 1 — a polynomial, from the definition
Find for and the tangent line at .
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 $h$ **before** taking the limit is the whole game: only after cancelling is the expression continuous in $h$ at $h=0$. At $x=2$: $f(2)=12-10+1=3$ and $f'(2)=7$, so the tangent is $y=3+7(x-2)$, i.e. $y=7x-11$. ### Worked example 2 — a square root, from the definition Find $f'(x)$ for $f(x)=\sqrt{2x+1}$ (domain $x\ge-\frac12$). $$\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: $f$ is defined at $x=-\frac12$ but $f'$ is not. At $x=4$, $f(4)=3$ and $f'(4)=\frac13$, so the tangent is $y=3+\frac13(x-4)$. ### Worked example 3 — a rational function, using the $x\to a$ form For $f(x)=\dfrac1x$ and $a\ne 0$: $$\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 $a$ vary produces a new function $f'$ whose domain is $\{x\in\text{dom}\,f:\ f'(x)\text{ exists}\}$, a subset of $\text{dom}\, f$ that may be strictly smaller (Worked example 2). | Notation | Name | Comment | |---|---|---| | $f'(x)$, $y'$ | Lagrange (prime) | value at a point: $f'(a)$ | | $\dfrac{dy}{dx}$, $\dfrac{df}{dx}$ | Leibniz | one symbol, not a fraction of two numbers | | $\dfrac{d}{dx}\left[f(x)\right]$ | operator form | $\dfrac{d}{dx}$ acts on what follows | | $D_xf$ | Euler | common in DE courses | | $\dot y$ | Newton | used only for derivatives in time | To evaluate Leibniz notation at a point write $\left.\dfrac{dy}{dx}\right|_{x=a}$. Higher derivatives: $f''$, $f'''$, then $f^{(4)},\dots,f^{(n)}$, or $\dfrac{d^2y}{dx^2},\ \dfrac{d^ny}{dx^n}$. ### Differentiability implies continuity **Theorem.** If $f$ is differentiable at $a$, then $f$ is continuous at $a$. *Proof.* For $x\ne a$ write $f(x)-f(a)=\dfrac{f(x)-f(a)}{x-a}\cdot(x-a)$. By the Product Law for limits, $\lim_{x\to a}\left(f(x)-f(a)\right)=f'(a)\cdot 0=0$, so $\lim_{x\to a}f(x)=f(a)$. ∎ **The converse is false.** $f(x)=|x|$ is continuous at $0$, yet $f'_+(0)=\lim_{h\to 0^+}\frac{|h|}{h}=1$ while $f'_-(0)=\lim_{h\to 0^-}\frac{|h|}{h}=-1$, so $f'(0)$ does not exist. The useful working form is the **contrapositive**: if $f$ is *not continuous* at $a$, then $f$ is *not differentiable* at $a$. ### How differentiability fails | Failure type | Example (at $a=0$) | Behaviour of the difference quotient | |---|---|---| | corner | $f(x)=\lvert x\rvert$ | one-sided limits $-1$ and $1$: finite but unequal | | cusp | $f(x)=x^{2/3}$ | $h^{-1/3}\to+\infty$ from the right, $\to-\infty$ from the left | | vertical tangent | $f(x)=x^{1/3}$ | $h^{-2/3}\to+\infty$ from both sides; tangent is $x=0$ | | discontinuity (jump/removable) | any $f$ with a jump at $0$ | quotient unbounded; excluded by the theorem above | | infinite oscillation | $f(x)=x\sin(1/x)$, $f(0)=0$ | quotient $=\sin(1/h)$, no limit at all | ### Higher derivatives $f''=(f')'$, $f'''=(f'')'$, and in general $f^{(n)}=\left(f^{(n-1)}\right)'$, each defined only where the previous derivative is itself differentiable. Interpretation: $f''$ is the rate of change of the rate of change — acceleration for position, concavity for a graph. Example: $f(x)=x^3-2x$ gives $f'=3x^2-2$, $f''=6x$, $f'''=6$, $f^{(4)}=0$. Differentiability does not cascade: $f(x)=x|x|$ has $f'(x)=2|x|$ everywhere (including $f'(0)=0$), but $f''(0)$ does not exist. ### Common mistakes - **Plugging in $h=0$ too early.** Wrong: $\lim_{h\to0}\frac{f(x+h)-f(x)}{h}=\frac{0}{0}$. Right: simplify the quotient algebraically until the $h$ in the denominator cancels, *then* let $h\to0$. - **Mis-substituting.** Wrong: $f(x+h)=f(x)+h$. Right: replace *every* $x$, e.g. for $f(x)=x^2-4x$, $f(x+h)=(x+h)^2-4(x+h)=x^2+2xh+h^2-4x-4h$. - **Splitting roots.** Wrong: $\sqrt{x+h}=\sqrt x+\sqrt h$. Right: multiply by the conjugate $\dfrac{\sqrt{x+h}+\sqrt x}{\sqrt{x+h}+\sqrt x}$. - **Dropping the limit symbol.** Every line before the final one must still say $\lim_{h\to0}$; an equation between an expression in $h$ and a number is false. - **Reversing the theorem.** Wrong: "$f$ is continuous at $a$, so $f'(a)$ exists." Right: differentiability $\Rightarrow$ continuity only; $|x|$ at $0$ kills the converse. - **Tangent line slips.** Wrong: $y=f'(a)(x-a)$ (missing $f(a)$), or leaving the slope as the *function* $f'(x)$. The slope must be the *number* $f'(a)$. - **Confusing average with instantaneous.** $\frac{f(b)-f(a)}{b-a}$ is a secant slope over an interval; $f'(a)$ is a tangent slope at a point. - **Ignoring the domain of $f'$.** For $f(x)=\sqrt x$, $\text{dom}\,f=[0,\infty)$ but $\text{dom}\,f'=(0,\infty)$: the right-hand quotient at $0$ is $\frac{\sqrt h}{h}=\frac{1}{\sqrt h}\to+\infty$. - **Differentiating a constant by accident.** $\frac{d}{dx}\left[f(a)\right]=0$ because $f(a)$ is a number; what you mean is $\left.\frac{d}{dx}f(x)\right|_{x=a}$. - **Notation for second derivatives.** $\dfrac{d^2y}{dx^2}$ is *not* $\left(\dfrac{dy}{dx}\right)^2$, and $f''(x)$ is not $\left(f'(x)\right)^2$. - **Dropping units.** If $V$ is in litres and $t$ in minutes, $V'(10)=-3.5$ means $-3.5$ **litres per minute**, not $-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 for Then find an equation of the tangent line to at .
Show hint
Write out in full, expand, and look for the factor of that must cancel before you let .
Show answer
Step 1 — build .
Step 2 — subtract and factor.
Step 3 — divide (legal, since in the limit) and take the limit.
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)=-6x$, valid for all real $x$. **Step 4 — tangent line at $x=2$.** $$f(2)=4-3(4)=-8,\qquad f'(2)=-6(2)=-12$$ $$y=f(2)+f'(2)(x-2)=-8-12(x-2)=-12x+16$$ **Answer:** $f'(x)=-6x$ and the tangent line is $y=-12x+16$. *Check:* at $x=2$ the line gives $-24+16=-8=f(2)$, so the line does pass through the point of tangency.Each of the following limits is secretly a derivative . In each case identify a function and a number , then evaluate the limit.
(a)
(b)
(c)
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 ?
Show answer
(a) The pattern is with and (indeed ). Evaluate directly by expanding:
\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)=108$. **(b)** The pattern is $\lim_{x\to a}\frac{f(x)-f(a)}{x-a}$ with $f(x)=x^3$ and $a=2$ (indeed $f(2)=8$). Factor the difference of cubes: $$\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)=12$. **(c)** The pattern is $\lim_{h\to0}\frac{f(a+h)-f(a)}{h}$ with $f(x)=\sqrt{x}$ and $a=9$ (indeed $f(9)=3$). Rationalise: $$\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)=\dfrac16$. **Answers:** (a) $f(x)=x^4$, $a=3$, limit $=108$; (b) $f(x)=x^3$, $a=2$, limit $=12$; (c) $f(x)=\sqrt x$, $a=9$, limit $=\frac16$.
A tank is being drained. Let be the volume of water in the tank, in litres, minutes after draining begins. Suppose and .
(a) State the units of and explain in one sentence what means physically.
(b) Estimate and .
(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. is measured in litres and in minutes, so
litres per minute means that at the instant minutes the water is leaving the tank (the sign is negative, so is decreasing) at an instantaneous rate of litres per minute.
(b) Linear estimates. The tangent line at is
For (so ):
For (so ):
(c) The estimate for is more trustworthy. The approximation replaces the graph of by its tangent line at , which is only close to the graph for small . Over minutes the drainage rate has little time to change; over minutes it may change substantially (a draining tank typically empties more slowly as the water level drops, i.e. increases towards ), so the tangent-line value drifts away from the true value.
Answers: (a) litres per minute; the volume is decreasing at L/min at . (b) L, L. (c) The estimate, because the linear approximation is only reliable for small changes in .
A cup of coffee cools in a room. Its temperature (in C) is recorded at time (in minutes):
| (min) | 0 | 2 | 4 | 6 | 8 |
|---|---|---|---|---|---|
| (C) | 92 | 80 | 71 | 64 | 59 |
(a) Compute the average rate of change of over .
(b) Estimate using a backward difference, a forward difference, and the symmetric (centred) difference.
(c) What do the estimates suggest about the sign of , 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 .
Show answer
(a) Average rate of change on .
(b) Three estimates of . Each is a difference quotient centred on, or ending at, .
Backward difference (uses and ):
Forward difference (uses and ):
Symmetric difference (uses and ):
Note the symmetric estimate is exactly the average of the other two, , and it is normally the most accurate because the two one-sided errors partly cancel. So C per minute: at minutes the coffee is cooling at about degrees Celsius per minute.
(c) Sign of . Successive secant slopes over are
These are increasing (). Five data points cannot prove anything about — infinitely many functions pass through the same five points — but a steadily increasing run of secant slopes is exactly what an increasing looks like, so the data indicate that is increasing and hence that on . (Strictly, increasing forces only wherever exists; the strict inequality is the natural reading here.) Physically: the coffee is still cooling () but the cooling is slowing down as the coffee approaches room temperature; the graph of is concave up.
Answers: (a) C/min. (b) , and C/min respectively; best estimate C/min. (c) the data indicate (graph concave up): the rate of cooling is becoming less negative, so cooling slows over time.
Let .
(a) Use the limit definition to find .
(b) State the domain of and the domain of .
(c) Find the tangent line to at , and explain why 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 will appear on top and cancel.
Show answer
(a) Derivative from the definition.
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: $$\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 $$\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):* $\dfrac{(1)(x+3)-x(1)}{(x+3)^2}=\dfrac{3}{(x+3)^2}$. Agrees. **(b) Domains.** $\text{dom}\,f=\{x:x\ne-3\}=(-\infty,-3)\cup(-3,\infty)$, and $\text{dom}\,f'$ is the same set. (Here the two domains coincide; that is not automatic — for $\sqrt x$ they differ.) **(c) Tangent line at $x=-1$.** $$f(-1)=\frac{-1}{-1+3}=\frac{-1}{2},\qquad f'(-1)=\frac{3}{(-1+3)^2}=\frac{3}{4}$$ $$y=-\frac12+\frac34\left(x-(-1)\right)=-\frac12+\frac34 x+\frac34=\frac34 x+\frac14$$ *Check:* at $x=-1$ the line gives $-\frac34+\frac14=-\frac12$. Correct. No horizontal tangent exists because a horizontal tangent needs $f'(x)=0$, but $f'(x)=\dfrac{3}{(x+3)^2}$ has numerator $3\ne0$, so $f'(x)>0$ for every $x$ in the domain. (Consequently $f$ is increasing on $(-\infty,-3)$ and on $(-3,\infty)$ separately — not on their union, since the two branches are separated by the vertical asymptote $x=-3$.) **Answers:** (a) $f'(x)=\dfrac{3}{(x+3)^2}$. (b) both domains are $x\ne-3$. (c) $y=\frac34x+\frac14$; $f'$ is never zero, so there is no horizontal tangent.Let .
(a) Use the form to compute .
(b) Find the tangent line at and its -intercept.
(c) The number lies in the domain of . Explain carefully why nevertheless does not exist, and describe the geometry.
Show hint
For (a) treat as a difference of squares in terms of ; for (c) write down the only one-sided difference quotient that even makes sense at .
Show answer
(a) Derivative at . Since for ,
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+\frac16(x-9)=\frac{x}{6}+\frac{3}{2}$$ Set $y=0$: $$0=\frac{x}{6}+\frac32\ \Rightarrow\ \frac{x}{6}=-\frac32\ \Rightarrow\ x=-9$$ So the $x$-intercept is $(-9,0)$. *Check:* at $x=9$ the line gives $\frac96+\frac32=1.5+1.5=3$. Correct. **(c) Why $f'(0)$ fails to exist.** $f$ is only defined for $x\ge 0$, so at $a=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)=\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 $f$ is not differentiable at $0$. Geometrically the secant lines from $(0,0)$ to $\left(h,\sqrt h\right)$ get steeper and steeper as $h\to0^+$: they rotate towards the vertical, so the graph has a **one-sided vertical tangent $x=0$** at the origin. (It is only one-sided: $0$ is the left endpoint of $\text{dom}\,f$, so unlike the two-sided vertical tangent of $x^{1/3}$ there is no left-hand quotient to check.) This also explains the domain discrepancy: $\text{dom}\,f=[0,\infty)$ but $\text{dom}\,f'=(0,\infty)$, with $f'(x)=\dfrac{1}{2\sqrt x}$ there. **Answers:** (a) $f'(9)=\frac16$. (b) $y=\frac{x}{6}+\frac32$, $x$-intercept $(-9,0)$. (c) The right-hand difference quotient $1/\sqrt h\to+\infty$, so no finite derivative exists; the graph has a one-sided vertical tangent $x=0$ at the origin.Let .
(a) Show that is continuous at .
(b) Compute and from the definition and conclude that does not exist.
(c) What does this example prove about the statement "differentiable continuous"?
(d) Write as a piecewise function and give its domain.
Show hint
Split the absolute value according to the sign of in , and handle and as two separate limits.
Show answer
(a) Continuity at . For any , as , so
All three requirements of continuity hold ( defined, the limit exists, they are equal), so is continuous at .
(b) One-sided derivatives. With ,
If then , so the quotient equals :
If then , so the quotient equals :
Both one-sided derivatives exist and are finite, but , so the two-sided limit
does not exist. Hence does not exist: the graph has a corner at .
(c) Consequence. is continuous at but not differentiable at , so the converse of the theorem "differentiable at continuous at " is false. Continuity is a necessary but not a sufficient condition for differentiability.
(d) The derivative function. For we have , a line of slope ; for we have , a line of slope . (Each of these can be confirmed from the definition exactly as in part (b), since near such an the absolute value is given by a single linear formula.) Thus
with . Note itself has a jump discontinuity at , and is strictly smaller than .
Answers: (a) continuous, both sides give ; (b) , , so does not exist; (c) the converse of the theorem is false; (d) for , for , domain .
Find the values of the constants and that make differentiable at . 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 is differentiable at then is continuous at . Now and
so continuity requires
Step 2 — left-hand derivative. For , , so :
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>0$, $1+h>1$, so $f(1+h)=a(1+h)+b$: $$\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+b-1\ne0$, the numerator tends to the nonzero number $a+b-1$ while the denominator tends to $0^+$, so the quotient blows up to $\pm\infty$ and no right-hand derivative exists (consistent with $f$ being discontinuous there). Using (i), $a+b-1=0$, so $$f'_+(1)=\lim_{h\to 0^+}\frac{ah}{h}=\lim_{h\to 0^+}a=a$$ **Step 4 — match.** Differentiability at $1$ requires $f'_-(1)=f'_+(1)$: $$2=a$$ and then (i) gives $b=1-a=-1$. **Verification.** With $a=2,\ b=-1$: $$f(x)=\begin{cases}x^2,& x\le1\\ 2x-1,& x>1\end{cases}$$ Continuity: $\lim_{x\to1^+}(2x-1)=1=f(1)$. Derivatives: $f'_-(1)=2$ and $f'_+(1)=2$, so $f'(1)=2$. Notice the geometric meaning: $y=2x-1$ is exactly the tangent line to $y=x^2$ at $(1,1)$, so the parabola is continued by its own tangent line — the only linear continuation that produces no corner. **Answer:** $a=2$ and $b=-1$.Classify the failure of differentiability at 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)
(b)
(c)
Show hint
In (a) and (b) put into the difference quotient and simplify the exponent; remember that odd roots of negative numbers are negative.
Show answer
(a) , .
As : , so . As : (the cube root of a negative number is negative), so .
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 with infinitely steep slope on both sides, but the two branches point in opposite directions (like the sharp tip of the graph of ).
(b) , .
The denominator is a square, hence positive for every , and it tends to . So
Both sides tend to , so does not exist, but the secant lines rotate to a single limiting position: the graph has a vertical tangent line at the origin. (Unlike (a), the curve passes smoothly through, merely infinitely steeply.)
(c) . First check continuity: , while
so has a jump discontinuity at . By the contrapositive of "differentiable continuous", is not differentiable at . Directly from the definition, for ,
but for ,
so the two-sided limit certainly fails to exist.
Answers: (a) cusp (quotient on the right, on the left); (b) vertical tangent (quotient 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 .
Let , .
(a) Compute from the definition.
(b) Compute by applying the definition of the derivative to (not by any rule).
(c) Compute the same way and conjecture a formula for . Check your formula for .
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 .
Show answer
(a) First derivative.
\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)=-x^{-2}$ from the definition: $$\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)=2x^{-3}$ from the definition: $$\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,\dots=n!$ and the signs alternate starting with $-$, while the power in the denominator is $n+1$: $$f^{(n)}(x)=\frac{(-1)^n\,n!}{x^{\,n+1}},\qquad x\ne0,\ n\ge 1$$ *Check:* $n=1$: $\dfrac{(-1)^1\cdot 1!}{x^2}=-\dfrac{1}{x^2}$ — matches (a). $n=2$: $\dfrac{(-1)^2\cdot 2!}{x^3}=\dfrac{2}{x^3}$ — matches (b). $n=3$: $\dfrac{(-1)^3\cdot 3!}{x^4}=-\dfrac{6}{x^4}$ — matches (c). Every one of these functions has domain $x\ne 0$. **Answers:** (a) $f'(x)=-\dfrac{1}{x^2}$; (b) $f''(x)=\dfrac{2}{x^3}$; (c) $f'''(x)=-\dfrac{6}{x^4}$ and $f^{(n)}(x)=\dfrac{(-1)^n n!}{x^{n+1}}$.Define
\qquad f(x)=\begin{cases}x^2\sin\left(\frac1x\right),& x\ne0\\ 0,& x=0\end{cases}$$ (a) Show that both $g$ and $f$ are continuous at $0$. (b) Show that $g$ is **not** differentiable at $0$. (c) Show that $f$ **is** differentiable at $0$ and find $f'(0)$. (d) What moral does the pair $(g,f)$ illustrate?Show hint
You never need the value of — only the bound — so reach for the Squeeze Theorem.
Show answer
Throughout we use only the bound , valid for every real , together with the Squeeze Theorem. Note has no limit as , so no limit law may be applied to it directly.
(a) Continuity at . For ,
Since , the Squeeze Theorem gives , so is continuous at . The identical argument with gives , so is continuous at .
(b) is not differentiable at . By the definition,
So the question is whether exists — and it does not. Take two sequences tending to :
Both and , yet the difference quotient tends to along one sequence and to along the other. A limit, if it existed, would have to be unique, so no limit exists. Hence does not exist. This is not a corner, cusp or vertical tangent: the quotient stays bounded between and but oscillates infinitely often.
(c) is differentiable at .
Now the extra factor of saves us:
and , so by the Squeeze Theorem
The derivative exists and equals : the tangent line at the origin is the horizontal line , even though the graph crosses it infinitely often in every interval around .
(d) Moral. Continuity at a point tells you nothing about differentiability there ( 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 at , only infinitely fast oscillation. Conversely, differentiability is a genuinely stronger, more delicate condition than continuity: multiplying by one extra factor of is enough to turn the same oscillation from fatal into harmless.
Answers: (a) both continuous at by squeezing; (b) does not exist because has no limit; (c) 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
(a) Find the velocity directly from the limit definition.
(b) At what times is the particle at rest?
(c) Find the acceleration directly from the limit definition.
(d) Give , , , with units, and say at each of and whether the particle is speeding up or slowing down.
Show hint
Expand and 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)^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)=t^3-6t^2+9t$: $$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 $h\ne0$ and take the limit: $$\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)=8-24+18=2$ and $s(2.001)=1.997000001$ exactly, so $\frac{1.997000001-2}{0.001}=-2.999999$, which agrees with $v(2)=12-24+9=-3$ to five decimal places. **(b) At rest.** Solve $v(t)=0$: $$3t^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)=3t^2-12t+9$, $$\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)=6t-12$. **(d) Values and interpretation.** $$v(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=48-48+9=9\ \text{m/s},\qquad a(4)=6(4)-12=12\ \text{m/s}^2$$ At $t=2$ s the particle is moving in the negative direction at $3$ m/s, and the acceleration is exactly $0$. Since $a(t)=6t-12$ is negative for $t<2$ and positive for $t>2$, the velocity is at its minimum ($-3$ m/s) at $t=2$, so the **speed** $|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=4$ s, $v(4)=9>0$ and $a(4)=12>0$ have the **same sign**, so the speed is increasing: the particle is **speeding up**. **Answers:** (a) $v(t)=3t^2-12t+9$ m/s; (b) $t=1$ s and $t=3$ s; (c) $a(t)=6t-12$ m/s$^2$; (d) $v(2)=-3$ m/s, $a(2)=0$ m/s$^2$ (instantaneously neither speeding up nor slowing down — maximum speed in the negative direction); $v(4)=9$ m/s, $a(4)=12$ m/s$^2$ (same sign, so speeding up).