Test preparation: derivatives and their applications
Five topics: the theorems of Fermat, Rolle, Lagrange and Cauchy, L’Hôpital’s rule, curve sketching and Taylor’s formula for polynomials and for functions. Each topic has theory, proofs and worked problems. The solutions are hidden. Try on your own first, then open them.
The theorems of Rolle and Lagrange and the “prove that” problems are the basis for everything else. So start with them.
Study plan
Six sessions, about 9 hours. With 3 days: 2 sessions a day. Tick what you finish; your browser will remember it.
If you only have one evening
- Rolle/Lagrange (60 min): the proof of Lagrange’s theorem, the problem with 3 functions, \(|\sin x-\sin y|\le|x-y|\) and \(|\arctanx-\arctany|\le|x-y|\).
- L’Hôpital (40 min): the 5 examples + \(\lim x^n/e^x=0\).
- Curve sketching (60 min): \(y=\frac{2x-1}{(x-1)^2}\) and \(y=\frac{x}{x^2-1}\).
- Taylor (40 min): the formula \(A_k=\frac{P^{(k)}(x_0)}{k!}\), the remainder in Lagrange form, the expansion of \(e^x\).
Fermat, Rolle, Lagrange, Cauchy
The three theorems say the same thing. Somewhere between \(a\) and \(b\) the derivative equals the “average speed” of the function. Rolle is a special case of Lagrange, and Lagrange is a special case of Cauchy. Each is proved from the previous one: Fermat → Rolle → Lagrange → Cauchy → L’Hôpital.
Fermat’s theorem
Local maximum at \(x_0\): there is a neighbourhood \((x_0-\delta,x_0+\delta)\) in which \(f(x_0)\ge f(x)\). Minimum: \(f(x_0)\le f(x)\). The points where \(f'(x)=0\) are called stationary points.
Proof of Fermat’s theorem (maximum and minimum)
Maximum at \(c\): for small \(\Delta x\), \(f(c+\Delta x)-f(c)\le0\).
\(f\) is differentiable at \(c\), so \(f'(c^-)=f'(c^+)=f'(c)\). From \(\ge0\) and \(\le0\) it follows that \(f'(c)=0\). \(\blacksquare\)
Minimum at \(c\): now \(f(c+\Delta x)-f(c)\ge0\). On the left: numerator ≥ 0, denominator < 0, so \(f'(c^-)\le0\). On the right: \(f'(c^+)\ge0\). Hence \(f'(c)=0\). \(\blacksquare\)
Counterexamples: the converse is false, and every condition is needed
\(f'(c)=0\) does not mean an extremum. \(f(x)=x^3\) on \([-1,1]\): \(f'(x)=3x^2=0\iff x=0\), but for \(x<0\) we have \(f(x)<f(0)\), and for \(x>0\) we have \(f(x)>f(0)\). There is no extremum at 0.
Without differentiability it fails. \(f(x)=|x|\) on \([-1,1]\) has a minimum at 0, but \(f'(0^-)=-1\), \(f'(0^+)=1\), so \(f'(0)\) does not exist.
Rolle’s theorem
Geometrically: if the curve starts and ends at the same height, somewhere it has a horizontal tangent.
Proof of Rolle’s theorem
If \(f\) is constant on \([a,b]\), then \(f'(c)=0\) for every \(c\).
If it is not constant: every continuous function on a closed interval attains its maximum \(M\) and minimum \(m\), so there are \(\xi_1,\xi_2\in[a,b]\) with \(f(\xi_1)=m\le f(x)\le M=f(\xi_2)\). Since \(f(a)=f(b)\) and \(m\ne M\), at least one of them lies in the interior \((a,b)\). There is a local extremum there, so by Fermat \(f'=0\). \(\blacksquare\)
Lagrange’s theorem
Geometrically: there is a point where the tangent is parallel to the secant through \(A(a,f(a))\) and \(B(b,f(b))\).
Proof of Lagrange’s theorem (the most common theory question)
Auxiliary function:
\(g\) is continuous on \([a,b]\) and differentiable on \((a,b)\) as a linear combination of such functions. We compute:
So Rolle’s theorem applies to \(g\): there is \(\xi\in(a,b)\) with \(g'(\xi)=0\):
Cauchy’s theorem
Proof of Cauchy’s theorem
Rolle for \(h\): \(h'(\xi)=f'(\xi)-\frac{f(b)-f(a)}{g(b)-g(a)}g'(\xi)=0\), which gives the claim. \(\blacksquare\)
A common mistake: writing \(b-a\) in the denominator of \(h(x)\). The correct one is \(g(b)-g(a)\), as above.
Recipe: “Check whether the theorem holds and find \(\xi\)”
- Continuity on \([a,b]\). Polynomials, \(e^x\), sin, cos are continuous everywhere. For a fraction: denominator ≠ 0. For \(\ln u\): \(u>0\) on the whole interval.
- Differentiability on \((a,b)\). Find \(f'\) and check that it exists everywhere in the interval. Traps: \(|x-a|\), \(\sqrt[3]{x^2}\).
- Rolle: check \(f(a)=f(b)\).
- Solve: Rolle \(f'(\xi)=0\); Lagrange \(f'(\xi)=\frac{f(b)-f(a)}{b-a}\); Cauchy \(\frac{f'(\xi)}{g'(\xi)}=\frac{f(b)-f(a)}{g(b)-g(a)}\).
- Keep only the \(\xi\) in the open interval and write a conclusion. If a condition fails, say which one.
Worked problems
1. Check the conditions of Rolle’s theorem: a) \(|x-2|\) on \([1,3]\); b) \(\sqrt[3]{x^2}\) on \([-1,1]\); c) \(\ln(\sin x)\) on \([\frac\pi6,\frac{5\pi}6]\)
a) \(f\) is continuous and \(f(1)=f(3)=1\). But \(|x-2|'=\begin{cases}1,&x>2\\-1,&x<2\end{cases}\); at \(x=2\in(1,3)\) the derivative does not exist. Condition 2) fails, Rolle does not apply.
b) \(f=x^{2/3}\) is continuous and \(f(-1)=f(1)=1\). But \(f'(x)=\frac{2}{3\sqrt[3]x}\) does not exist at \(x=0\). Condition 2) fails.
c) On \([\frac\pi6,\frac{5\pi}6]\) we have \(\sin x\ge\frac12>0\), so \(\ln(\sin x)\) is continuous. \(f'(x)=\frac{\cos x}{\sin x}=\cotx\) exists. \(f(\frac\pi6)=f(\frac{5\pi}6)=\ln\frac12\). The conditions hold; \(\cot\xi=0\Rightarrow\xi=\frac\pi2\).
2. Cauchy for \(f(x)=x^2+2x\), \(g(x)=x^3\) on \([-1,1]\)
Both are polynomials. \(f'(x)=2x+2\ne0\) on \((-1,1)\). \(f(1)-f(-1)=3-(-1)=4\), \(g(1)-g(-1)=2\).
\(\xi_1\approx0.768\) and \(\xi_2\approx-0.434\); both lie in \((-1,1)\).
3. Prove \(|\sin x-\sin y|\le|x-y|\) for all \(x,y\)
\(\sin\) is continuous and differentiable on \(\mathbb R\). Lagrange on \([x,y]\): there is \(\xi\) with
4. Prove \(|\arctanx_1-\arctanx_2|\le|x_1-x_2|\)
Lagrange for \(f=\arctanx\) on \([x_1,x_2]\):
5. For \(0<x_1<x_2\): \(\frac{x_2-x_1}{x_2}<\ln\frac{x_2}{x_1}<\frac{x_2-x_1}{x_1}\)
Lagrange for \(\ln x\) on \([x_1,x_2]\): \(\ln x_2-\ln x_1=\frac{1}{\xi}(x_2-x_1)\), \(x_1<\xi<x_2\). From \(\frac1{x_2}<\frac1\xi<\frac1{x_1}\), multiplying by \(x_2-x_1>0\), the claim follows. \(\blacksquare\)
6. For \(0<a<b\): \(na^{n-1}(b-a)<b^n-a^n<nb^{n-1}(b-a)\)
Lagrange for \(x^n\) on \([a,b]\): \(b^n-a^n=n\xi^{n-1}(b-a)\), \(a<\xi<b\). Since \(na^{n-1}<n\xi^{n-1}<nb^{n-1}\), multiply by \(b-a>0\). \(\blacksquare\)
7. If \(f'(x)=g'(x)\) on \((a,b)\), then \(f=g+C\)
\(h=f-g\) is continuous and differentiable, \(h'=0\). For any \(x_0,x\), by Lagrange: \(h(x)-h(x_0)=h'(\xi)(x-x_0)=0\). So \(h(x)=h(x_0)=C\), i.e. \(f(x)=g(x)+C\). \(\blacksquare\)
Main consequence: if \(f'=0\) on an interval, \(f\) is constant. Problems 8, 9 and 10 follow from this.
8. Prove \(\cos^2x+\sin^2x=1\) with derivatives
\(f(x)=1-\cos^2x-\sin^2x\). \(f'(x)=2\cos x\sin x-2\sin x\cos x=0\Rightarrow f=C\). \(f(0)=1-1-0=0\Rightarrow f\equiv0\). \(\blacksquare\)
9. Find all \(f:\mathbb R\to\mathbb R\) with \(f'=f\)
\(g(x)=\frac{f(x)}{e^x}\). \(g'(x)=\frac{f'(x)e^x-f(x)e^x}{e^{2x}}=\frac{f'(x)-f(x)}{e^x}=0\Rightarrow g=C\). \(f(x)=Ce^x\).
10. If \(f''+f=0\), then \(f=a\cos x+b\sin x\) and \(f\) is bounded
First: \(\frac{d}{dx}\big(f^2+(f')^2\big)=2ff'+2f'f''=2f'(f+f'')=0\), so \(f^2+(f')^2=K\). Hence \(|f|\le\sqrt K\): bounded.
Let \(a=f(0)\), \(b=f'(0)\) and \(g(x)=f(x)-a\cos x-b\sin x\). Then \(g''+g=0\), \(g(0)=0\), \(g'(0)=0\). By the first part \(g^2+(g')^2=\text{const}=g(0)^2+g'(0)^2=0\), so \(g\equiv0\). \(f(x)=a\cos x+b\sin x\).
11. Prove that \(3^x+4^x=5^x\) has exactly one solution
Divide by \(5^x\): \(\left(\frac35\right)^x+\left(\frac45\right)^x=1\). Let \(\varphi(x)=\left(\frac35\right)^x+\left(\frac45\right)^x-1\).
since \(\frac35,\frac45<1\Rightarrow\ln<0\). \(\varphi\) is strictly decreasing, so it has at most one zero. \(\varphi(2)=\frac9{25}+\frac{16}{25}-1=0\). The only solution is \(x=2\).
12. \(f(x)=a_1\cos x+a_2\cos2x+\dots+a_n\cos nx\) has a zero in \((0,\pi)\)
The trick: find a function whose derivative is \(f\). Since \((\sin kx)'=k\cos kx\):
\(g\) is continuous and differentiable, \(g(0)=\sum\frac{a_k}k\sin0=0\), \(g(\pi)=\sum\frac{a_k}k\sin k\pi=0\). By Rolle there is \(\xi\in(0,\pi)\) with \(g'(\xi)=f(\xi)=0\). \(\blacksquare\)
13. If the polynomial \(P\) has \(n+1\) zeros in \((a,b)\), then \(P^{(n)}\) has a zero
Let \(a<x_1<\dots<x_{n+1}<b\) be the zeros. The polynomial is continuous and differentiable. On each of the \(n\) intervals \([x_k,x_{k+1}]\) Rolle applies: \(P(x_k)=P(x_{k+1})=0\), so there is \(\xi_k\) with \(P'(\xi_k)=0\). So \(P'\) has at least \(n\) zeros. The same for \(P'\): \(P''\) has \(n-1\) zeros, …, \(P^{(n)}\) has at least one zero. \(\blacksquare\)
14. \(f(a)=a,\ f(b)=b\Rightarrow\) there are \(u<v\) with \(\frac1{f'(u)}+\frac1{f'(v)}=2\)
By the intermediate value theorem (Bolzano), there is \(\xi\in(a,b)\) with \(f(\xi)=\frac{a+b}2\). Lagrange on \([a,\xi]\) and \([\xi,b]\):
15. Monotonicity: if \(f'>0\) on \((a,b)\), \(f\) is increasing
For \(x_1<x_2\) in \((a,b)\), Lagrange: \(f(x_2)-f(x_1)=f'(\xi)(x_2-x_1)\). \(x_2-x_1>0\), so \(f(x_2)-f(x_1)\) has the same sign as \(f'(\xi)\). If \(f'>0\), then \(f(x_2)>f(x_1)\). \(\blacksquare\)
Extra exercises: finding \(\xi\)
- Rolle \(x^2-6x+5\), \([1,5]\): \(\xi=3\)
- Rolle \(x^3-4x\), \([-2,2]\): \(\xi=\pm\frac2{\sqrt3}\)
- Lagrange \(x^3\), \([0,2]\): \(3\xi^2=4\), \(\xi=\frac2{\sqrt3}\)
- Lagrange \(\ln x\), \([1,e]\): \(\xi=e-1\)
- Lagrange \(\sqrt x\), \([1,4]\): \(\xi=\frac94\)
- Cauchy \(f=x^2,\ g=x^3\), \([1,2]\): \(\frac{2}{3\xi}=\frac37\), \(\xi=\frac{14}9\)
L’Hôpital’s rules
Indeterminate forms: \(\frac00,\ \frac\infty\infty,\ \infty-\infty,\ 0\cdot\infty,\ 1^\infty,\ 0^0,\ \infty^0\).
Second rule (\(\frac\infty\infty\)): \(f,g\) differentiable on \((a,b)\setminus\{x_0\}\), \(g'\ne0\), \(\lim f=\lim g=\infty\). If \(\lim\frac{f'}{g'}=L\), then \(\lim\frac fg=L\).
Both also hold for \(x_0=\pm\infty\).
Differentiate the numerator and the denominator separately, not the quotient. Before each use, write the type above the equals sign.
Proof of the first rule
There is \(\delta>0\) with \([x_0-\delta,x_0]\subseteq[a,b]\). There \(f,g\) satisfy the conditions of Cauchy’s theorem:
When \(\delta\to0\), also \(\xi\to x_0\). With \(x=x_0-\delta\) we get \(\lim\limits_{x\to x_0^-}\frac fg=\lim\frac{f'}{g'}\). Similarly on \([x_0,x_0+\delta]\) for the right-hand limit. Both one-sided limits equal \(L\). \(\blacksquare\)
For \(x_0=\pm\infty\): substitute \(t=\frac1x\to0^+\):
Proof of the second rule (\(\frac\infty\infty\))
Take a point \(x_1\) close to \(x_0\). By Cauchy on \([x_1,x]\):
So \(\lim\frac fg=L\). \(\blacksquare\)
Table: how each type reduces to \(\frac00\) or \(\frac\infty\infty\)
| Type | What to do |
|---|---|
| \(\frac00,\ \frac\infty\infty\) | L’Hôpital directly, possibly several times |
| \(0\cdot\infty\) | \(f\cdot g=\dfrac{f}{1/g}\). Keep the logarithm on top: \(x\ln x=\frac{\ln x}{1/x}\) |
| \(\infty-\infty\) | Common denominator |
| \(1^\infty,\ 0^0,\ \infty^0\) | \(\lim f^g=e^{\lim g\ln f}\). At the end, put the \(e^{\dots}\) back! |
5 worked examples
(1) \(\lim\limits_{x\to0}\frac{\sin4x}{2x-\sin3x}\)
(2) \(\lim\limits_{x\to0}\frac{x\sin x}{\cos x-1}\)
(3) \(\lim\limits_{x\to\frac\pi2}\frac{\cotx}{\cot3x}\)
(4) \(\lim\limits_{x\to2}\frac{\ln(x^2-3)}{x^2+3x-10}\)
(5) \(\lim\limits_{x\to1}\left(\frac1{x-1}-\frac1{\ln x}\right)\) (type \(\infty-\infty\))
“Prove that” problems
3. Prove \(\lim\limits_{x\to\infty}\frac{x^n}{e^x}=0\) for every \(n\in\mathbb N\)
Type \(\frac\infty\infty\). We apply L’Hôpital \(n\) times; each time the power of \(x\) drops by 1:
Rigorously, by induction: \(n=1\): \(\lim\frac x{e^x}=\lim\frac1{e^x}=0\). If it holds for \(n=k\), then for \(k+1\): \(\lim\frac{x^{k+1}}{e^x}=(k+1)\lim\frac{x^k}{e^x}=(k+1)\cdot0=0\). \(\blacksquare\)
4. Prove \(\lim\limits_{x\to\infty}\frac{\ln x}{x^n}=0\)
Takeaway: \(\ln x\ll x^n\ll e^x\) as \(x\to\infty\). You also use this for asymptotes.
1. \(f''(x_0)=\lim\limits_{h\to0}\frac{f(x_0+h)-2f(x_0)+f(x_0-h)}{h^2}\)
Type \(\frac00\), L’Hôpital with respect to \(h\):
The trick is “add and subtract \(f'(x_0)\)” to get two definitions of the derivative. Careful: the numerator has \(-2f(x_0)\).
2. If \(\lim\limits_{x\to\infty}\big(f(x)+2\sqrt x\,f'(x)\big)=0\), then \(\lim f(x)=0\)
The trick: multiply and divide by \(e^{\sqrt x}\). The denominator tends to \(\infty\), so we apply L’Hôpital:
Extra problems
\(\lim\limits_{x\to0}(\cotx-\frac1x)\)
\(=\frac{x\cos x-\sin x}{x\sin x}\to\frac{-x\sin x}{\sin x+x\cos x}\to\frac{-\sin x-x\cos x}{2\cos x-x\sin x}\). 0
\(\lim\limits_{x\to\frac\pi2^-}(\tanx)^{\sin2x}\)
\(\sin2x=\frac{2t}{1+t^2}\), \(t=\tanx\to\infty\): \(\lim\frac{2t\ln t}{1+t^2}=0\). \(e^0=1\)
\(\lim\limits_{x\to1}x^{\frac1{x-1}}\)
\(e^{\lim\frac{\ln x}{x-1}}=e^1\). \(e\)
\(\lim\limits_{x\to\frac\pi4}(\tanx)^{\tan2x}\)
\(\lim_{t\to1}\frac{2t\ln t}{1-t^2}\to\frac{2\ln t+2}{-2t}=-1\). \(\frac1e\)
Exercise: \(\lim\limits_{x\to0}\frac{x-\sin x}{x^3}\)
\(\to\frac{1-\cos x}{3x^2}\to\frac{\sin x}{6x}\to\frac{\cos x}6\). \(\frac16\)
Exercise: \(\lim\limits_{x\to0}(\cos x)^{1/x^2}\)
\(e^{\lim\frac{\ln\cos x}{x^2}}\), \(\to\frac{-\tanx}{2x}\to-\frac12\). \(\frac1{\sqrt e}\)
Exercise: \(\lim\limits_{x\to0^+}x\ln x\)
\(\frac{\ln x}{1/x}\to\frac{1/x}{-1/x^2}=-x\). 0
Exercise: \(\lim\limits_{x\to\infty}(1+\frac3x)^x\)
\(e^{\lim x\ln(1+3/x)}=e^3\). \(e^3\)
Curve sketching
Recipe (7 steps)
- Domain \(D_f\). Denominator ≠ 0; even root ≥ 0; \(\ln u\): \(u>0\).
- Zeros and sign. \(f(x)=0\) and the \(y\)-intercept \(f(0)\). A sign table for \(f\).
- Asymptotes. Vertical \(x=a\) if \(\lim\limits_{x\to a^\pm}f=\pm\infty\). Horizontal \(y=b\) if \(\lim\limits_{x\to\pm\infty}f=b\). Oblique \(y=kx+n\): \(k=\lim\frac fx\), \(n=\lim(f-kx)\).
- Parity. \(f(-x)=f(x)\) even, \(f(-x)=-f(x)\) odd.
- First derivative: stationary points (\(f'=0\)), intervals of monotonicity (sign of \(f'\)), local extrema.
- Second derivative: \(f''>0\) convex \(\cup\), \(f''<0\) concave \(\cap\); inflection points where \(f''\) changes sign.
- Graph. Asymptotes dashed, then the points, then the curve following the tables.
Find the sign of \(f'\) like this: \(\operatorname{sgn}f'(x)\) is the sign of the factors that can be negative. E.g. \(\operatorname{sgn}\frac{-2x}{(x-1)^3}=\operatorname{sgn}\frac{-x}{x-1}\), since \((x-1)^2>0\).
Theory
Nature of stationary points (table)
| sign of \(f'\) left → right | + → − | − → + | + → + | − → − |
|---|---|---|---|---|
| nature | local max | local min | inflection | inflection |
\(f(x)=x^3-3x\): \(f'=3x^2-3=0\Rightarrow x=\pm1\). Increasing on \((-\infty,-1)\cup(1,\infty)\), decreasing on \((-1,1)\). Max \((-1,2)\), min \((1,-2)\).
\(f(x)=\sqrt{2x-x^2}\): \(D_f=[0,2]\), \(f'=\frac{1-x}{\sqrt{2x-x^2}}\). Increasing on \((0,1)\), decreasing on \((1,2)\), max \((1,1)\). The graph is the upper half of the circle \((x-1)^2+y^2=1\).
Convexity and inflection
Definition: \(f\) is convex on \((\alpha,\beta)\) if for all \(x_1,x_2\) and \(\lambda\in[0,1]\):
The chord lies above the curve. With \(\ge\) it is concave. Theorem: \(f''>0\Rightarrow\cup\), \(f''<0\Rightarrow\cap\).
Inflection rule: if \(f'(x_0)=f''(x_0)=0\) and \(f'''(x_0)\ne0\), there is an inflection at \(x_0\). Example \(x^3\): \(f'(0)=f''(0)=0\), \(f'''=6\ne0\).
Fully worked functions
\(y=\dfrac{2x-1}{(x-1)^2}\)
1. Domain, zeros, sign
\(D_f=\mathbb R\setminus\{1\}\). Neither even nor odd. Zero: \(2x-1=0\Rightarrow A(\frac12,0)\). \(y\)-intercept: \(B(0,-1)\). \(y>0\iff x>\frac12\) (\(x\ne1\)).
2. Asymptotes
\(\lim\limits_{x\to\pm\infty}y=0\Rightarrow y=0\) horizontal. \(\lim\limits_{x\to1^\pm}y=\frac{1}{0^+}=+\infty\Rightarrow x=1\) vertical.
3. First derivative
\(y'=0\Rightarrow x=0\). \(y'>0\iff\frac{x}{x-1}<0\iff x\in(0,1)\). Decreasing on \((-\infty,0)\cup(1,\infty)\). Local minimum \((0,-1)\).
4. Second derivative
\(y''=0\Rightarrow x=-\frac12\). Concave for \(x<-\frac12\), convex for \(x>-\frac12\). Inflection \(P(-\frac12,-\frac89)\).
\(y=e^{-1/x^2}\)
1. Domain, zeros, parity
\(D_f=\mathbb R\setminus\{0\}\). \(e^{(\dots)}>0\): no zeros. \(f(-x)=f(x)\): even.
2. Asymptotes
\(\lim\limits_{x\to0}e^{-1/x^2}=e^{-\infty}=0\). The limit is finite, so there is no vertical asymptote (the graph approaches \((0,0)\), but that point is not in \(D_f\)). \(\lim\limits_{x\to\pm\infty}e^{-1/x^2}=e^0=1\Rightarrow y=1\) horizontal.
3. First derivative
\(f'\ne0\). \(\operatorname{sgn}f'=\operatorname{sgn}x\): decreasing for \(x<0\), increasing for \(x>0\). No extrema (0 is not in \(D_f\)).
4. Second derivative
\(f''=0\iff x=\pm\sqrt{\frac23}\approx\pm0.82\). Convex on \((-\sqrt{\frac23},0)\cup(0,\sqrt{\frac23})\), concave outside. Inflection points \(\left(\pm\sqrt{\frac23},e^{-3/2}\right)\approx(\pm0.82;\ 0.22)\).
\(y=\dfrac{x}{x^2-1}\)
1. Domain, zeros, parity
\(D_f=\mathbb R\setminus\{\pm1\}\). Zero \(x=0\). \(f(-x)=-f(x)\): odd. Sign: \(+\) on \((-1,0)\cup(1,\infty)\), \(-\) on \((-\infty,-1)\cup(0,1)\).
2. Asymptotes
Vertical \(x=\pm1\). Horizontal \(y=0\) (\(\lim\limits_{x\to\pm\infty}\frac{x}{x^2-1}=0\)).
3. First derivative
\(f'=0\Rightarrow x^2=-1\), no real solution. No stationary points; the function is always decreasing.
4. Second derivative
\(f''=0\iff x=0\). Convex on \((-1,0)\cup(1,\infty)\), concave on \((-\infty,-1)\cup(0,1)\). Inflection \(O(0,0)\).
\(y=e^{-x^2}\)
\(D_f=\mathbb R\), even, no zeros, intercept \((0,1)\). No vertical asymptote; \(y=0\) horizontal on both sides.
\(f'=-2xe^{-x^2}\): increasing for \(x<0\), decreasing for \(x>0\). Maximum \((0,1)\).
\(f''=2e^{-x^2}(2x^2-1)=0\iff x=\pm\frac{\sqrt2}2\). Convex for \(|x|>\frac{\sqrt2}2\), concave in between. Inflections \(\left(\pm\frac{\sqrt2}2,\frac1{\sqrt e}\right)\).
\(y=\dfrac{x^3-1}{x^2+x-2}\)
1. Domain and simplification
\(x^2+x-2=(x-1)(x+2)\Rightarrow D_f=\mathbb R\setminus\{1,-2\}\). Since \(x^3-1=(x-1)(x^2+x+1)\):
This makes everything easier. Take the derivatives of the simplified form. At \(x=1\) the graph has a “hole” at \((1,1)\), not an asymptote.
2. Zeros and intercepts
\(x^2+x+1>0\) always, no zeros. \(y\)-intercept: \((0,\frac12)\).
3. Asymptotes
Vertical \(x=-2\) (\(\lim\limits_{x\to-2^\pm}y=\pm\infty\)). Oblique: \(k=1\), \(n=\lim(y-x)=-1\Rightarrow y=x-1\). No horizontal asymptote.
4. First derivative
Max \((-2-\sqrt3,\,-3-2\sqrt3)\approx(-3.73;\,-6.46)\), min \((-2+\sqrt3,\,-3+2\sqrt3)\approx(-0.27;\,0.46)\).
5. Second derivative
\(y''=\frac{6}{(x+2)^3}\): concave for \(x<-2\), convex for \(x>-2\). No inflection points.
\(y=x^2(2-x)^2\): extrema and convexity
\(y=x^4-4x^3+4x^2\), \(y'=4x^3-12x^2+8x=4x(x-1)(x-2)\).
Min \((0,0)\), max \((1,1)\), min \((2,0)\).
\(y''=12x^2-24x+8=4(3x^2-6x+2)=0\iff x=1\pm\frac{1}{\sqrt3}\approx0.42;\ 1.58\). Convex outside them, concave in between. Inflections \(\left(1\pm\frac1{\sqrt3},\frac49\right)\).
Prove that \(y=\ln(x^2-1)\) is concave
\(x^2-1>0\iff|x|>1\), so \(D_f=(-\infty,-1)\cup(1,\infty)\).
A common mistake: \(D_f=\mathbb R\setminus\{1\}\). That is wrong: the point \(x=0\), for example, is not in the domain.
\(y''<0\) on the whole \(D_f\), so the function is concave. \(\blacksquare\)
Problems a)–d) for practice
- a) \(\frac{x^3}{3x^2-4}\): odd; VA \(x=\pm\frac2{\sqrt3}\); oblique \(y=\frac x3\); \(y'=\frac{3x^2(x^2-4)}{(3x^2-4)^2}\): max \((-2,-1)\), min \((2,1)\); inflection \((0,0)\).
- b) \(\frac{x^3}{(x-1)^2}\): VA \(x=1\); oblique \(y=x+2\); \(y'=\frac{x^2(x-3)}{(x-1)^3}\): min \((3,\frac{27}4)\); \(y''=\frac{6x}{(x-1)^4}\): inflection \((0,0)\).
- c) \((1-x)e^x\): HA \(y=0\) as \(x\to-\infty\) (by L’Hôpital); \(y'=-xe^x\): max \((0,1)\); \(y''=-(x+1)e^x\): inflection \((-1,\frac2e)\).
- d) \(e^{-x^2/2}\): even; HA \(y=0\); max \((0,1)\); inflections \((\pm1,\frac1{\sqrt e})\).
Maclaurin and Taylor formula for polynomials
The idea: near \(x_0\) a function looks like its tangent: \(f(x_0+\Delta x)\approx f(x_0)+f'(x_0)\Delta x\). For a better fit we take a parabola, then a polynomial of higher degree, and require all derivatives at \(x_0\) to match.
The coefficients of a polynomial are “hidden” in its derivatives: \(P(0)=a_0\), \(P'(0)=a_1\), \(P''(0)=2!\,a_2\), …
A polynomial has no remainder. The expansion is exact and ends at the \(n\)-th power.
Recipe
- Write \(P, P', \dots, P^{(n)}\) one below the other.
- Evaluate them all at \(x_0\). Watch the signs when \(x_0\) is negative.
- Divide the \(k\)-th one by \(k!\) (1, 1, 2, 6, 24, 120).
- Check: the last coefficient must equal the leading coefficient of \(P\).
\(P(x)=x^4+2x^3-3x^2+4x+1\) in powers of \(x-2\)
| \(k\) | \(P^{(k)}(x)\) | \(P^{(k)}(2)\) | \(:k!\) |
|---|---|---|---|
| 0 | \(x^4+2x^3-3x^2+4x+1\) | 29 | 29 |
| 1 | \(4x^3+6x^2-6x+4\) | 48 | 48 |
| 2 | \(12x^2+12x-6\) | 66 | 33 |
| 3 | \(24x+12\) | 60 | 10 |
| 4 | \(24\) | 24 | 1 |
Check with Horner’s scheme (on scrap paper)
| coeff. | 1 | 2 | −3 | 4 | 1 |
|---|---|---|---|---|---|
| ÷(x−2) | 1 | 4 | 5 | 14 | 29 |
| ÷(x−2) | 1 | 6 | 17 | 48 | |
| ÷(x−2) | 1 | 8 | 33 | ||
| ÷(x−2) | 1 | 10 | |||
| 1 |
\(P(x)=x^5-15x^4+8x^3-13x+2\) around \(-1\)
| \(k\) | \(P^{(k)}(x)\) | \(P^{(k)}(-1)\) | \(:k!\) |
|---|---|---|---|
| 0 | \(x^5-15x^4+8x^3-13x+2\) | \(-9\) | −9 |
| 1 | \(5x^4-60x^3+24x^2-13\) | \(76\) | 76 |
| 2 | \(20x^3-180x^2+48x\) | \(-248\) | −124 |
| 3 | \(60x^2-360x+48\) | \(468\) | 78 |
| 4 | \(120x-360\) | \(-480\) | −20 |
| 5 | \(120\) | 120 | 1 |
\(P^{IV}(0)\), \(P^V(0)\) for \(2x^6-10x^5+7x^3-5x^2+4x+3\)
\(P^{(k)}(0)=k!\,a_k\). There is no \(x^4\): \(a_4=0\); \(a_5=-10\). \(P^{IV}(0)=0,\ P^V(0)=-1200\).
Exercise: \(x^3-2x+5\) in powers of \(x-1\)
\(4+(x-1)+3(x-1)^2+(x-1)^3\)
Exercise: \(x^4\) in powers of \(x+1\)
\((x+1)^4-4(x+1)^3+6(x+1)^2-4(x+1)+1\)
Taylor and Maclaurin formula for functions
Important: \(T_n^{(i)}(x_0)=f^{(i)}(x_0)\) for \(i=0,\dots,n\), i.e. the polynomial and the function have the same derivatives at \(x_0\). The point \(x_0+\theta(x-x_0)\) lies between \(x_0\) and \(x\). The error is \(|f(x)-T_n(x)|=|R_n(x)|\), and for a fixed \(x\) it gets smaller as \(n\) grows.
The remainder looks like “the next term”, except that the derivative is taken at an unknown point between \(x_0\) and \(x\), not at \(x_0\).
\(f(x)=x\arctanx\) up to third order at \(x_0=1\)
\(f(1)=1\cdot\arctan1=\frac\pi4\)
\(f'(x)=\arctanx+\frac{x}{1+x^2}\Rightarrow f'(1)=\frac\pi4+\frac12\)
\(f''(x)=\frac1{1+x^2}+\frac{(1+x^2)-2x^2}{(1+x^2)^2}=\frac{2}{(1+x^2)^2}\Rightarrow f''(1)=\frac12\)
\(f'''(x)=\frac{-8x}{(1+x^2)^3}\Rightarrow f'''(1)=-1\)
Expansion of \(e^x\) in a Maclaurin series
\((e^x)^{(n)}=e^x\), so \(f^{(n)}(0)=1\) for every \(n\):
For every fixed \(x\): \(|R_n(x)|=\frac{e^{\theta x}|x|^{n+1}}{(n+1)!}\xrightarrow[n\to\infty]{}0\) (the factorial grows faster than the power). Therefore
Table of Maclaurin expansions (learn by heart)
| Function | Expansion | Lagrange remainder |
|---|---|---|
| \(e^x\) | \(1+\frac{x}{1!}+\frac{x^2}{2!}+\dots+\frac{x^n}{n!}\) | \(\frac{e^{\theta x}}{(n+1)!}x^{n+1}\) |
| \(\sin x\) | \(x-\frac{x^3}{3!}+\frac{x^5}{5!}-\dots\) | \(f^{(n)}(x)=\sin(x+n\frac\pi2)\) |
| \(\cos x\) | \(1-\frac{x^2}{2!}+\frac{x^4}{4!}-\dots+(-1)^n\frac{x^{2n}}{(2n)!}\) | \(\frac{(-1)^{n+1}\cos\theta x}{(2n+2)!}x^{2n+2}\) |
| \(\ln(1+x)\) | \(x-\frac{x^2}{2}+\frac{x^3}{3}-\dots+(-1)^{n-1}\frac{x^n}{n}\) | \(\frac{(-1)^n x^{n+1}}{(n+1)(1+\theta x)^{n+1}}\) |
| \((1+x)^m\) | \(1+\frac{m}{1!}x+\frac{m(m-1)}{2!}x^2+\dots\) | \(\frac{m(m-1)\cdots(m-n)}{(n+1)!}(1+\theta x)^{m-n-1}x^{n+1}\) |
| \(a^x\) | \(1+\frac{\ln a}{1!}x+\frac{\ln^2a}{2!}x^2+\dots\) | \(\frac{a^{\theta x}\ln^{n+1}a}{(n+1)!}x^{n+1}\) |
Recipe: approximate calculation with an error estimate
- Recognise the function and the point: \(\sqrt e=e^{1/2}\) means \(e^x\) at \(x=\frac12\).
- Add up the terms up to the required degree.
- Estimate \(|R_n|\): replace the derivative at the unknown point with an upper bound (\(e^\theta<3\), \(|\sin|\le1\)).
- “Accurate to \(k\) decimal places” means \(|R_n|<0.5\cdot10^{-k}\).
\(\sqrt e\) and \(e\) with an error estimate
For \(e\) to 2 decimal places: \(\frac{3}{(n+1)!}<0.005\iff(n+1)!>600\Rightarrow n=5\): \(e\approx2.7167\approx2.72\).
\(\sqrt{1+x}\) and an approximation of \(\sqrt7\)
Do not put \(x=6\): the formula works for small \(|x|\). Trick: \(\sqrt7=3\sqrt{1-\frac29}\), \(x=-\frac29\):
To 3 decimal places: \(\sqrt7\approx2.646\).
The expansions of \(\cos x\), \(\ln(1+x)\), \((1+x)^m\), \(a^x\)
cos: \(f^{(k)}=\cos(x+k\frac\pi2)\), \(f^{(k)}(0)\): 1, 0, −1, 0, …
ln(1+x): \(f^{(k)}=\frac{(-1)^{k-1}(k-1)!}{(1+x)^k}\Rightarrow\frac{f^{(k)}(0)}{k!}=\frac{(-1)^{k-1}}{k}\).
(1+x)^m: \(f^{(k)}=m(m-1)\cdots(m-k+1)(1+x)^{m-k}\).
a^x: \(f^{(k)}=a^x\ln^ka\Rightarrow f^{(k)}(0)=\ln^ka\).
The remainders are in the table above.
Taylor also solves limits: \(\sin x=x-\frac{x^3}6+\dots\), so \(\lim\frac{x-\sin x}{x^3}=\frac16\), the same as applying L’Hôpital three times.
Practice test
One problem from each topic. Start a timer, no notes. Open the solutions at the end.
- (Rolle/Lagrange) a) Check whether \(f(x)=\sqrt[3]{(x-1)^2}\) satisfies the conditions of Rolle’s theorem on \([0,2]\). b) Use Lagrange to prove: \(\dfrac{x}{1+x}<\ln(1+x)<x\) for \(x>0\).
- (L’Hôpital) a) \(\lim\limits_{x\to0}\dfrac{e^x-e^{-x}-2x}{x-\sin x}\); b) \(\lim\limits_{x\to0^+}\left(\dfrac1x\right)^{\tanx}\).
- (Curve sketching) Investigate and sketch the graph of \(y=\dfrac{x^2}{x-1}\).
- (Polynomial) Expand \(P(x)=x^4-5x^3+x^2-3x+4\) in powers of \(x-4\).
- (Maclaurin) Approximate \(\cos0.2\) up to the term with \(x^4\) and estimate the error.
Solutions to the practice test
1.
a) It is continuous, \(f(0)=f(2)=1\), but \(f'(x)=\frac{2}{3\sqrt[3]{x-1}}\) does not exist at \(x=1\in(0,2)\). Condition 2) fails, Rolle does not apply.
b) Lagrange for \(\ln t\) on \([1,1+x]\): \(\ln(1+x)=\frac{x}{\xi}\), \(1<\xi<1+x\). From \(\frac1{1+x}<\frac1\xi<1\) it follows that \(\frac{x}{1+x}<\ln(1+x)<x\). \(\blacksquare\)
2.
a) \(\frac00\to\frac{e^x+e^{-x}-2}{1-\cos x}\to\frac{e^x-e^{-x}}{\sin x}\to\frac{e^x+e^{-x}}{\cos x}=\) 2.
b) \(\infty^0\): \(e^{\lim\tanx\cdot(-\ln x)}\), \(-\frac{\ln x}{\cotx}\to\frac{\sin^2x}{x}\to0\). \(e^0=1\).
3.
\(D_f=\mathbb R\setminus\{1\}\); intercept \(O(0,0)\). VA \(x=1\) (\(-\infty\) on the left, \(+\infty\) on the right). Oblique \(y=x+1\). \(y'=\frac{x(x-2)}{(x-1)^2}\): max \((0,0)\), min \((2,4)\). \(y''=\frac2{(x-1)^3}\): concave for \(x<1\), convex for \(x>1\), no inflection.
4.
\(P(x)=-56+21(x-4)+37(x-4)^2+11(x-4)^3+(x-4)^4\).
5.
\(\cos0.2\approx1-0.02+\frac{0.0016}{24}=\) 0.9800667, \(|R|\le\frac{0.2^6}{6!}\approx8.9\cdot10^{-8}\).
Everything on one page
Fermat · Rolle · Lagrange · Cauchy
Fermat: extremum at \(c\) + diff. ⇒ \(f'(c)=0\).
Rolle: cont. \([a,b]\), diff. \((a,b)\), \(f(a)=f(b)\) ⇒ \(f'(\xi)=0\).
Lagrange: \(f(b)-f(a)=f'(\xi)(b-a)\). Proof: \(g=f-\frac{f(b)-f(a)}{b-a}x\).
Cauchy: \(\frac{f'(\xi)}{g'(\xi)}=\frac{f(b)-f(a)}{g(b)-g(a)}\).
Inequalities: Lagrange + bound \(f'(\xi)\).
L’Hôpital
\(\frac00,\frac\infty\infty\): \(\lim\frac fg=\lim\frac{f'}{g'}\)
\(0\cdot\infty\to\frac{f}{1/g}\); \(\infty-\infty\to\) common denominator
\(1^\infty,0^0,\infty^0\): \(e^{\lim g\ln f}\)
\(\ln x\ll x^n\ll e^x\)
Curve sketching
\(D_f\) → zeros → asymptotes → parity → \(f'\) → \(f''\) → graph
Oblique: \(k=\lim\frac fx\), \(n=\lim(f-kx)\)
\(f''>0\ \cup\), \(f''<0\ \cap\)
Taylor
Polynomial: \(A_i=\frac{P^{(i)}(x_0)}{i!}\), no remainder.
In the test, give every step a heading, say which condition of the theorem you are checking, and always write the conclusion in words. Good luck!