Limits and Continuity
Limits are the foundation of calculus: they let us talk precisely about what happens to a function near a point, and they lead directly to derivatives and integrals.
The Concept of Limit
We write $\displaystyle\lim_{x\to a} f(x)=L$ when the values $f(x)$ can be made as close to $L$ as we like by taking $x$ close enough to $a$ (but $x\neq a$). The value of $f$ at $a$ does not matter, and $f(a)$ need not even exist.
Worked examples
- The function is not defined at $x=1$ (we get $\tfrac00$), so we look at nearby values.
x 0.9 0.99 0.999 1.001 1.01 1.1 f(x) 1.9 1.99 1.999 2.001 2.01 2.1 - The table suggests the limit is $2$. To confirm, factor: $$\dfrac{x^2-1}{x-1}=\dfrac{(x-1)(x+1)}{x-1}=x+1$$ for $x\neq1$.
- Since $x\neq 1$ in a limit, the cancellation is allowed: $$\lim_{x\to1}(x+1)=2$$
- For $x\gt 0$, $|x|=x$, so $f(x)=1$. Hence $$\lim_{x\to0^+}f(x)=1$$
- For $x\lt 0$, $|x|=-x$, so $f(x)=-1$. Hence $$\lim_{x\to0^-}f(x)=-1$$
- The one-sided limits differ, so the two-sided limit does not exist.
- Let $\varepsilon\gt0$. We need $|(2x-1)-5|\lt\varepsilon$, i.e. $$|2x-6|=2|x-3|\lt\varepsilon$$
- This holds whenever $|x-3|\lt \varepsilon/2$. So choose $\delta=\varepsilon/2$.
- Check: if $0\lt|x-3|\lt\delta$ then $$|(2x-1)-5|=2|x-3|\lt2\delta=\varepsilon$$ ∎
What a limit really says. Think of a game between two players. Player A names a tolerance $\varepsilon$ ("I want $f(x)$ within $0.001$ of $L$"). Player B must answer with a window $\delta$ around $a$ that guarantees it. The limit equals $L$ exactly when B can always win, however small $\varepsilon$ is.
Three facts follow from this picture:
- The value $f(a)$ is never used: the condition $0\lt|x-a|$ excludes $x=a$.
- A limit, if it exists, is unique: $f(x)$ cannot be close to two different numbers at once.
- A smaller $\varepsilon$ usually forces a smaller $\delta$. The proof must show how to choose $\delta$ in terms of $\varepsilon$.
From the left we use the formula valid for $x\lt1$:
$$\lim_{x\to1^-}f(x)=\lim_{x\to1^-}x^2=1^2=1$$From the right we use the formula valid for $x\gt1$:
$$\lim_{x\to1^+}f(x)=\lim_{x\to1^+}(2-x)=2-1=1$$The one-sided limits agree, so the two-sided limit exists:
$$\lim_{x\to1}f(x)=1$$The value at the point is given separately: $f(1)=3\neq1$. The limit ignores this value.
We must make $|x^2-4|$ small. Factor it, separating the "good" factor $|x-2|$ from the rest:
$$|x^2-4|=|x-2|\,|x+2|$$The factor $|x+2|$ is not constant, so we bound it. First agree to take $\delta\le1$. Then $|x-2|\lt1$ gives $1\lt x\lt3$, and so:
$$|x+2|\lt 5$$Combining the two estimates:
$$|x^2-4|=|x-2|\,|x+2|\lt 5\,|x-2|$$This is less than $\varepsilon$ as soon as $|x-2|\lt\varepsilon/5$. Both requirements hold if we take the smaller of the two numbers:
$$\delta=\min\left\{1,\ \frac{\varepsilon}{5}\right\}$$Check: if $0\lt|x-2|\lt\delta$ then $|x+2|\lt5$ and $|x-2|\lt\varepsilon/5$, so
$$|x^2-4|\lt 5\cdot\frac{\varepsilon}{5}=\varepsilon .\qquad\blacksquare$$
Exercises
- Estimate $\displaystyle\lim_{x\to0}\frac{e^x-1}{x}$ using a table of values.
Answer
$1$ - Find $\displaystyle\lim_{x\to2^-}\lfloor x\rfloor$ and $\displaystyle\lim_{x\to2^+}\lfloor x\rfloor$. Does $\displaystyle\lim_{x\to2}\lfloor x\rfloor$ exist?
Answer
$1$ and $2$; the limit does not exist. - Sketch a function with $f(1)=3$, $\displaystyle\lim_{x\to1^-}f(x)=2$, $\displaystyle\lim_{x\to1^+}f(x)=4$.
Answer
Any graph with a jump at $x=1$: left piece approaching height 2, right piece approaching height 4, a solid dot at $(1,3)$. - Prove using ε–δ: $\displaystyle\lim_{x\to-1}(4x+3)=-1$.
Answer
$|4x+3+1|=4|x+1|\lt\varepsilon$ when $\delta=\varepsilon/4$.
Computation of Limits
Rather than guessing from tables, we compute limits with algebraic rules. If $\displaystyle\lim_{x\to a}f(x)=L$ and $\displaystyle\lim_{x\to a}g(x)=M$, then:
| Rule | Statement |
|---|---|
| Sum / difference | $\lim (f\pm g)=L\pm M$ |
| Constant multiple | $\lim (c f)=cL$ |
| Product | $\lim (fg)=LM$ |
| Quotient | $\lim \dfrac fg=\dfrac LM$ if $M\neq0$ |
| Power / root | $\lim f^n=L^n,\ \lim\sqrt[n]{f}=\sqrt[n]{L}$ |
| Polynomials & rational functions | $\lim_{x\to a}p(x)=p(a)$ (direct substitution, denominator $\neq 0$) |
Worked examples
- Direct substitution gives $\tfrac00$. Multiply by the conjugate $\sqrt{x+9}+3$.
- $$\dfrac{\sqrt{x+9}-3}{x}\cdot\dfrac{\sqrt{x+9}+3}{\sqrt{x+9}+3}=\dfrac{(x+9)-9}{x(\sqrt{x+9}+3)}=\dfrac{1}{\sqrt{x+9}+3}$$
- Now substitute: $$\dfrac{1}{\sqrt{9}+3}=\dfrac16$$
- Since $-1\le\cos(1/x)\le1$, multiplying by $x^2\ge0$ gives $$-x^2\le x^2\cos(1/x)\le x^2$$
- Both $-x^2\to0$ and $x^2\to0$ as $x\to0$.
- By the Squeeze Theorem the limit is $0$.
- Rewrite: $$\dfrac{\sin5x}{3x}=\dfrac53\cdot\dfrac{\sin5x}{5x}$$
- Let $u=5x\to0$: $\dfrac{\sin u}{u}\to1$.
Why does "cancel and substitute" work? If $f(x)=g(x)$ for every $x\neq a$ near $a$, then $f$ and $g$ have the same limit at $a$, because a limit never looks at $x=a$. Cancelling $(x-a)$ replaces $f$ by a simpler $g$ that agrees with it everywhere except at $a$. If $g$ is continuous, its limit is just $g(a)$.
Reading the form $\tfrac00$. "$\tfrac00$" is not a number. It is a signal that the numerator and denominator share a factor that vanishes at $a$, and that more work is needed. In contrast, $\tfrac{c}{0}$ with $c\neq0$ signals an infinite limit or a vertical asymptote.
Combine the two fractions in the numerator over the common denominator $x^2(x+h)^2$:
$$\frac{1}{(x+h)^2}-\frac1{x^2}=\frac{x^2-(x+h)^2}{x^2(x+h)^2}=\frac{-2xh-h^2}{x^2(x+h)^2}$$Divide by $h$ (that is, cancel the common factor $h\neq0$):
$$\frac{-2xh-h^2}{h\,x^2(x+h)^2}=\frac{-2x-h}{x^2(x+h)^2}$$Now substitution is allowed, since the denominator $\to x^4\neq0$:
$$\lim_{h\to0}\frac{-2x-h}{x^2(x+h)^2}=\frac{-2x}{x^4}=-\frac{2}{x^3}$$
Substitution gives $\tfrac00$. Put $t=\sqrt[3]x$, so $x=t^3$, and $x\to8$ means $t\to2$:
$$\frac{\sqrt[3]{x}-2}{x-8}=\frac{t-2}{t^3-8}$$Factor the difference of cubes, $t^3-8=(t-2)(t^2+2t+4)$:
$$\frac{t-2}{(t-2)(t^2+2t+4)}=\frac{1}{t^2+2t+4}\qquad(t\neq2)$$Substitute $t=2$:
$$\lim_{t\to2}\frac1{t^2+2t+4}=\frac1{4+4+4}=\frac1{12}$$
For any real $y$: $y-1\lt\lfloor y\rfloor\le y$. Take $y=1/x$:
$$\frac1x-1\lt\left\lfloor\frac1x\right\rfloor\le\frac1x$$Multiply through by $x\gt0$ (the inequalities keep their direction):
$$1-x\lt x\left\lfloor\frac1x\right\rfloor\le1$$Both bounds tend to $1$ as $x\to0^+$. By the Squeeze Theorem:
$$\lim_{x\to0^+}x\left\lfloor\frac1x\right\rfloor=1$$
Exercises
- $\displaystyle\lim_{x\to-2}\frac{x^2+5x+6}{x+2}$
Answer
$1$ - $\displaystyle\lim_{h\to0}\frac{(2+h)^3-8}{h}$
Answer
$12$ - $\displaystyle\lim_{x\to4}\frac{\sqrt x-2}{x-4}$
Answer
$\frac14$ - $\displaystyle\lim_{x\to0}\frac{1-\cos x}{x^2}$
Answer
$\frac12$ (multiply by $1+\cos x$) - $\displaystyle\lim_{x\to0}\frac{\frac{1}{3+x}-\frac13}{x}$
Answer
$-\frac19$
Continuity and Its Consequences
Types of discontinuity: removable (a hole), jump (one-sided limits differ), infinite (vertical asymptote), and oscillating.
- Polynomials, rational functions (on their domain), roots, $\sin$, $\cos$, $e^x$, $\ln x$ are continuous on their domains.
- Sums, products, quotients (denominator $\neq0$) and compositions of continuous functions are continuous.
Worked examples
- Each piece is a polynomial, so the only possible problem is at $x=2$.
- Left limit: $$\lim_{x\to2^-}kx=2k$$ Right limit and value: $$\lim_{x\to2^+}(x^2-1)=3=f(2)$$
- Continuity requires $2k=3$.
- $f(x)=x^3+x-1$ is a polynomial, hence continuous on $[0,1]$.
- $f(0)=-1\lt0$ and $f(1)=1\gt0$.
- $0$ lies between $f(0)$ and $f(1)$, so by the IVT some $c\in(0,1)$ has $f(c)=0$. (Numerically $c\approx0.682$.)
Continuity = "limits commute with $f$". If $f$ is continuous at $L$ and $\lim_{x\to a}g(x)=L$, then $$\lim_{x\to a}f\big(g(x)\big)=f\Big(\lim_{x\to a}g(x)\Big).$$ This is why we may "pull limits inside" continuous functions, for example $\lim e^{g(x)}=e^{\lim g(x)}$.
Why the IVT needs continuity. The function $f(x)=\begin{cases}-1&x\lt0\\1&x\ge0\end{cases}$ changes sign on $[-1,1]$ but never equals $0$. A single jump is enough to break the theorem.
The bisection method turns the IVT into an algorithm. Halve the interval, keep the half where the sign changes, and repeat. Each step halves the error, so 10 steps gain about 3 decimal digits.
Start: $f(0)=-1\lt0$, $f(1)=1\gt0$. Midpoint $0.5$:
$$f(0.5)=0.125+0.5-1=-0.375\lt0\ \Rightarrow\ \text{root in }(0.5,\,1)$$Midpoint $0.75$:
$$f(0.75)=0.421875+0.75-1=0.171875\gt0\ \Rightarrow\ \text{root in }(0.5,\,0.75)$$Midpoint $0.625$:
$$f(0.625)\approx0.244+0.625-1=-0.131\lt0\ \Rightarrow\ \text{root in }(0.625,\,0.75)$$The interval now has length $0.125$, so the root is $\approx0.6875\pm0.0625$. (True value $0.6823\ldots$)
We need $\lim_{x\to0}f(x)=1$. Since the denominator $\to0$, the numerator must also $\to0$ (otherwise the limit is infinite):
$$\sqrt{a}-b=0\quad\Longrightarrow\quad b=\sqrt a$$With $b=\sqrt a$, rationalise the numerator:
$$\frac{\sqrt{x+a}-\sqrt a}{x}=\frac{(x+a)-a}{x(\sqrt{x+a}+\sqrt a)}=\frac{1}{\sqrt{x+a}+\sqrt a}$$Take the limit and set it equal to $f(0)=1$:
$$\frac{1}{2\sqrt a}=1\quad\Longrightarrow\quad\sqrt a=\frac12$$
Exercises
- Where is $f(x)=\dfrac{x+1}{x^2-5x+6}$ continuous?
Answer
All $x$ except $2$ and $3$. - Find $a,b$ such that $f(x)=\begin{cases}x+1 & x\lt1\\ ax+b & 1\le x\lt 3\\ 3x & x\ge3\end{cases}$ is continuous.
Answer
$a+b=2,\ 3a+b=9\Rightarrow a=\frac72,\ b=-\frac32$. - Use the IVT to show $\cos x=x$ has a solution in $(0,\pi/2)$.
Answer
$g(x)=\cos x-x$: $g(0)=1\gt0$, $g(\pi/2)=-\pi/2\lt0$. - Classify the discontinuity of $f(x)=\dfrac{1}{(x-1)^2}$ at $x=1$.
Answer
Infinite discontinuity.
Limits Involving Infinity
There are two kinds: infinite limits ($f(x)\to\pm\infty$ as $x\to a$), which give vertical asymptotes, and limits at infinity ($x\to\pm\infty$), which give horizontal asymptotes.
- $\deg p\lt\deg q$: limit $0$.
- $\deg p=\deg q$: limit $=$ ratio of leading coefficients.
- $\deg p\gt\deg q$: limit is $\pm\infty$ (no horizontal asymptote).
Worked examples
- Divide by $x^2$: $$\dfrac{2+3/x+1/x^2}{1-4/x^2}\to\dfrac{2+0+0}{1-0}=2$$ Horizontal asymptote $y=2$.
- Denominator is zero at $x=\pm2$; numerator $2x^2+3x+1=(2x+1)(x+1)$ is not zero there.
- Near $x=2^+$: numerator $\to15$, denominator $\to0^+$, so $f\to+\infty$. Similarly at $x=-2$. Vertical asymptotes $x=\pm2$.
- For $x\lt0$, $\sqrt{x^2}=|x|=-x$. So $$\sqrt{4x^2+1}=-x\sqrt{4+1/x^2}$$
- $$\dfrac{-x\sqrt{4+1/x^2}}{x(1-3/x)}=\dfrac{-\sqrt{4+1/x^2}}{1-3/x}\to-\dfrac{2}{1}$$
Who wins at infinity? As $x\to\infty$ the standard functions grow at very different rates: $$\ln x\ \ll\ x^{p}\ (p\gt0)\ \ll\ a^x\ (a\gt1)\ \ll\ x!\ \ll\ x^x .$$ In a quotient, the faster-growing function decides the limit. Section 3.3 proves these comparisons with L’Hôpital’s rule.
Slant asymptotes. When $\deg p=\deg q+1$, long division gives $\frac{p}{q}=mx+b+\frac{r(x)}{q(x)}$ with $\frac{r}{q}\to0$. The line $y=mx+b$ is then a slant (oblique) asymptote.
Long division of $x^2+1$ by $x-1$:
$$\frac{x^2+1}{x-1}=x+1+\frac{2}{x-1}$$The remainder term vanishes at infinity, so the slant asymptote is the line that is left:
$$\frac{2}{x-1}\to0\ \text{ as } x\to\pm\infty\quad\Longrightarrow\quad y=x+1$$Vertical asymptote where the denominator is zero but the numerator is not ($2\neq0$):
$$x=1:\quad\lim_{x\to1^+}f=+\infty,\qquad\lim_{x\to1^-}f=-\infty$$
This is $\infty-\infty$. Multiply and divide by the conjugate:
$$\frac{(x^2+4x)-(x^2-2x)}{\sqrt{x^2+4x}+\sqrt{x^2-2x}}=\frac{6x}{\sqrt{x^2+4x}+\sqrt{x^2-2x}}$$Factor $x$ (positive, since $x\to+\infty$) out of each root, $\sqrt{x^2+4x}=x\sqrt{1+4/x}$:
$$\frac{6x}{x\left(\sqrt{1+\frac4x}+\sqrt{1-\frac2x}\right)}=\frac{6}{\sqrt{1+\frac4x}+\sqrt{1-\frac2x}}$$Let $x\to\infty$:
$$\frac{6}{1+1}=3$$
Exercises
- $\displaystyle\lim_{x\to\infty}\frac{3x+2}{x^2+1}$
Answer
$0$ - $\displaystyle\lim_{x\to\infty}\left(\sqrt{x^2+x}-x\right)$
Answer
$\frac12$ (conjugate) - Find all asymptotes of $f(x)=\dfrac{x^2}{x^2-1}$.
Answer
VA $x=\pm1$; HA $y=1$. - $\displaystyle\lim_{x\to\infty}e^{-x}\cos x$
Answer
$0$ (squeeze)
The Derivative
The derivative measures instantaneous rate of change: the slope of a tangent line, the velocity of a moving object, the sensitivity of an output to its input.
Tangent Lines and Velocity
The secant line through $P(a,f(a))$ and $Q(a+h,f(a+h))$ has slope $\dfrac{f(a+h)-f(a)}{h}$. As $Q$ slides towards $P$ ($h\to0$), the secant turns into the tangent line.
Worked examples
- $$m=\lim_{h\to0}\frac{(3+h)^2-9}{h}=\lim_{h\to0}\frac{6h+h^2}{h}$$
- $$=\lim_{h\to0}(6+h)=6$$
- Point–slope form: $y-9=6(x-3)$, i.e. $y=6x-9$.
- $$\dfrac{s(2+h)-s(2)}{h}=\dfrac{4.9(4+4h+h^2)-19.6}{h}=\dfrac{19.6h+4.9h^2}{h}=19.6+4.9h$$
- Let $h\to0$: $v(2)=19.6$.
One idea, many names. The same limit $\lim_{h\to0}\frac{f(a+h)-f(a)}{h}$ appears as:
| Context | $f$ is… | The limit is… |
|---|---|---|
| Geometry | a curve | slope of the tangent line |
| Physics | position $s(t)$ | velocity $v(t)$ |
| Biology | population $P(t)$ | growth rate |
| Economics | cost $C(q)$ | marginal cost |
The difference quotient is an average rate over an interval of length $h$. The limit turns it into an instantaneous rate.
Write the difference quotient at $a=1$:
$$m=\lim_{h\to0}\frac{\frac{2}{2+h}-1}{h}$$Simplify the numerator over the common denominator $2+h$:
$$\frac{2}{2+h}-1=\frac{2-(2+h)}{2+h}=\frac{-h}{2+h}$$Divide by $h$ and let $h\to0$:
$$m=\lim_{h\to0}\frac{-1}{2+h}=-\frac12$$Point–slope form through $(1,1)$:
$$y-1=-\tfrac12(x-1)\quad\Longleftrightarrow\quad y=-\tfrac12x+\tfrac32$$
The point $(1,-3)$ is not on the parabola. Call the unknown tangency point $(a,a^2)$. The slope there is $2a$ (from $\lim_{h\to0}\frac{(a+h)^2-a^2}{h}$), so the tangent line is
$$y=a^2+2a(x-a)=2ax-a^2$$This line must pass through $(1,-3)$:
$$-3=2a(1)-a^2\quad\Longleftrightarrow\quad a^2-2a-3=0\quad\Longleftrightarrow\quad(a-3)(a+1)=0$$Two tangency points, $a=3$ and $a=-1$, give two lines:
$$a=3:\ y=6x-9,\qquad a=-1:\ y=-2x-1$$
Exercises
- Find the tangent line to $y=\dfrac1x$ at $(1,1)$.
Answer
$y=-x+2$ - Find the slope of the tangent to $y=\sqrt x$ at $x=4$ using the limit definition.
Answer
$\frac14$ - $s(t)=t^3-2t$. Find the velocity at $t=1$.
Answer
$1$
The Derivative
A function fails to be differentiable at a corner, a cusp, a vertical tangent, or a discontinuity. Higher derivatives: $f''=(f')'$, $f'''$, $f^{(n)}$.
Worked examples
- $f(x+h)=x^2+2xh+h^2-3x-3h$.
- $f(x+h)-f(x)=2xh+h^2-3h$, so $$\dfrac{f(x+h)-f(x)}{h}=2x+h-3$$
- Let $h\to0$.
- $$\dfrac{\sqrt{x+h}-\sqrt x}{h}\cdot\dfrac{\sqrt{x+h}+\sqrt x}{\sqrt{x+h}+\sqrt x}=\dfrac{h}{h(\sqrt{x+h}+\sqrt x)}$$
- $$=\dfrac{1}{\sqrt{x+h}+\sqrt x}\to\dfrac{1}{2\sqrt x}$$ as $h\to0$.
The derivative is a function. At each $x$ it outputs the slope of $f$ there. Reading graphs:
- Where $f$ has a horizontal tangent, the graph of $f'$ crosses the $x$-axis.
- Where $f$ is steepest, $f'$ has an extreme value.
- A corner in $f$ produces a jump in $f'$.
Units. $f'(x)$ has units of $\frac{\text{units of }f}{\text{units of }x}$. If $T(t)$ is temperature (°C) at time $t$ (min), then $T'(t)$ is in °C/min.
First check continuity: both formulas give $1$ at $x=1$, so $f$ is continuous.
Left derivative, using $x^2$:
$$f'_-(1)=\lim_{h\to0^-}\frac{(1+h)^2-1}{h}=\lim_{h\to0^-}(2+h)=2$$Right derivative, using $2x-1$ (note $f(1)=1$):
$$f'_+(1)=\lim_{h\to0^+}\frac{2(1+h)-1-1}{h}=\lim_{h\to0^+}\frac{2h}{h}=2$$The one-sided derivatives agree, so $f'(1)$ exists. The pieces join smoothly, with no corner.
Continuity: cube roots are continuous, and $\lim_{x\to0}x^{1/3}=0=f(0)$.
Difference quotient at $0$:
$$\frac{f(0+h)-f(0)}{h}=\frac{h^{1/3}}{h}=\frac{1}{h^{2/3}}$$Since $h^{2/3}\gt0$ and $h^{2/3}\to0$, the quotient grows without bound:
$$\lim_{h\to0}\frac{1}{h^{2/3}}=+\infty$$The tangent line exists but is vertical, with infinite slope, so $f'(0)$ does not exist.
Exercises
- Use the definition to find $f'(x)$ for $f(x)=\dfrac1{x+1}$.
Answer
$-\dfrac1{(x+1)^2}$ - Use the definition to find $f'(x)$ for $f(x)=x^3$.
Answer
$3x^2$ - Sketch the graph of $f'$ given that $f$ increases on $(-\infty,1)$ and decreases on $(1,\infty)$.
Answer
$f'\gt0$ for $x\lt1$, $f'(1)=0$, $f'\lt0$ for $x\gt1$.
Computation of Derivatives: The Power Rule
| Rule | Formula |
|---|---|
| Constant | $\dfrac{d}{dx}c=0$ |
| Power rule ($n$ any real) | $\dfrac{d}{dx}x^n=n\,x^{n-1}$ |
| Constant multiple | $\dfrac{d}{dx}[c f]=c f'$ |
| Sum / difference | $\dfrac{d}{dx}[f\pm g]=f'\pm g'$ |
Worked examples
- Term by term: $20x^4-6x+7-0$.
- Rewrite: $$y=3x^{-2}+2x^{1/2}-x^{-1/3}$$
- Power rule: $$y'=-6x^{-3}+x^{-1/2}+\tfrac13x^{-4/3}$$
- $$y'=3x^2-12=0\iff x^2=4\iff x=\pm2$$
- $y(2)=-16,\ y(-2)=16$.
Why the power rule works (positive integers). Expand with the binomial theorem: $$(x+h)^n=x^n+nx^{n-1}h+\binom n2x^{n-2}h^2+\dots+h^n .$$ Subtract $x^n$ and divide by $h$: every term except $nx^{n-1}$ still contains a factor $h$ and vanishes as $h\to0$. For general real $n$, the proof uses logarithmic differentiation (Section 2.7).
Rewrite as a power and differentiate:
$$y=x^{3/2}\quad\Rightarrow\quad y'=\tfrac32x^{1/2}$$Slope of the tangent at $x=4$:
$$m_T=\tfrac32\cdot2=3$$The normal is perpendicular to the tangent, so $m_N=-1/m_T$:
$$m_N=-\frac13,\qquad y-8=-\frac13(x-4)$$
At the point of tangency $(a,f(a))$, the slopes must agree:
$$f'(a)=2a+3=4\quad\Rightarrow\quad a=\tfrac12$$The point lies on both the curve and the line:
$$f\!\left(\tfrac12\right)=\tfrac14+\tfrac32=\tfrac74=4\cdot\tfrac12+c$$Solve for $c$:
$$c=\tfrac74-2=-\tfrac14$$
Exercises
- $y=x^7-5x^3+\pi^2$
Answer
$7x^6-15x^2$ - $y=\dfrac{x^2+4x+3}{\sqrt x}$
Answer
$\tfrac32x^{1/2}+2x^{-1/2}-\tfrac32x^{-3/2}$ - Find the equation of the tangent to $y=x^4-2x$ at $x=1$.
Answer
$y=2x-3$ - Find $y''$ for $y=x^5-x^{-1}$.
Answer
$20x^3-2x^{-3}$
The Product and Quotient Rules
Why the product rule? Picture $f\cdot g$ as the area of a rectangle with sides $f$ and $g$. When the sides grow by $\Delta f$ and $\Delta g$, the area grows by $g\,\Delta f+f\,\Delta g+\Delta f\,\Delta g$. Divide by $\Delta x$ and let $\Delta x\to0$: the corner piece vanishes.
Worked examples
- $f=x^2+1,\ f'=2x$; $g=x^3-2x,\ g'=3x^2-2$.
- $$y'=2x(x^3-2x)+(x^2+1)(3x^2-2)$$
- $$=2x^4-4x^2+3x^4+x^2-2=5x^4-3x^2-2$$
- $f=x^2,\ f'=2x$; $g=x+1,\ g'=1$.
- $$y'=\dfrac{2x(x+1)-x^2\cdot1}{(x+1)^2}$$
- Simplify the numerator: $x^2+2x$.
Proof of the product rule. Add and subtract $f(x+h)g(x)$ in the numerator: $$\frac{f(x+h)g(x+h)-f(x)g(x)}{h}=f(x+h)\,\frac{g(x+h)-g(x)}{h}+g(x)\,\frac{f(x+h)-f(x)}{h}.$$ As $h\to0$: $f(x+h)\to f(x)$ (differentiable implies continuous), and the two quotients tend to $g'(x)$ and $f'(x)$.
Extended product rule. $(fgh)'=f'gh+fg'h+fgh'$: differentiate one factor at a time.
Label $f=x^2$, $g=x+1$, $h=x-3$, with $f'=2x$, $g'=1$, $h'=1$:
$$y'=f'gh+fg'h+fgh'$$Substitute:
$$y'=2x(x+1)(x-3)+x^2(x-3)+x^2(x+1)$$Expand and collect: $2x(x^2-2x-3)+x^3-3x^2+x^3+x^2$:
$$y'=4x^3-6x^2-6x$$
Quotient rule, with "low d-high minus high d-low":
$$y'=\frac{(1)(x^2+4)-x(2x)}{(x^2+4)^2}=\frac{4-x^2}{(x^2+4)^2}$$A fraction is zero exactly when its numerator is zero (the denominator is never $0$):
$$4-x^2=0\quad\Rightarrow\quad x=\pm2$$Compute the $y$-values:
$$y(2)=\frac{2}{8}=\frac14,\qquad y(-2)=-\frac14$$
Exercises
- $y=x^3\sqrt x\,(2x-1)$
Answer
$y=2x^{9/2}-x^{7/2}$, so $y'=9x^{7/2}-\tfrac72x^{5/2}$ - $y=\dfrac{3x-1}{2x+5}$
Answer
$\dfrac{17}{(2x+5)^2}$ - $y=\dfrac{x^2+1}{x^2-1}$
Answer
$\dfrac{-4x}{(x^2-1)^2}$ - Derive the rule $\left(\frac1g\right)'=-\frac{g'}{g^2}$ from the quotient rule.
Answer
$f=1,\ f'=0$: $\frac{0\cdot g-1\cdot g'}{g^2}$.
The Chain Rule
Rates multiply. If $u$ changes 3 times as fast as $x$, and $y$ changes 2 times as fast as $u$, then $y$ changes $2\cdot3=6$ times as fast as $x$.
Worked examples
- Outside $u^{10}$, inside $u=3x^2+1$ with $u'=6x$.
- $y'=10(3x^2+1)^9\cdot6x$.
- $y=(x^2+5x)^{1/2}$.
- $$y'=\tfrac12(x^2+5x)^{-1/2}(2x+5)$$
- Layers: $(\,\cdot\,)^3$, then $\sin(\,\cdot\,)$, then $4x$.
- $$y'=3\sin^2(4x)\cdot\cos(4x)\cdot4$$
Peeling an onion. For a nested function, work from the outside in. Write down each layer's derivative, evaluated at what is inside it, then multiply: $$\frac{d}{dx}f\big(g(h(x))\big)=f'\big(g(h(x))\big)\cdot g'\big(h(x)\big)\cdot h'(x).$$
Units check. If $y$ is in metres, $u$ in seconds and $x$ in kilograms, then $\frac{dy}{du}\cdot\frac{du}{dx}$ has units $\frac{\text{m}}{\text{s}}\cdot\frac{\text{s}}{\text{kg}}=\frac{\text{m}}{\text{kg}}$, exactly the units of $\frac{dy}{dx}$.
Quotient rule, with the chain rule for the numerator: $\frac{d}{dx}(2x+1)^3=3(2x+1)^2\cdot2$:
$$y'=\frac{6(2x+1)^2x^2-(2x+1)^3\cdot2x}{x^4}$$Factor out the common $2x(2x+1)^2$:
$$y'=\frac{2x(2x+1)^2\big[3x-(2x+1)\big]}{x^4}$$Simplify the bracket and cancel $x$:
$$y'=\frac{2(2x+1)^2(x-1)}{x^3}$$
Layers from outside to inside: $\sqrt{\ \cdot\ }$, then $1+(\cdot)^2$, then $\sin(\cdot)$, then $3x$.
Outer layer: $\frac{d}{du}\sqrt u=\frac{1}{2\sqrt u}$:
$$y'=\frac{1}{2\sqrt{1+\sin^2(3x)}}\cdot\frac{d}{dx}\big[\sin^2(3x)\big]$$Square layer, then sine layer, then the linear layer:
$$\frac{d}{dx}\sin^2(3x)=2\sin(3x)\cdot\cos(3x)\cdot3$$Multiply everything together and simplify:
$$y'=\frac{3\sin(3x)\cos(3x)}{\sqrt{1+\sin^2(3x)}}$$
Exercises
- $y=(x^3-4x)^{-2}$
Answer
$-2(x^3-4x)^{-3}(3x^2-4)$ - $y=\dfrac{1}{\sqrt{1-x^2}}$
Answer
$\dfrac{x}{(1-x^2)^{3/2}}$ - $y=\left(\dfrac{x-1}{x+1}\right)^3$
Answer
$3\left(\frac{x-1}{x+1}\right)^2\cdot\frac{2}{(x+1)^2}$ - If $h(x)=f(g(x))$, $g(1)=2$, $g'(1)=3$, $f'(2)=-4$, find $h'(1)$.
Answer
$-12$
Derivatives of Trigonometric Functions
| $f(x)$ | $f'(x)$ | $f(x)$ | $f'(x)$ |
|---|---|---|---|
| $\sin x$ | $\cos x$ | $\csc x$ | $-\csc x\cot x$ |
| $\cos x$ | $-\sin x$ | $\sec x$ | $\sec x\tan x$ |
| $\tan x$ | $\sec^2x$ | $\cot x$ | $-\csc^2x$ |
Worked examples
- Product rule: $y'=2x\sin x+x^2\cos x$.
- Chain rule: $y'=\sec^2(3x^2)\cdot6x$.
- $$\tan x=\dfrac{\sin x}{\cos x}$$ so $$(\tan x)'=\dfrac{\cos x\cos x-\sin x(-\sin x)}{\cos^2x}$$
- $$=\dfrac{\cos^2x+\sin^2x}{\cos^2x}=\dfrac{1}{\cos^2x}=\sec^2x$$
Why radians? The key limit $\lim_{x\to0}\frac{\sin x}{x}=1$ holds only in radians, because it comes from the arc length $x$ on the unit circle. In degrees, $\frac{d}{dx}\sin(x^\circ)=\frac{\pi}{180}\cos(x^\circ)$, an awkward extra factor.
Memory aid. Every co-function ($\cos,\cot,\csc$) has a minus sign in its derivative. The pairs $\tan\leftrightarrow\sec^2$ and $\cot\leftrightarrow-\csc^2$ mirror each other.
Velocity is the first derivative:
$$v(t)=s'(t)=-4\sin t$$Acceleration is the second derivative:
$$a(t)=v'(t)=-4\cos t=-s(t)$$Interpretation: the acceleration always points back towards the rest position $s=0$. Speed is greatest ($4$ cm/s) at $s=0$, and zero at the extremes $s=\pm4$.
Recognise the form $\displaystyle\lim_{x\to a}\frac{f(x)-f(a)}{x-a}=f'(a)$ with $f(x)=\cos x$ and $a=\frac\pi3$, since $\cos\frac\pi3=\frac12$.
So the limit is a derivative value:
$$f'\!\left(\tfrac\pi3\right)=-\sin\tfrac\pi3=-\frac{\sqrt3}{2}$$
Exercises
- $y=\sec x\tan x$
Answer
$\sec x\tan^2x+\sec^3x$ - $y=\dfrac{\sin x}{1+\cos x}$
Answer
$\dfrac{1}{1+\cos x}$ - $y=\sqrt{\sin x}$
Answer
$\dfrac{\cos x}{2\sqrt{\sin x}}$ - Find the tangent line to $y=\cos x$ at $x=\pi/3$.
Answer
$y-\tfrac12=-\tfrac{\sqrt3}{2}(x-\tfrac\pi3)$
Derivatives of Exponential and Logarithmic Functions
| $f(x)$ | $f'(x)$ | With chain rule |
|---|---|---|
| $e^x$ | $e^x$ | $\left(e^{u}\right)'=e^{u}u'$ |
| $a^x$ | $a^x\ln a$ | $\left(a^{u}\right)'=a^{u}\ln a\cdot u'$ |
| $\ln x$ | $\dfrac1x$ | $(\ln u)'=\dfrac{u'}{u}$ |
| $\log_a x$ | $\dfrac1{x\ln a}$ | $(\log_a u)'=\dfrac{u'}{u\ln a}$ |
| $\ln|x|$ | $\dfrac1x$ |
Worked examples
- Product rule: $$y'=(e^{x^2})'\ln x+e^{x^2}(\ln x)'$$
- $$=2xe^{x^2}\ln x+\dfrac{e^{x^2}}{x}$$
- $\ln y=x\ln x$.
- Differentiate: $$\dfrac{y'}{y}=\ln x+x\cdot\dfrac1x=\ln x+1$$
- $y'=y(\ln x+1)$.
The exponential is its own derivative. For $f(x)=e^x$: $$\frac{e^{x+h}-e^x}{h}=e^x\cdot\frac{e^h-1}{h}\ \xrightarrow{h\to0}\ e^x\cdot1 .$$ So the rate of growth equals the current size. That is why $e^x$ models populations, compound interest and radioactive decay.
The log derivative from the inverse. If $y=\ln x$, then $e^y=x$. Differentiate implicitly: $e^y y'=1$, so $y'=\frac1{e^y}=\frac1x$.
Take $\ln$ of both sides and expand with log laws:
$$\ln y=\tfrac34\ln x+\tfrac12\ln(x^2+1)-5\ln(3x+2)$$Differentiate implicitly. The left side gives $\frac{y'}{y}$:
$$\frac{y'}{y}=\frac{3}{4x}+\frac{x}{x^2+1}-\frac{15}{3x+2}$$Multiply by $y$ to solve:
$$y'=\frac{x^{3/4}\sqrt{x^2+1}}{(3x+2)^5}\left(\frac{3}{4x}+\frac{x}{x^2+1}-\frac{15}{3x+2}\right)$$
For $f(x)=\ln x$, $f'(1)=1$. By the definition of the derivative:
$$1=\lim_{h\to0}\frac{\ln(1+h)-\ln1}{h}=\lim_{h\to0}\frac1h\ln(1+h)=\lim_{h\to0}\ln\left[(1+h)^{1/h}\right]$$The exponential is continuous, so we may move the limit inside it:
$$\lim_{h\to0}(1+h)^{1/h}=\lim_{h\to0}e^{\ln[(1+h)^{1/h}]}=e^{1}$$
Exercises
- $y=e^{-3x}\cos x$
Answer
$-e^{-3x}(3\cos x+\sin x)$ - $y=\ln\!\left(\dfrac{x^2}{\sqrt{x+1}}\right)$
Answer
$\frac2x-\frac{1}{2(x+1)}$ - $y=\log_{10}(3x)$
Answer
$\dfrac{1}{x\ln10}$ - $y=(\sin x)^{x}$
Answer
$(\sin x)^x(\ln\sin x+x\cot x)$
Implicit Differentiation and Inverse Trigonometric Functions
When $y$ is defined implicitly by an equation $F(x,y)=0$, differentiate both sides with respect to $x$, treating $y$ as a function of $x$ (so $\frac{d}{dx}y^2=2y\,y'$), then solve for $y'$.
| $f(x)$ | $f'(x)$ | $f(x)$ | $f'(x)$ |
|---|---|---|---|
| $\arcsin x$ | $\dfrac{1}{\sqrt{1-x^2}}$ | $\arccos x$ | $-\dfrac{1}{\sqrt{1-x^2}}$ |
| $\arctan x$ | $\dfrac{1}{1+x^2}$ | $\operatorname{arccot} x$ | $-\dfrac{1}{1+x^2}$ |
| $\operatorname{arcsec} x$ | $\dfrac{1}{|x|\sqrt{x^2-1}}$ | $\operatorname{arccsc} x$ | $-\dfrac{1}{|x|\sqrt{x^2-1}}$ |
Worked examples
- Differentiate: $3x^2+3y^2y'=6y+6xy'$.
- Collect: $y'(3y^2-6x)=6y-3x^2$, so $y'=\dfrac{2y-x^2}{y^2-2x}$.
- At $(3,3)$: $y'=\dfrac{6-9}{9-6}=-1$. Tangent: $y-3=-(x-3)$.
- Let $y=\arcsin x$, so $\sin y=x$ with $$-\tfrac\pi2\le y\le\tfrac\pi2$$
- Differentiate implicitly: $$\cos y\cdot y'=1\Rightarrow y'=\dfrac1{\cos y}$$
- On this interval $\cos y\ge0$, so $$\cos y=\sqrt{1-\sin^2y}=\sqrt{1-x^2}$$
When is implicit differentiation needed? Some curves, like $x^3+y^3=6xy$ or $\sin(xy)=x+y$, cannot be solved for $y$ in closed form. Implicit differentiation finds the slope anyway, as a formula in both $x$ and $y$.
Derivative of an inverse function. If $g=f^{-1}$, then $f(g(x))=x$. Differentiating gives $f'(g(x))\,g'(x)=1$, so $$g'(x)=\frac{1}{f'(g(x))}.$$ Geometrically, the graph of the inverse is a reflection in $y=x$, which turns a slope $m$ into $1/m$.
First derivative:
$$4x^3+4y^3y'=0\quad\Rightarrow\quad y'=-\frac{x^3}{y^3}$$Differentiate $y'$ again with the quotient rule, remembering that $y$ depends on $x$:
$$y''=-\frac{3x^2y^3-x^3\cdot3y^2y'}{y^6}$$Substitute $y'=-x^3/y^3$ and simplify:
$$y''=-\frac{3x^2y^4+3x^6}{y^7}=-\frac{3x^2(y^4+x^4)}{y^7}$$Use the original equation $x^4+y^4=16$:
$$y''=-\frac{48x^2}{y^7}$$
Find $g(3)$, i.e. solve $f(x)=3$. By inspection, $x=1$: $1+1+1=3$. So $g(3)=1$.
Compute $f'$ at that point:
$$f'(x)=3x^2+1,\qquad f'(1)=4$$Inverse function rule:
$$g'(3)=\frac{1}{f'(g(3))}=\frac{1}{f'(1)}=\frac14$$
Exercises
- Find $y'$ if $x^2y+y^3=5$.
Answer
$y'=\dfrac{-2xy}{x^2+3y^2}$ - Find $y'$ if $\sin(xy)=x$.
Answer
$y'=\dfrac{1-y\cos(xy)}{x\cos(xy)}$ - $y=x\arcsin x+\sqrt{1-x^2}$
Answer
$\arcsin x$ - Find $y''$ if $x^2+y^2=1$.
Answer
$y''=-\dfrac{1}{y^3}$
Applications of the Derivative
The derivative tells us where a function rises and falls, where it bends, how to approximate it, and how to find the best possible design.
The Mean Value Theorem
Worked examples
- $f$ is a polynomial: continuous and differentiable everywhere.
- Secant slope: $$\dfrac{f(2)-f(0)}{2-0}=\dfrac{6-0}{2}=3$$
- $$f'(c)=3c^2-1=3\Rightarrow c^2=\tfrac43\Rightarrow c=\pm\tfrac{2}{\sqrt3}$$ Only $$c=\tfrac2{\sqrt3}\approx1.155$$ lies in $(0,2)$.
- Average speed $=150/1.5=100$ km/h.
- Position $s(t)$ is differentiable, so by the MVT there is $c$ with $s'(c)=100$.
- Existence: the IVT gives a root in $(0,1)$ (Section 1.3).
- Uniqueness: if there were two roots $a\lt b$, Rolle's theorem would give $f'(c)=0$. But $f'(x)=3x^2+1\gt0$ always. Contradiction.
The MVT is the bridge from local to global. The derivative is local information (a slope at one point). The MVT converts it into global information about $f(b)-f(a)$: $$f(b)-f(a)=f'(c)\,(b-a)\quad\text{for some } c\in(a,b).$$ Almost every theorem in Sections 3.4 to 3.6 (increasing/decreasing test, "$f'=0\Rightarrow f$ constant") is proved with this one identity.
Proof idea. Subtract the secant line from $f$. The new function $g(x)=f(x)-\left[f(a)+\frac{f(b)-f(a)}{b-a}(x-a)\right]$ has $g(a)=g(b)=0$, so Rolle's theorem gives $g'(c)=0$, which is exactly the MVT.
Apply the MVT to $f(x)=\sin x$ on the interval between $a$ and $b$:
$$\sin a-\sin b=\cos(c)\,(a-b)\quad\text{for some } c$$Take absolute values and use $|\cos c|\le1$:
$$|\sin a-\sin b|=|\cos c|\,|a-b|\le|a-b|$$
Let $F(x)=\arctan x+\arctan(1/x)$. Differentiate, using the chain rule on the second term:
$$F'(x)=\frac{1}{1+x^2}+\frac{1}{1+\frac{1}{x^2}}\cdot\left(-\frac1{x^2}\right)$$Simplify the second term: $\frac{1}{1+1/x^2}\cdot\frac{1}{x^2}=\frac{1}{x^2+1}$:
$$F'(x)=\frac{1}{1+x^2}-\frac{1}{1+x^2}=0$$By the MVT consequence, $F$ is constant on $(0,\infty)$. Evaluate at a convenient point:
$$F(1)=\arctan1+\arctan1=\frac\pi4+\frac\pi4=\frac\pi2 .\qquad\blacksquare$$
Exercises
- Verify Rolle's theorem for $f(x)=x^2-4x+1$ on $[0,4]$.
Answer
$f(0)=f(4)=1$; $c=2$. - Find $c$ for the MVT: $f(x)=\sqrt x$ on $[0,4]$.
Answer
$c=1$ - Why does the MVT not apply to $f(x)=|x|$ on $[-1,2]$?
Answer
Not differentiable at $0$. - If $f(1)=10$ and $f'(x)\ge2$ for all $x$, how small can $f(4)$ be?
Answer
$f(4)\ge10+2\cdot3=16$
Linear Approximations
Near a point $a$, a differentiable function looks like its tangent line. The linearization of $f$ at $a$ is
Worked examples
- $f(x)=\sqrt x$, $a=4$: $f(4)=2$, $f'(x)=\dfrac1{2\sqrt x}$, $f'(4)=\dfrac14$.
- $L(x)=2+\tfrac14(x-4)$.
- $$\sqrt{4.1}\approx L(4.1)=2+\tfrac14(0.1)=2.025$$ (True value $2.02485\ldots$)
- $V=\tfrac43\pi r^3$, so $dV=4\pi r^2\,dr$.
- $$dV=4\pi(100)(0.1)=40\pi\approx125.7\ \text{cm}^3$$
How good is the approximation? The error $E(x)=f(x)-L(x)$ is controlled by the second derivative. If $|f''|\le M$ near $a$, then $$|f(x)-L(x)|\le\frac{M}{2}(x-a)^2 .$$ So the error is quadratic in the distance $x-a$: halving the step cuts the error by a factor of 4. This is why the tangent line is the "best" linear approximation.
Over- or underestimate? If $f$ is concave up near $a$, the tangent lies below the graph, so $L(x)$ underestimates. If concave down, it overestimates.
Linearize $\sin x$ at $a=0$: $f(0)=0$, $f'(0)=\cos0=1$:
$$L(x)=0+1\cdot(x-0)=x$$Apply it:
$$\sin(0.1)\approx0.1$$On $(0,\pi)$, $f''(x)=-\sin x\lt0$, so the graph is concave down, the tangent lies above it, and the estimate is too large. (True value: $0.0998334\ldots$)
Volume $V=x^3$. The differential estimates the change:
$$dV=3x^2\,dx$$Substitute $x=30$, $dx=\pm0.1$:
$$dV=3(900)(0.1)=270\ \text{cm}^3$$Relative error:
$$\frac{dV}{V}=\frac{3x^2dx}{x^3}=3\frac{dx}{x}=3\cdot\frac{0.1}{30}=0.01$$
Exercises
- Use a linearization to approximate $\sqrt[3]{8.06}$.
Answer
$2+\tfrac{1}{12}(0.06)=2.005$ - Approximate $\ln(1.05)$.
Answer
$\approx0.05$ - Approximate $\cos(61^\circ)$ using $a=60^\circ$.
Answer
$\tfrac12-\tfrac{\sqrt3}{2}\cdot\tfrac{\pi}{180}\approx0.4849$ - Find $dy$ for $y=x^2\sin x$.
Answer
$dy=(2x\sin x+x^2\cos x)\,dx$
Indeterminate Forms and L’Hôpital’s Rule
| Form | What to do |
|---|---|
| $0\cdot\infty$ | Rewrite $fg=\dfrac{f}{1/g}$ to get $\tfrac00$ or $\tfrac\infty\infty$ |
| $\infty-\infty$ | Common denominator, conjugate, or factor |
| $1^\infty,\ 0^0,\ \infty^0$ | Let $y=f^g$, find $\lim\ln y=\lim g\ln f$, then $\lim y=e^{\lim \ln y}$ |
Worked examples
- Form $\tfrac00$. Apply L’Hôpital: $$\lim_{x\to0}\frac{e^x-1}{2x}$$ still $\tfrac00$.
- Apply again: $$\lim_{x\to0}\frac{e^x}{2}=\frac12$$
- Rewrite: $\dfrac{\ln x}{1/x}$, form $\tfrac{-\infty}{\infty}$.
- L’Hôpital: $$\dfrac{1/x}{-1/x^2}=-x\to0$$
- Let $$y=\left(1+\tfrac1x\right)^x$$ so $$\ln y=x\ln\!\left(1+\tfrac1x\right)=\dfrac{\ln(1+1/x)}{1/x}$$ form $\tfrac00$.
- L’Hôpital: $$\dfrac{\frac{1}{1+1/x}\cdot(-1/x^2)}{-1/x^2}=\dfrac{1}{1+1/x}\to1$$
- So $\ln y\to1$ and $y\to e^1$.
Why L’Hôpital works (the simple case). If $f(a)=g(a)=0$ and $g'(a)\neq0$: $$\frac{f(x)}{g(x)}=\frac{f(x)-f(a)}{g(x)-g(a)}=\frac{\frac{f(x)-f(a)}{x-a}}{\frac{g(x)-g(a)}{x-a}}\ \longrightarrow\ \frac{f'(a)}{g'(a)}.$$ Near $a$, both functions look like their tangent lines through the origin, and the ratio of two such lines is the ratio of their slopes.
Growth rates, proved. Repeated L’Hôpital shows $\lim_{x\to\infty}\frac{x^n}{e^x}=0$ for every $n$, and $\lim_{x\to\infty}\frac{\ln x}{x^p}=0$ for every $p\gt0$.
Combine into a single fraction (form $\infty-\infty$ becomes $\tfrac00$):
$$\frac{x\ln x-(x-1)}{(x-1)\ln x}$$L’Hôpital, differentiating the numerator and denominator separately:
$$\frac{\ln x+1-1}{\ln x+\frac{x-1}{x}}=\frac{\ln x}{\ln x+1-\frac1x}$$Still $\tfrac00$. Apply L’Hôpital again:
$$\frac{\frac1x}{\frac1x+\frac1{x^2}}\ \xrightarrow{x\to1}\ \frac{1}{1+1}$$
Let $y=x^{1/x}$ and take logarithms to bring down the exponent:
$$\ln y=\frac{\ln x}{x}\qquad\left(\text{form }\tfrac{\infty}{\infty}\right)$$L’Hôpital:
$$\lim_{x\to\infty}\frac{\ln x}{x}=\lim_{x\to\infty}\frac{1/x}{1}=0$$Undo the logarithm, using the continuity of $e^x$:
$$\lim_{x\to\infty}y=e^{0}=1$$
Exercises
- $\displaystyle\lim_{x\to0}\frac{\sin3x}{\tan5x}$
Answer
$\frac35$ - $\displaystyle\lim_{x\to\infty}\frac{x^3}{e^x}$
Answer
$0$ - $\displaystyle\lim_{x\to0}\left(\frac1x-\frac1{\sin x}\right)$
Answer
$0$ - $\displaystyle\lim_{x\to0^+}x^{x}$
Answer
$1$ - $\displaystyle\lim_{x\to\infty}\left(1+\frac3x\right)^{2x}$
Answer
$e^6$
Maximum and Minimum Values
Worked examples
- $$f'(x)=3x^2-6x=3x(x-2)=0\Rightarrow x=0,2$$ (both in the interval).
- $f(0)=1$, $f(2)=8-12+1=-3$.
- Endpoints: $$f(-\tfrac12)=-\tfrac18-\tfrac34+1=\tfrac18$$ $f(4)=64-48+1=17$.
- Compare: largest $17$, smallest $-3$.
- $f(x)=x^{5/3}-5x^{2/3}$, $$f'(x)=\tfrac53x^{2/3}-\tfrac{10}{3}x^{-1/3}=\dfrac{5(x-2)}{3x^{1/3}}$$
- $f'(x)=0$ at $x=2$; $f'$ does not exist at $x=0$.
Where can extreme values hide? On a closed interval there are only three kinds of candidates: points where $f'=0$, points where $f'$ does not exist, and the endpoints. Fermat's theorem rules out every other point, because a nonzero slope means the function still goes up on one side and down on the other.
Closed and continuous both matter. $f(x)=x$ on $(0,1)$ has no maximum (an open interval). $f(x)=1/x$ on $[-1,1]$ has none either (not continuous). The Extreme Value Theorem needs both hypotheses.
Critical numbers:
$$f'(x)=\cos x-\sin x=0\iff\tan x=1\iff x=\frac\pi4$$Evaluate at the critical number and at both endpoints:
$$f(0)=1,\qquad f\!\left(\tfrac\pi4\right)=\tfrac{\sqrt2}2+\tfrac{\sqrt2}2=\sqrt2,\qquad f(\pi)=-1$$
Expand to differentiate easily:
$$f(x)=5x^{2/3}-2x^{5/3}$$Differentiate and factor out the lowest power:
$$f'(x)=\frac{10}{3}x^{-1/3}-\frac{10}{3}x^{2/3}=\frac{10}{3}\cdot\frac{1-x}{x^{1/3}}$$Critical numbers: $f'=0$ at $x=1$, and $f'$ is undefined at $x=0$ (a cusp). Evaluate all the candidates:
$$f(-1)=1\cdot7=7,\quad f(0)=0,\quad f(1)=3,\quad f(2)=2^{2/3}\approx1.587$$
Exercises
- Absolute extrema of $f(x)=2x^3-3x^2-12x+1$ on $[-2,3]$.
Answer
Max $f(-1)=8$; min $f(2)=-19$ - Absolute extrema of $f(x)=x-2\sin x$ on $[0,2\pi]$.
Answer
Min $f(\pi/3)=\frac\pi3-\sqrt3$; max $f(5\pi/3)=\frac{5\pi}3+\sqrt3$ - Critical numbers of $f(x)=|x^2-1|$.
Answer
$-1,0,1$
Increasing and Decreasing Functions
- $f'$ changes from $+$ to $-$ at $c$: local maximum.
- $f'$ changes from $-$ to $+$ at $c$: local minimum.
- $f'$ does not change sign: no local extremum.
Worked example
- $$f'(x)=3x^2-12x+9=3(x-1)(x-3)$$ Critical numbers: $1,3$.
- Sign chart: on $(-\infty,1)$ test $x=0$: $f'(0)=9\gt0$. On $(1,3)$ test $x=2$: $f'(2)=-3\lt0$. On $(3,\infty)$ test $x=4$: $f'(4)=9\gt0$.
- Increasing on $(-\infty,1)$ and $(3,\infty)$; decreasing on $(1,3)$.
- $f'$ goes $+\to-$ at $1$: local max $f(1)=5$. $f'$ goes $-\to+$ at $3$: local min $f(3)=1$.
Why the sign of $f'$ decides monotonicity. Take $x_1\lt x_2$. By the MVT, $f(x_2)-f(x_1)=f'(c)(x_2-x_1)$. If $f'\gt0$, the right side is positive, so $f(x_2)\gt f(x_1)$, which means $f$ is increasing. This short argument is the whole proof.
Sign charts and factored derivatives. Once $f'$ is factored, each linear factor changes sign at its root, while squared factors do not. Reading signs factor by factor avoids plugging in test points.
Quotient rule:
$$f'(x)=\frac{2x(x-1)-x^2}{(x-1)^2}=\frac{x(x-2)}{(x-1)^2}$$Sign chart. The numerator changes sign at $0$ and $2$; the denominator is always positive (but $x\neq1$):
$$\begin{array}{c|cccc} & (-\infty,0) & (0,1) & (1,2) & (2,\infty)\\\hline f' & + & - & - & +\end{array}$$Conclusion: local max $f(0)=0$, local min $f(2)=4$.
Move everything to one side: let $g(x)=e^x-1-x$. We want $g(x)\gt0$ for $x\gt0$.
Start value and derivative:
$$g(0)=0,\qquad g'(x)=e^x-1\gt0\ \text{ for } x\gt0$$So $g$ is increasing on $[0,\infty)$, and for $x\gt0$:
$$g(x)\gt g(0)=0\quad\Longrightarrow\quad e^x\gt1+x .\qquad\blacksquare$$
Exercises
- $f(x)=x^4-2x^2$: intervals of increase/decrease and local extrema.
Answer
Dec on $(-\infty,-1),(0,1)$; inc on $(-1,0),(1,\infty)$; local min $-1$ at $x=\pm1$, local max $0$ at $x=0$ - $f(x)=xe^{-x}$
Answer
Inc on $(-\infty,1)$, dec on $(1,\infty)$; local max $1/e$ at $x=1$ - $f(x)=\dfrac{x}{x^2+1}$
Answer
Inc on $(-1,1)$; dec on $(-\infty,-1),(1,\infty)$; min $-\tfrac12$, max $\tfrac12$
Concavity and the Second Derivative Test
Worked example
- $f''(x)=6x-12$: $f''\lt0$ for $x\lt2$ (concave down), $f''\gt0$ for $x\gt2$ (concave up).
- Inflection point at $x=2$: $(2,f(2))=(2,3)$.
- $f''(1)=-6\lt0$: local max at $x=1$. $f''(3)=6\gt0$: local min at $x=3$.
$f''$ measures how the slope changes. If $f''\gt0$, then $f'$ is increasing: slopes go from very negative, through zero, to very positive, so the graph bends upward like a cup. In physics, $f''$ is acceleration. Concave up means the velocity is increasing.
Second derivative test: why it works. If $f'(c)=0$ and $f''(c)\gt0$, then $f'$ is increasing through $c$, so it changes from $-$ to $+$. That is exactly a local minimum by the first derivative test.
First derivative (product rule):
$$f'(x)=e^{-x}-xe^{-x}=(1-x)e^{-x}$$Second derivative (product rule again):
$$f''(x)=-e^{-x}-(1-x)e^{-x}=(x-2)e^{-x}$$Since $e^{-x}\gt0$ always, the sign of $f''$ is the sign of $x-2$.
Derivatives:
$$f'(x)=3x^2+2ax+b,\qquad f''(x)=6x+2a$$An inflection point at $x=1$ requires $f''(1)=0$:
$$6+2a=0\quad\Rightarrow\quad a=-3$$A local extremum at $x=3$ requires $f'(3)=0$:
$$27+6a+b=27-18+b=0\quad\Rightarrow\quad b=-9$$Classify with the second derivative test:
$$f''(3)=18-6=12\gt0\quad\Rightarrow\quad\text{local minimum}$$
Exercises
- Concavity and inflection points of $f(x)=x^4-4x^3$.
Answer
$f''=12x(x-2)$: CU on $(-\infty,0),(2,\infty)$, CD on $(0,2)$; IP at $(0,0),(2,-16)$ - Use the second derivative test on $f(x)=x+\dfrac4x$.
Answer
Local min at $x=2$ ($f=4$), local max at $x=-2$ ($f=-4$) - Inflection points of $f(x)=e^{-x^2}$.
Answer
$x=\pm\tfrac1{\sqrt2}$
Overview of Curve Sketching
- Domain
- Intercepts ($x=0$ and $f(x)=0$)
- Symmetry (even $f(-x)=f(x)$, odd $f(-x)=-f(x)$, periodic)
- Asymptotes (vertical, horizontal, slant)
- $f'$: intervals of increase/decrease, local extrema
- $f''$: concavity, inflection points
- Sketch using all of the above
Worked example
- Domain: $x\neq\pm1$. Intercept: $(0,0)$. Symmetry: even.
- Asymptotes: VA $x=\pm1$; HA $y=1$ (equal degrees).
- $$f'(x)=\dfrac{2x(x^2-1)-x^2(2x)}{(x^2-1)^2}=\dfrac{-2x}{(x^2-1)^2}$$: increasing for $x\lt0$, decreasing for $x\gt0$ (avoiding $\pm1$). Local max $f(0)=0$.
- $$f''(x)=\dfrac{6x^2+2}{(x^2-1)^3}$$: numerator always $\gt0$, so CU for $|x|\gt1$, CD for $|x|\lt1$. No inflection point (since $\pm1$ are not in the domain).
- Combine: the graph has three branches, a "cap" through the origin between the asymptotes, and two outer branches above $y=1$ approaching it.
Sketching is a puzzle with many clues. Each item on the checklist rules out wrong shapes. Asymptotes fix the behaviour far away; intercepts fix where the graph meets the axes; $f'$ fixes the hills and valleys; $f''$ fixes the bending. Combine them in one table:
$$\begin{array}{c|ccccc} x & (-\infty,-1) & -1 & (-1,0) & 0 & \dots\\\hline f' & + & 0 & - & \dots\\ f'' & - & \cdot & - & \dots\\ \text{shape} & \nearrow\ \frown & \max & \searrow\ \frown & \dots\end{array}$$Domain: all reals (odd roots). Intercepts: $(0,0)$ and $(6,0)$.
First derivative: take logs, $\ln|f|=\tfrac23\ln|x|+\tfrac13\ln|6-x|$, then differentiate:
$$f'(x)=f(x)\left(\frac{2}{3x}-\frac{1}{3(6-x)}\right)=\frac{4-x}{x^{1/3}(6-x)^{2/3}}$$Critical numbers: $x=4$ ($f'=0$); $x=0$ and $x=6$ ($f'$ undefined). Signs: $f'\lt0$ on $(-\infty,0)$, $\gt0$ on $(0,4)$, $\lt0$ on $(4,6)$, $\lt0$ on $(6,\infty)$.
$$\text{local min } f(0)=0\ \text{(cusp)},\qquad\text{local max } f(4)=2^{5/3}\approx3.17$$Second derivative (after simplification):
$$f''(x)=\frac{-8}{x^{4/3}(6-x)^{5/3}}$$This is negative for $x\lt6$ and positive for $x\gt6$, so there is an inflection point at $(6,0)$, where the tangent is vertical.
End behaviour: $f(x)\approx -x$ for large $|x|$ (slant asymptote $y=-x+2$).
Exercises
- Sketch $f(x)=x^3-3x^2$.
Answer
Local max $(0,0)$, local min $(2,-4)$, IP $(1,-2)$, intercepts $0,3$ - Sketch $f(x)=xe^{x}$.
Answer
Min $(-1,-1/e)$, IP $(-2,-2/e^2)$, HA $y=0$ as $x\to-\infty$ - Sketch $f(x)=\dfrac{2x}{x^2+1}$.
Answer
Odd; max $(1,1)$, min $(-1,-1)$; IPs at $0,\pm\sqrt3$; HA $y=0$
Optimization: Min Distance, Max Volume, Max Area
Worked examples
- $V(x)=x(12-2x)^2$, domain $0\le x\le6$.
- $$V'(x)=(12-2x)^2-4x(12-2x)=(12-2x)(12-6x)$$
- $V'=0\Rightarrow x=6$ or $x=2$. $V(0)=V(6)=0$, $V(2)=2\cdot8^2=128$.
- Let $x$ be the two sides perpendicular to the river and $y$ the side parallel: $2x+y=2400$.
- $$A=xy=x(2400-2x)=2400x-2x^2$$ $0\le x\le1200$.
- $$A'=2400-4x=0\Rightarrow x=600$$ $y=1200$. $A''=-4\lt0$: maximum.
- A point on the curve is $(y^2/2,\ y)$. Minimize $$D^2=d(y)=\left(\tfrac{y^2}{2}-1\right)^2+(y-4)^2$$
- $$d'(y)=2\left(\tfrac{y^2}2-1\right)y+2(y-4)=y^3-8$$
- $d'=0\Rightarrow y=2$; $d'$ changes from $-$ to $+$, so this is the minimum. Then $x=2$.
The hardest step is the model, not the calculus. Most errors come from step 3: expressing the quantity in one variable. Draw a picture, label every length, and look for a constraint (fixed perimeter, fixed volume, a point on a curve, similar triangles, Pythagoras).
Absolute vs local. If the domain is a closed interval, compare the critical values with the endpoints. If it is open or infinite, show that the critical point is the only one and use the first/second derivative test. Then the local extremum is also absolute.
Distance trick. To minimise a distance $D$, minimise $D^2$ instead. Both are smallest at the same point, and $D^2$ has no square root.
By symmetry, the corners are $(\pm x,\,12-x^2)$ with $0\lt x\lt\sqrt{12}$. Width $2x$, height $12-x^2$:
$$A(x)=2x(12-x^2)=24x-2x^3$$Critical numbers:
$$A'(x)=24-6x^2=0\quad\Rightarrow\quad x=2$$Check it is a maximum: $A''(x)=-12x\lt0$ at $x=2$. Evaluate:
$$A(2)=4\cdot8=32$$
Let $\theta$ be the angle between the ladder and the ground. The ladder has two parts: from the ground to the top of the fence (vertical rise $2$) and from the fence to the wall (horizontal run $1$):
$$L(\theta)=\frac{2}{\sin\theta}+\frac{1}{\cos\theta},\qquad 0\lt\theta\lt\frac\pi2$$Differentiate:
$$L'(\theta)=-\frac{2\cos\theta}{\sin^2\theta}+\frac{\sin\theta}{\cos^2\theta}$$Set $L'=0$ and cross-multiply:
$$\sin^3\theta=2\cos^3\theta\quad\Longrightarrow\quad\tan\theta=\sqrt[3]{2}$$Since $L\to\infty$ at both ends of the interval, this single critical point is the minimum. With $t=\tan\theta=2^{1/3}$, use $\frac1{\sin\theta}=\frac{\sqrt{1+t^2}}{t}$ and $\frac1{\cos\theta}=\sqrt{1+t^2}$:
$$L=\sqrt{1+t^2}\left(\frac2t+1\right)=\left(1+2^{2/3}\right)^{3/2}\approx4.16\ \text{m}$$
Put the vertex at the top of the sphere and the base at distance $y$ below the centre. Then the cone height is $h=R+y$, and the base radius satisfies $r^2+y^2=R^2$ (Pythagoras):
$$V=\frac13\pi r^2h=\frac\pi3(R^2-y^2)(R+y),\qquad 0\le y\lt R$$Differentiate with respect to $y$ (product rule):
$$V'(y)=\frac\pi3\big[-2y(R+y)+(R^2-y^2)\big]=\frac\pi3(R+y)(R-3y)$$The only critical number in the domain is $y=R/3$. Then $h=\frac{4R}3$ and $r^2=\frac{8R^2}9$:
$$V_{\max}=\frac\pi3\cdot\frac{8R^2}{9}\cdot\frac{4R}{3}=\frac{32\pi R^3}{81}$$
Exercises
- Find two positive numbers whose product is $100$ and whose sum is minimal.
Answer
$10$ and $10$ - A cylindrical can must hold $1000\ \text{cm}^3$. Find the radius that minimizes the surface area.
Answer
$r=\sqrt[3]{500/\pi}\approx5.42$ cm, $h=2r$ - Find the largest rectangle that can be inscribed in a semicircle of radius $r$.
Answer
Area $r^2$ (dimensions $\sqrt2 r\times r/\sqrt2$) - Find the point on the line $y=2x+3$ closest to the origin.
Answer
$(-\tfrac65,\tfrac35)$
Related Rates
When two or more quantities that depend on time are related by an equation, differentiating with respect to $t$ relates their rates.
Worked examples
- $x^2+y^2=100$. Given $\frac{dx}{dt}=1$, find $\frac{dy}{dt}$ when $x=6$.
- Differentiate: $$2x\frac{dx}{dt}+2y\frac{dy}{dt}=0\Rightarrow\frac{dy}{dt}=-\frac{x}{y}\frac{dx}{dt}$$
- When $x=6$, $y=8$: $$\frac{dy}{dt}=-\frac68(1)=-\frac34$$
- $$V=\tfrac43\pi r^3\Rightarrow\frac{dV}{dt}=4\pi r^2\frac{dr}{dt}$$
- $$100=4\pi(625)\frac{dr}{dt}\Rightarrow\frac{dr}{dt}=\frac{1}{25\pi}$$
- Similar triangles: $$\frac rh=\frac24\Rightarrow r=\frac h2$$ so $$V=\frac13\pi r^2h=\frac{\pi}{12}h^3$$
- $$\frac{dV}{dt}=\frac\pi4h^2\frac{dh}{dt}$$ With $\frac{dV}{dt}=-2$, $h=3$: $$-2=\frac{9\pi}{4}\frac{dh}{dt}$$
Why substitute numbers last? If you substitute $x=6$ before differentiating, $x$ becomes a constant and its rate disappears ($\frac{d}{dt}6=0$). The equation must hold for all times, so differentiate it first. Then freeze the moment you care about.
Every related-rates problem is the chain rule. Writing $\frac{d}{dt}(x^2)=2x\frac{dx}{dt}$ is just the chain rule with $x=x(t)$.
Relate the height $y$ and the angle $\theta$ through the right triangle:
$$\tan\theta=\frac{y}{1200}$$Differentiate with respect to $t$:
$$\sec^2\theta\,\frac{d\theta}{dt}=\frac{1}{1200}\frac{dy}{dt}$$At $y=1600$, the hypotenuse is $2000$, so $\cos\theta=\frac{1200}{2000}=0.6$ and $\sec^2\theta=\frac{1}{0.36}$:
$$\frac{d\theta}{dt}=0.36\cdot\frac{300}{1200}=0.09\ \text{rad/s}$$
At depth $h$, the water surface has width $w$. By similar triangles, $\frac{w}{h}=\frac{2}{1}$, so $w=2h$. Volume = cross-section × length:
$$V=\tfrac12\,w\,h\cdot10=\tfrac12(2h)h\cdot10=10h^2$$Differentiate with respect to $t$:
$$\frac{dV}{dt}=20h\,\frac{dh}{dt}$$Substitute $\frac{dV}{dt}=0.5$ and $h=0.4$:
$$0.5=20(0.4)\frac{dh}{dt}\quad\Rightarrow\quad\frac{dh}{dt}=\frac{0.5}{8}=0.0625$$
Exercises
- The radius of a circle grows at 3 cm/s. How fast is the area changing when $r=10$?
Answer
$60\pi\ \text{cm}^2/\text{s}$ - Two cars leave an intersection, one north at 60 km/h, one east at 80 km/h. How fast is the distance between them increasing after 1 h?
Answer
$100$ km/h - A 1.8 m tall person walks away from a 6 m lamppost at 1.5 m/s. How fast does the tip of the shadow move?
Answer
$\frac{15}{7}\approx2.14$ m/s
Integrals
Integration reverses differentiation and measures accumulated quantities: areas, distances, totals. The Fundamental Theorem of Calculus links the two ideas.
Antiderivatives
$F$ is an antiderivative of $f$ on an interval if $F'(x)=f(x)$. If $F$ is one antiderivative, then all antiderivatives are $F(x)+C$. We write $\displaystyle\int f(x)\,dx=F(x)+C$ (indefinite integral).
| $f(x)$ | $\int f(x)\,dx$ | $f(x)$ | $\int f(x)\,dx$ |
|---|---|---|---|
| $x^n\ (n\ne-1)$ | $\dfrac{x^{n+1}}{n+1}+C$ | $\dfrac1x$ | $\ln|x|+C$ |
| $e^x$ | $e^x+C$ | $a^x$ | $\dfrac{a^x}{\ln a}+C$ |
| $\cos x$ | $\sin x+C$ | $\sin x$ | $-\cos x+C$ |
| $\sec^2x$ | $\tan x+C$ | $\sec x\tan x$ | $\sec x+C$ |
| $\dfrac{1}{1+x^2}$ | $\arctan x+C$ | $\dfrac1{\sqrt{1-x^2}}$ | $\arcsin x+C$ |
Worked examples
- Term by term: $x^3-4\ln|x|+2\sin x+C$.
- $f(x)=2x^3-4x+C$.
- $$f(1)=2-4+C=5\Rightarrow C=7$$
- $v(t)=-9.8t+C_1$, $$v(0)=20\Rightarrow v=-9.8t+20$$
- $s(t)=-4.9t^2+20t+C_2$, $s(0)=25$.
Why "$+C$"? If $F'=G'$ on an interval, the MVT shows that $F-G$ is constant. So knowing a derivative determines a function only up to a vertical shift, and one extra piece of information (an initial condition) pins it down.
Always check by differentiating. Integration is guessing an antiderivative; differentiation is the test. If $\frac{d}{dx}[\text{answer}]$ returns the integrand, you are right.
Divide each term by $x$ to turn the quotient into a sum of powers:
$$\frac{x^3-2x^{1/2}+5}{x}=x^2-2x^{-1/2}+\frac5x$$Integrate term by term (power rule, plus the $\ln$ rule for $\frac1x$):
$$\int\left(x^2-2x^{-1/2}+\frac5x\right)dx=\frac{x^3}{3}-4x^{1/2}+5\ln|x|+C$$Check: differentiating gives $x^2-2x^{-1/2}+\frac5x$ ✓.
Let $a(t)=-k$ (constant). Integrate twice, with $v(0)=30$ and $s(0)=0$:
$$v(t)=30-kt,\qquad s(t)=30t-\tfrac12kt^2$$The car stops when $v=0$:
$$t_s=\frac{30}{k}$$The distance at that moment is 90 m:
$$s(t_s)=\frac{900}{k}-\frac12k\frac{900}{k^2}=\frac{450}{k}=90\quad\Rightarrow\quad k=5$$
Exercises
- $\displaystyle\int(x^3-2x+5)\,dx$
Answer
$\frac{x^4}{4}-x^2+5x+C$ - $\displaystyle\int\frac{x^2+1}{x}\,dx$
Answer
$\frac{x^2}2+\ln|x|+C$ - $\displaystyle\int(e^x+\sec^2x)\,dx$
Answer
$e^x+\tan x+C$ - Find $f$ if $f''(x)=12x$, $f'(0)=1$, $f(0)=2$.
Answer
$f(x)=2x^3+x+2$
Sums and Sigma Notation
$\displaystyle\sum_{i=m}^{n}a_i=a_m+a_{m+1}+\dots+a_n$. The index $i$ is a dummy variable.
Gauss's trick: write $S=1+2+\dots+n$ forwards and backwards and add. Each of the $n$ columns sums to $n+1$, so $2S=n(n+1)$.
Worked examples
- $$3\sum i^2-2\sum i+\sum1=3\cdot\frac{10\cdot11\cdot21}{6}-2\cdot\frac{10\cdot11}{2}+10$$
- $=3(385)-110+10=1055$.
- $$\frac{1}{n^3}\sum_{i=1}^n i^2=\frac{n(n+1)(2n+1)}{6n^3}$$
- $$=\dfrac16\left(1+\frac1n\right)\left(2+\frac1n\right)\to\dfrac{2}{6}=\dfrac13$$
Proof of the sum of squares by telescoping. Write $(i+1)^3-i^3=3i^2+3i+1$ and add for $i=1,\dots,n$. The left side telescopes to $(n+1)^3-1$: $$(n+1)^3-1=3\sum i^2+3\frac{n(n+1)}{2}+n .$$ Solving for $\sum i^2$ gives $\frac{n(n+1)(2n+1)}{6}$.
Proof by induction is the other standard method: check $n=1$, then show that if the formula holds for $n$, it holds for $n+1$.
Write it as the sum from $1$ to $12$ minus the sum from $1$ to $2$:
$$\sum_{i=1}^{12}(2i+1)-\sum_{i=1}^{2}(2i+1)$$Use $\sum i=\frac{n(n+1)}2$ and $\sum1=n$:
$$\left(2\cdot78+12\right)-(3+5)=168-8$$
Split the sum and pull out the constants:
$$\sum_{i=1}^n\frac{n+i}{n^2}=\frac{1}{n^2}\left(n\cdot n+\frac{n(n+1)}{2}\right)$$Simplify:
$$=1+\frac{n+1}{2n}\ \xrightarrow{n\to\infty}\ 1+\frac12$$Interpretation: this is $\sum\left(1+\frac in\right)\frac1n$, a right Riemann sum for $\int_0^1(1+x)\,dx=\frac32$.
Exercises
- Write in sigma notation: $2+4+6+\dots+40$.
Answer
$\sum_{i=1}^{20}2i$ - $\displaystyle\sum_{i=1}^{20}(2i-1)$
Answer
$400$ - $\displaystyle\sum_{i=1}^{n}(i+1)^2$ in closed form.
Answer
$\frac{n(n+1)(2n+1)}6+n(n+1)+n$ - $\displaystyle\sum_{i=1}^{n}\left(\frac1i-\frac1{i+1}\right)$ (telescoping)
Answer
$1-\frac1{n+1}$
Area under a Curve
Divide $[a,b]$ into $n$ subintervals of width $\Delta x=\dfrac{b-a}{n}$ with endpoints $x_i=a+i\Delta x$. Approximate the area by rectangles:
Worked example
- $\Delta x=\frac1n$, $x_i=\frac in$, $f(x_i)=\frac{i^2}{n^2}$.
- $$R_n=\sum_{i=1}^n\frac{i^2}{n^2}\cdot\frac1n=\frac{1}{n^3}\cdot\frac{n(n+1)(2n+1)}6$$
- $$\lim_{n\to\infty}R_n=\frac{2}{6}=\frac13$$
Upper and lower sums trap the area. On each strip, use the largest value of $f$ (upper sum $U_n$) or the smallest (lower sum $L_n$). Then $$L_n\le A\le U_n .$$ For an increasing function, $U_n-L_n=\big[f(b)-f(a)\big]\Delta x\to0$, so both sums squeeze the same number. That number is the area.
Midpoint is usually best. Its error shrinks like $\frac{1}{n^2}$, while left and right sums shrink like $\frac1n$. Try it in the demo: doubling $n$ cuts the midpoint error by about a factor of 4.
$\Delta x=\frac14$. The midpoints are $1.125,\ 1.375,\ 1.625,\ 1.875$:
$$M_4=\frac14\left(\frac1{1.125}+\frac1{1.375}+\frac1{1.625}+\frac1{1.875}\right)$$Compute:
$$M_4=\frac14(0.8889+0.7273+0.6154+0.5333)=0.6912$$The exact area is $\ln2=0.6931\ldots$ (Section 4.5), so the error is only about $0.002$.
$\Delta x=\frac2n$, $x_i=\frac{2i}n$, $f(x_i)=\frac{8i^3}{n^3}$:
$$R_n=\sum_{i=1}^n\frac{8i^3}{n^3}\cdot\frac2n=\frac{16}{n^4}\sum_{i=1}^n i^3$$Use $\sum i^3=\left[\frac{n(n+1)}{2}\right]^2$:
$$R_n=\frac{16}{n^4}\cdot\frac{n^2(n+1)^2}{4}=4\left(1+\frac1n\right)^2$$Let $n\to\infty$:
$$A=\lim_{n\to\infty}4\left(1+\frac1n\right)^2=4$$
Exercises
- Compute $L_4$ and $R_4$ for $f(x)=x^2$ on $[0,2]$.
Answer
$L_4=1.75,\ R_4=3.75$ (exact $8/3$) - Compute $M_2$ for $f(x)=\frac1x$ on $[1,3]$.
Answer
$\frac23+\frac25=\frac{16}{15}$ - Find the area under $y=2x+1$ on $[0,3]$ using $\lim R_n$.
Answer
$12$
The Definite Integral
| Property | Formula |
|---|---|
| Reversed limits | $\int_b^a f=-\int_a^b f,\quad \int_a^a f=0$ |
| Linearity | $\int_a^b(cf\pm g)=c\int_a^b f\pm\int_a^b g$ |
| Additivity | $\int_a^c f+\int_c^b f=\int_a^b f$ |
| Comparison | $f\le g\Rightarrow\int_a^b f\le\int_a^b g$; $\ m(b-a)\le\int_a^b f\le M(b-a)$ |
| Constant | $\int_a^b c\,dx=c(b-a)$ |
Worked examples
- $y=\sqrt{4-x^2}$ is the upper half of the circle of radius 2.
- Area $=\tfrac12\pi(2)^2=2\pi$.
- $\int_2^5 f=7-3=4$.
- $$\int_5^2(2f+1)=-\int_2^5(2f+1)=-(2\cdot4+3)=-11$$
Integrable functions. Every continuous function on $[a,b]$ is integrable, and so is any bounded function with finitely many jumps. The definite integral is a number, while the indefinite integral is a family of functions.
Average value. The average height of $f$ on $[a,b]$ is $$f_{\text{avg}}=\frac{1}{b-a}\int_a^bf(x)\,dx .$$ The Mean Value Theorem for integrals says a continuous $f$ actually attains this value at some $c\in[a,b]$.
Apply the formula with $b-a=3$:
$$f_{\text{avg}}=\frac13\int_{-1}^2(1+x^2)\,dx=\frac13\Big[x+\frac{x^3}3\Big]_{-1}^{2}$$Evaluate:
$$=\frac13\left[\left(2+\tfrac83\right)-\left(-1-\tfrac13\right)\right]=\frac13\cdot6=2$$Solve $f(c)=2$:
$$1+c^2=2\quad\Rightarrow\quad c=\pm1$$
Linearity: split into two integrals:
$$\int_{-3}^3|x|\,dx-\int_{-3}^3\sqrt{9-x^2}\,dx$$The first is two triangles, each with base 3 and height 3:
$$\int_{-3}^3|x|\,dx=2\cdot\tfrac12\cdot3\cdot3=9$$The second is the area of a half-disc of radius 3:
$$\int_{-3}^3\sqrt{9-x^2}\,dx=\tfrac12\pi(3)^2=\tfrac{9\pi}2$$
Exercises
- $\displaystyle\int_{0}^{3}(2-x)\,dx$ using geometry.
Answer
$2-\tfrac12=\tfrac32$ - $\displaystyle\int_{-1}^{2}|x|\,dx$
Answer
$\tfrac12+2=\tfrac52$ - Show that $2\le\displaystyle\int_0^1\sqrt{4+x^2}\,dx\le\sqrt5$.
Answer
On $[0,1]$: $2\le\sqrt{4+x^2}\le\sqrt5$; multiply by length 1. - Express $\displaystyle\lim_{n\to\infty}\sum_{i=1}^n\frac{3}{n}\sqrt{1+\frac{3i}{n}}$ as an integral.
Answer
$\int_0^3\sqrt{1+x}\,dx$ (or $\int_1^4\sqrt{x}\,dx$)
The Fundamental Theorem of Calculus
Worked examples
- Antiderivative: $F(x)=\frac{x^3}{3}-x^2$.
- $$F(3)-F(1)=(9-9)-\left(\frac13-1\right)=\frac23$$
- $u=x^3$, $u'=3x^2$.
- Result: $$\cos\!\big((x^3)^2\big)\cdot3x^2$$
- $[\sin x]_0^{\pi/2}=1-0=1$.
- $[\ln x]_1^e=1-0=1$.
Why FTC 1 is true. With $g(x)=\int_a^xf$: $$\frac{g(x+h)-g(x)}{h}=\frac1h\int_x^{x+h}f(t)\,dt\approx\frac1h\cdot f(x)\cdot h=f(x).$$ The extra area added by a thin strip of width $h$ is about its height times its width. Divide by the width, and the height $f(x)$ remains.
Why FTC 2 follows. $g$ and any antiderivative $F$ have the same derivative, so $F=g+C$. Then $F(b)-F(a)=g(b)-g(a)=\int_a^bf-0$.
Together they say that differentiation and integration are inverse operations, the central fact of calculus.
Upper limit $v=x^2$ with $v'=2x$; lower limit $u=\sqrt x$ with $u'=\frac1{2\sqrt x}$:
$$\frac{d}{dx}\int_{u}^{v}f(t)\,dt=f(v)\,v'-f(u)\,u'$$Substitute $f(t)=\frac1{1+t^3}$:
$$=\frac{2x}{1+x^6}-\frac{1}{2\sqrt x\,(1+x^{3/2})}$$
Differentiate both sides. By FTC 1, the left side gives $\frac{f(x)}{x^2}$:
$$\frac{f(x)}{x^2}=\frac{1}{\sqrt x}\quad\Rightarrow\quad f(x)=x^{3/2}$$Put $x=a$: the integral from $a$ to $a$ is $0$:
$$6+0=2\sqrt a\quad\Rightarrow\quad a=9$$
Displacement, the net change in position:
$$\int_0^{3\pi/2}\cos t\,dt=\Big[\sin t\Big]_0^{3\pi/2}=-1-0=-1$$Distance: $v\ge0$ on $[0,\frac\pi2]$ and $v\le0$ on $[\frac\pi2,\frac{3\pi}2]$, so split at $\frac\pi2$:
$$\int_0^{\pi/2}\cos t\,dt-\int_{\pi/2}^{3\pi/2}\cos t\,dt=1-(-2)=3$$
Exercises
- $\displaystyle\int_0^4\sqrt x\,dx$
Answer
$\frac{16}3$ - $\displaystyle\int_0^1(e^x+x^e)\,dx$
Answer
$e-1+\frac{1}{e+1}$ - $\dfrac{d}{dx}\displaystyle\int_x^{2}\frac{dt}{1+t^4}$
Answer
$-\frac1{1+x^4}$ - A particle has $v(t)=t^2-2t-3$ on $[0,4]$. Find the displacement and the distance travelled.
Answer
Displacement $-\frac{20}3$; distance $\frac{34}3$
Integration by Substitution
Substitution reverses the chain rule. Look for a function $g(x)$ whose derivative $g'(x)$ also appears in the integrand.
Worked examples
- $u=x^3+1$, $$du=3x^2dx\Rightarrow x^2dx=\tfrac13du$$
- $$\int\sqrt u\cdot\tfrac13du=\tfrac13\cdot\tfrac23u^{3/2}+C$$
- $$\tan x=\dfrac{\sin x}{\cos x}$$ $u=\cos x$, $du=-\sin x\,dx$.
- $$\int-\frac{du}{u}=-\ln|u|+C$$
- $u=1+x^2$, $du=2x\,dx$. Limits: $x=0\to u=1$, $x=2\to u=5$.
- $$\frac12\int_1^5u^{-2}du=\frac12\Big[-\frac1u\Big]_1^5=\frac12\left(-\frac15+1\right)$$
How to choose $u$. Look for an "inside function" whose derivative appears as a factor, up to a constant:
| Integrand contains… | Try |
|---|---|
| $f(ax+b)$ | $u=ax+b$ |
| $g(x^n)\cdot x^{n-1}$ | $u=x^n$ |
| $g(\ln x)\cdot\frac1x$ | $u=\ln x$ |
| $g(e^x)\cdot e^x$ | $u=e^x$ |
| $g(\sin x)\cos x$ | $u=\sin x$ |
After substituting, no $x$ may remain. If one does, either solve $u=g(x)$ for $x$ (back-substitution) or choose another $u$.
Let $u=x+1$, so $du=dx$. The leftover $x$ must be written in terms of $u$: $x=u-1$:
$$\int(u-1)\sqrt u\,du=\int\left(u^{3/2}-u^{1/2}\right)du$$Power rule:
$$=\frac25u^{5/2}-\frac23u^{3/2}+C$$Return to $x$:
$$=\frac25(x+1)^{5/2}-\frac23(x+1)^{3/2}+C$$
$x^5\cos x$ and $\sin x\cos^3x$ are odd (odd × even), so their integrals over a symmetric interval vanish:
$$\int_{-\pi/2}^{\pi/2}x^5\cos x\,dx=0,\qquad\int_{-\pi/2}^{\pi/2}\sin x\cos^3x\,dx=0$$$\cos x$ is even, so double the integral from $0$:
$$\int_{-\pi/2}^{\pi/2}\cos x\,dx=2\int_0^{\pi/2}\cos x\,dx=2\Big[\sin x\Big]_0^{\pi/2}=2$$
Let $u=\ln(\ln x)$. By the chain rule:
$$du=\frac{1}{\ln x}\cdot\frac1x\,dx=\frac{dx}{x\ln x}$$The whole integrand is $\frac{1}{u}\,du$:
$$\int\frac{du}{u}=\ln|u|+C$$
Exercises
- $\displaystyle\int\cos(3x)\,dx$
Answer
$\frac13\sin3x+C$ - $\displaystyle\int\frac{\ln x}{x}\,dx$
Answer
$\frac12(\ln x)^2+C$ - $\displaystyle\int\frac{e^x}{1+e^{2x}}\,dx$
Answer
$\arctan(e^x)+C$ - $\displaystyle\int_0^{\pi/4}\tan x\sec^2x\,dx$
Answer
$\frac12$ - $\displaystyle\int_{-1}^{1}x^3\cos x\,dx$
Answer
$0$ (odd integrand)
Applications of Integration
Slice, approximate, add up, take a limit. The same idea computes areas between curves, volumes of solids of revolution, and lengths of curves.
Area between Curves
Worked examples
- Intersections: $$4-x^2=x+2\Rightarrow x^2+x-2=0\Rightarrow x=-2,\ 1$$
- Top: $4-x^2$ (test $x=0$: $4\gt2$). $$A=\int_{-2}^{1}(2-x-x^2)\,dx$$
- $$=\Big[2x-\frac{x^2}2-\frac{x^3}3\Big]_{-2}^{1}=\left(2-\frac12-\frac13\right)-\left(-4-2+\frac83\right)=\frac76+\frac{10}3$$
- $y^2=y+2\Rightarrow y=-1,2$. Right curve: $x=y+2$.
- $$A=\int_{-1}^{2}(y+2-y^2)\,dy=\Big[\frac{y^2}2+2y-\frac{y^3}3\Big]_{-1}^{2}=\frac{10}3+\frac76$$
The "slice and add" principle. A thin vertical strip at position $x$ has height $f(x)-g(x)$ and width $dx$, so its area is $\big[f(x)-g(x)\big]dx$. The integral adds up infinitely many such strips, from the leftmost to the rightmost. $$dA=(\text{top}-\text{bottom})\,dx\qquad\Longrightarrow\qquad A=\int_a^b dA .$$ This same principle gives volumes (Section 5.2), arc length (Section 5.3), work, mass and more.
Which way to slice? Choose the direction that gives one formula for the strip. If the top or bottom boundary changes formula partway, vertical strips need two integrals; horizontal strips may need only one.
The curves meet where $x^3=x$, i.e. at $x=-1,0,1$. Find which is on top in each piece (test $x=-\tfrac12$, $\tfrac12$, $\tfrac32$):
$$[-1,0]:\ x^3\ge x,\qquad[0,1]:\ x\ge x^3,\qquad[1,2]:\ x^3\ge x$$Integrate (top − bottom) on each piece:
$$\int_{-1}^0(x^3-x)\,dx=\tfrac14,\qquad\int_0^1(x-x^3)\,dx=\tfrac14,\qquad\int_1^2(x^3-x)\,dx=\tfrac{15}4-\tfrac32=\tfrac94$$Add:
$$A=\tfrac14+\tfrac14+\tfrac94=\tfrac{11}4$$
With vertical strips the bottom boundary changes (the $x$-axis until $x=2$, then the line), so we would need two integrals. Use horizontal strips instead: write each curve as $x$ in terms of $y$:
$$x=y^2\ \ (\text{left}),\qquad x=y+2\ \ (\text{right})$$They meet where $y^2=y+2$, i.e. $y=2$ (we need $y\ge0$). The region runs from $y=0$ to $y=2$:
$$A=\int_0^2\big[(y+2)-y^2\big]\,dy$$Evaluate:
$$=\Big[\frac{y^2}2+2y-\frac{y^3}3\Big]_0^2=2+4-\frac83=\frac{10}3$$
Exercises
- Area between $y=x^2$ and $y=2x$.
Answer
$\frac43$ - Area between $y=\sin x$ and $y=\cos x$ on $[0,\pi/2]$.
Answer
$2\sqrt2-2$ - Area enclosed by $y=x^3$ and $y=x$.
Answer
$\frac12$
Volumes: The Methods of Disks and Washers
Rotating a region about an axis produces a solid. Slicing perpendicular to the axis gives circular disks (or washers if there is a hole).
Worked examples
- $R(x)=\sqrt x$, so the area of a slice is $\pi x$.
- $$V=\int_0^4\pi x\,dx=\pi\Big[\frac{x^2}2\Big]_0^4=8\pi$$
- Intersections: $$\sqrt x=\tfrac x2\Rightarrow x=0,4$$ Outer $R=\sqrt x$, inner $r=\tfrac x2$.
- $$V=\pi\int_0^4\left(x-\frac{x^2}{4}\right)dx=\pi\Big[\frac{x^2}2-\frac{x^3}{12}\Big]_0^4=\pi\left(8-\frac{16}3\right)$$
- Rotate $y=\sqrt{r^2-x^2}$, $-r\le x\le r$, about the $x$-axis.
- $$V=\pi\int_{-r}^{r}(r^2-x^2)\,dx=\pi\Big[r^2x-\frac{x^3}3\Big]_{-r}^{r}=\pi\left(\frac{4r^3}{3}\right)$$
Cut the solid with a plane perpendicular to the axis of rotation at position $x$. The cross-section is a washer: a disc of radius $R(x)$ with a concentric hole of radius $r(x)$. Its area is $$A(x)=\pi R(x)^2-\pi r(x)^2 .$$ A slab of thickness $dx$ has volume $A(x)\,dx$, and adding the slabs gives the integral. Disks are the special case $r=0$.
How to find $R$ and $r$, whatever the axis. Both are distances from the axis of rotation:
| Axis of rotation | Slices | Outer radius $R$ | Inner radius $r$ |
|---|---|---|---|
| $x$-axis ($y=0$) | vertical, $dx$ | $y_{\text{far}}$ | $y_{\text{near}}$ |
| horizontal line $y=k$ below the region | vertical, $dx$ | $y_{\text{top}}-k$ | $y_{\text{bottom}}-k$ |
| horizontal line $y=k$ above the region | vertical, $dx$ | $k-y_{\text{bottom}}$ | $k-y_{\text{top}}$ |
| $y$-axis ($x=0$) | horizontal, $dy$ | $x_{\text{far}}$ | $x_{\text{near}}$ |
| vertical line $x=h$ | horizontal, $dy$ | $|x_{\text{far}}-h|$ | $|x_{\text{near}}-h|$ |
Rule of thumb: slice perpendicular to the axis. Rotating about a horizontal axis means integrating in $x$; about a vertical axis, in $y$.
Intersections: $x^2=x$ gives $x=0,1$. On $[0,1]$, $x\ge x^2$, so the line is farther from the axis:
$$R(x)=x,\qquad r(x)=x^2$$Washer area times thickness, summed:
$$V=\pi\int_0^1\left(x^2-x^4\right)dx$$Integrate:
$$=\pi\Big[\frac{x^3}{3}-\frac{x^5}{5}\Big]_0^1=\pi\left(\frac13-\frac15\right)=\frac{2\pi}{15}$$
The axis $y=-1$ lies below the region, so measure distances upward from $-1$. The far boundary is the curve; the near boundary is the $x$-axis:
$$R(x)=\sqrt x-(-1)=\sqrt x+1,\qquad r(x)=0-(-1)=1$$There is a hole of radius 1 because the region does not touch the axis:
$$V=\pi\int_0^4\Big[(\sqrt x+1)^2-1^2\Big]dx=\pi\int_0^4\left(x+2\sqrt x\right)dx$$Integrate:
$$=\pi\Big[\frac{x^2}{2}+\frac43x^{3/2}\Big]_0^4=\pi\left(8+\frac{32}{3}\right)=\frac{56\pi}{3}$$
Intersections at $x=0$ and $x=4$. Now the axis is above the region, so distances are measured downward from 2. The lower curve $y=\frac x2$ is farther away:
$$R(x)=2-\frac x2,\qquad r(x)=2-\sqrt x$$Expand the squares carefully:
$$R^2-r^2=\left(4-2x+\frac{x^2}4\right)-\left(4-4\sqrt x+x\right)=-3x+\frac{x^2}{4}+4\sqrt x$$Integrate:
$$V=\pi\int_0^4\left(-3x+\frac{x^2}4+4x^{1/2}\right)dx=\pi\Big[-\frac{3x^2}{2}+\frac{x^3}{12}+\frac83x^{3/2}\Big]_0^4$$Evaluate at $4$:
$$=\pi\left(-24+\frac{16}3+\frac{64}3\right)=\pi\left(-24+\frac{80}{3}\right)=\frac{8\pi}{3}$$
The axis is vertical, so slice horizontally and integrate in $y$. Solve each curve for $x$: $y=x\Rightarrow x=y$, and $y=x^2\Rightarrow x=\sqrt y$. For $0\le y\le1$, $\sqrt y\ge y$:
$$R(y)=\sqrt y\ \ (\text{far}),\qquad r(y)=y\ \ (\text{near})$$Set up and integrate:
$$V=\pi\int_0^1\left(y-y^2\right)dy=\pi\left(\frac12-\frac13\right)$$
Integrate in $y$. Distances are measured from $x=-1$, so add $1$ to each $x$-value:
$$R(y)=\sqrt y+1,\qquad r(y)=y+1$$Expand:
$$R^2-r^2=(y+2\sqrt y+1)-(y^2+2y+1)=2\sqrt y-y-y^2$$Integrate:
$$V=\pi\int_0^1\left(2y^{1/2}-y-y^2\right)dy=\pi\left(\frac43-\frac12-\frac13\right)=\frac{\pi}{2}$$Compare with Example 7: the same region gives a larger volume ($\frac\pi2\gt\frac\pi6$) because it now sweeps a larger circle.
Intersections: $4-x^2=3$ gives $x=\pm1$. On $[-1,1]$ the parabola is on top. The axis $y=1$ lies below the whole region:
$$R(x)=(4-x^2)-1=3-x^2,\qquad r(x)=3-1=2$$Use symmetry (an even integrand) to integrate over $[0,1]$ and double:
$$V=2\pi\int_0^1\Big[(3-x^2)^2-4\Big]dx=2\pi\int_0^1\left(5-6x^2+x^4\right)dx$$Integrate:
$$=2\pi\left(5-2+\frac15\right)=2\pi\cdot\frac{16}{5}=\frac{32\pi}{5}$$
For each $x\in[-a,a]$, the vertical slice of the disc runs from $y=b-\sqrt{a^2-x^2}$ up to $y=b+\sqrt{a^2-x^2}$. These are the near and far distances from the axis. Write $s=\sqrt{a^2-x^2}$:
$$R=b+s,\qquad r=b-s$$Difference of squares makes this neat: $(b+s)^2-(b-s)^2=4bs$:
$$V=\pi\int_{-a}^{a}4b\sqrt{a^2-x^2}\,dx=4\pi b\int_{-a}^a\sqrt{a^2-x^2}\,dx$$The remaining integral is the area of a half-disc of radius $a$, namely $\frac{\pi a^2}2$:
$$V=4\pi b\cdot\frac{\pi a^2}{2}=2\pi^2a^2b$$Interpretation: $V=(\pi a^2)\cdot(2\pi b)$, the area of the disc times the distance its centre travels (Pappus's theorem).
The same "slice and add" idea works with any cross-section, not only circles. At position $x$, the square's side runs across the disc:
$$s(x)=2\sqrt{r^2-x^2}$$Area of the square cross-section:
$$A(x)=s^2=4(r^2-x^2)$$Integrate:
$$V=\int_{-r}^{r}4(r^2-x^2)\,dx=4\left(2r^3-\frac{2r^3}{3}\right)=\frac{16r^3}{3}$$
- Sketch the region and the axis. Draw a typical slice perpendicular to the axis.
- Decide: horizontal axis → $dx$; vertical axis → $dy$.
- Find the limits (intersection points).
- $R=$ distance from the axis to the far curve; $r=$ distance to the near curve.
- $V=\pi\int(R^2-r^2)$. Square before subtracting.
- Check: positive answer, plausible size, correct units (cubic).
Exercises
- Rotate $y=x^2$, $0\le x\le2$, about the $x$-axis.
Answer
$\frac{32\pi}5$ - Rotate the region between $y=x$ and $y=x^2$ about the $x$-axis.
Answer
$\frac{2\pi}{15}$ - Rotate $y=e^{x}$, $0\le x\le1$, about the $x$-axis.
Answer
$\frac\pi2(e^2-1)$ - Rotate the region under $y=x^2$, $0\le x\le1$, about the line $y=-1$.
Answer
$\pi\int_0^1[(x^2+1)^2-1]dx=\frac{13\pi}{15}$ - Rotate the region under $y=x^2$, $0\le x\le1$, about the line $y=-2$.
Answer
$R=x^2+2,\ r=2$: $\pi\int_0^1(x^4+4x^2)\,dx=\frac{23\pi}{15}$ - Rotate the region between $y=x^2$ and $y=1$ about the line $y=1$.
Answer
Disks, $R=1-x^2$: $\pi\int_{-1}^1(1-x^2)^2dx=\frac{16\pi}{15}$ - Rotate the region between $y=x^2$ and $y=2x$ about the $y$-axis.
Answer
$R=\sqrt y,\ r=\frac y2$: $\pi\int_0^4\left(y-\frac{y^2}{4}\right)dy=\frac{8\pi}{3}$ - Rotate the region between $y=x$ and $y=\sqrt x$ about the line $x=2$.
Answer
$R=2-y^2,\ r=2-y$: $\pi\int_0^1(4y-5y^2+y^4)\,dy=\frac{8\pi}{15}$ - Rotate the region between $y=x^2$ and $y=2x$ about the line $y=4$.
Answer
$R=4-x^2,\ r=4-2x$: $\pi\int_0^2\big[(4-x^2)^2-(4-2x)^2\big]dx=\frac{32\pi}{5}$
Arc Length
Approximate the curve by a polygon. A small piece has length $\sqrt{\Delta x^2+\Delta y^2}=\sqrt{1+(\Delta y/\Delta x)^2}\,\Delta x$. Letting $\Delta x\to0$:
Worked examples
- $y'=\tfrac32x^{1/2}$, so $1+(y')^2=1+\tfrac94x$.
- $$L=\int_0^4\sqrt{1+\tfrac94x}\,dx$$ Let $u=1+\tfrac94x$, $dx=\tfrac49du$, $u:1\to10$.
- $$L=\frac49\int_1^{10}u^{1/2}du=\frac49\cdot\frac23\Big[u^{3/2}\Big]_1^{10}=\frac{8}{27}\left(10\sqrt{10}-1\right)$$
- $$y'=\dfrac{x^2}2-\dfrac1{2x^2}$$ so $$1+(y')^2=\dfrac{x^4}4+\dfrac12+\dfrac1{4x^4}=\left(\dfrac{x^2}2+\dfrac{1}{2x^2}\right)^2$$
- $$L=\int_1^2\left(\frac{x^2}2+\frac1{2x^2}\right)dx=\Big[\frac{x^3}6-\frac1{2x}\Big]_1^2=\left(\frac86-\frac14\right)-\left(\frac16-\frac12\right)$$
The arc-length element. Zoom in on the curve until it looks straight. A tiny piece is the hypotenuse of a right triangle with legs $dx$ and $dy$: $$ds=\sqrt{dx^2+dy^2}=\sqrt{1+\left(\frac{dy}{dx}\right)^2}\,dx .$$ The arc length is $L=\int ds$. The same element $ds$ is used for surface areas of revolution in Calculus II.
Why polygons work. By the MVT, each chord has slope $f'(x_i^*)$ for some point in its interval, so its length is exactly $\sqrt{1+f'(x_i^*)^2}\,\Delta x$. The polygon length is therefore a Riemann sum, and its limit is the integral.
Here $x$ is a function of $y$, so use the $dy$ form:
$$\frac{dx}{dy}=\frac12y^{1/2},\qquad1+\left(\frac{dx}{dy}\right)^2=1+\frac y4$$Set up the integral:
$$L=\int_0^{12}\sqrt{1+\frac y4}\,dy$$Substitute $u=1+\frac y4$, $dy=4\,du$, $u:1\to4$:
$$L=4\int_1^4u^{1/2}du=4\cdot\frac23\Big[u^{3/2}\Big]_1^4=\frac83(8-1)=\frac{56}3$$
Derivative:
$$y'=\frac{e^x-e^{-x}}{2}$$Expand $1+(y')^2$. The cross terms combine into a perfect square:
$$1+\frac{e^{2x}-2+e^{-2x}}{4}=\frac{e^{2x}+2+e^{-2x}}{4}=\left(\frac{e^x+e^{-x}}{2}\right)^2$$So the square root disappears (the expression is positive):
$$L=\int_{-1}^{1}\frac{e^x+e^{-x}}2\,dx=\Big[\frac{e^x-e^{-x}}2\Big]_{-1}^{1}=e-\frac1e$$
Upper semicircle: $y=\sqrt{r^2-x^2}$, so $y'=\dfrac{-x}{\sqrt{r^2-x^2}}$:
$$1+(y')^2=1+\frac{x^2}{r^2-x^2}=\frac{r^2}{r^2-x^2}$$Quarter circle from $x=0$ to $x=r$:
$$L=\int_0^{r}\frac{r}{\sqrt{r^2-x^2}}\,dx=r\Big[\arcsin\frac xr\Big]_0^{r}$$Evaluate (an improper integral at $x=r$, but convergent):
$$L=r\left(\frac\pi2-0\right)=\frac{\pi r}{2}$$
Exercises
- Length of $y=\tfrac23(x-1)^{3/2}$ on $[1,4]$.
Answer
$\frac{14}3$ - Length of $y=\ln(\cos x)$ on $[0,\pi/4]$.
Answer
$\ln(\sqrt2+1)$ - Set up (do not evaluate) the length of $y=x^2$ on $[0,1]$.
Answer
$\int_0^1\sqrt{1+4x^2}\,dx\approx1.479$
Worksheet Generator
Choose the topics, then generate a printable worksheet built from the exercises in these notes. An answer key is added on a separate page.
