The derivatives of sin, eˣ and ln x
Tonight's idea
Sine. On the unit circle, the point at angle \(\theta\) is \(P = (\cos\theta, \sin\theta)\). Increase the angle by a tiny \(d\theta\). The point slides to \(Q\) along an arc of length \(d\theta\) (radius 1, radians). For a tiny step the arc is straight, and perpendicular to the radius.
Turning the radius by \(90°\) turns its angle with the horizontal into an angle with the vertical. So the little right triangle at \(Q\) has angle \(\theta\), hypotenuse \(d\theta\), and vertical side \(\cos\theta\,d\theta\). That vertical side is the change in \(\sin\theta\):
\(\dfrac{d}{d\theta}\sin\theta = \cos\theta\), and reading the horizontal side, \(\dfrac{d}{d\theta}\cos\theta = -\sin\theta\) (the point moves left).
The exponential. \(e\) was chosen (grade 10) as the base for which \(b^x\) has slope exactly 1 at \(x = 0\): \((e^h - 1)/h \to 1\). Everywhere else is a copy of that:
\[\frac{e^{x+h} - e^x}{h} = e^x \cdot \frac{e^h - 1}{h} \;\to\; e^x \cdot 1.\]
The logarithm. \(\ln x\) is the inverse of \(e^x\): \(e^{\ln x} = x\). Differentiate both sides with the chain rule: \(e^{\ln x} \cdot (\ln x)' = 1\). But \(e^{\ln x}\) is just \(x\), so \((\ln x)' = 1/x\).
\((e^x)' = e^x\), \(\;(\ln x)' = \dfrac1x\). Three functions, three reasons: a triangle, a definition, an inverse.
Watch one: two chains
\(y = e^{2x}\sin x\) is a product. By the product rule, with the chain rule on \(e^{2x}\):
\[y' = 2e^{2x}\sin x + e^{2x}\cos x = e^{2x}(2\sin x + \cos x).\]
\(y = \ln(\cos x)\) is a chain: outer \(\ln u\), inner \(u = \cos x\). So \(y' = \dfrac{1}{\cos x}\cdot(-\sin x) = -\tan x\). Check at \(x = 0\): \(\cos x\) is flat there, so \(\ln(\cos x)\) should be too, and \(-\tan 0 = 0\). If you forget a derivative, go back to the triangle, the definition or the inverse.
Drag the point round the unit circle and watch \(\sin\theta\) rise fastest where \(\cos\theta = 1\): mathdetours.com/demos/unitcircle.html.
Your turn
- Differentiate: (a) \(\sin 3x\); (b) \(\cos(x^2)\); (c) \(e^{-x}\); (d) \(\ln(5x)\). For (d), explain the answer using \(\ln(5x) = \ln 5 + \ln x\).
- Write \(\tan x = \sin x \cdot (\cos x)^{-1}\). Use the product rule and the chain rule to show \((\tan x)' = 1 + \tan^2 x = 1/\cos^2 x\).
- Write \(2^x\) as \(e^{x \ln 2}\) and differentiate it. What is the slope of \(y = 2^x\) at \(x = 0\), to three decimals? Then give the general formula for \((a^x)'\).
- (a) Use \(\cos x = \sin\!\left(\tfrac{\pi}{2} - x\right)\) and the chain rule to derive \((\cos x)' = -\sin x\) from \((\sin x)' = \cos x\). (b) Show that \(y = \sin x\) and \(y = \cos x\) both satisfy \(y'' = -y\), where \(y''\) is the derivative of the derivative. Where is each graph curving downwards?
Stretch: the tangent that stays below
Let \(f(x) = e^x - 1 - x\). Find \(f'(x)\) and where it is zero, and argue that \(f\) is smallest there. Conclude that \(e^x \ge 1 + x\) for every \(x\). Then put \(x = 1/n\) and show \(\left(1 + \tfrac1n\right)^n \lt e\) for every whole number \(n \ge 1\).
Answers
- (a) \(3\cos 3x\). (b) \(-2x\sin(x^2)\). (c) \(-e^{-x}\). (d) \(\dfrac{1}{5x} \cdot 5 = \dfrac1x\): adding the constant \(\ln 5\) shifts the graph up without changing any slope.
- \(\cos x \cdot (\cos x)^{-1} + \sin x \cdot \big(-(\cos x)^{-2}\big)(-\sin x) = 1 + \dfrac{\sin^2 x}{\cos^2 x} = 1 + \tan^2 x\), and \(1 + \tan^2 x = \dfrac{\cos^2 x + \sin^2 x}{\cos^2 x} = \dfrac{1}{\cos^2 x}\).
- \((e^{x\ln 2})' = e^{x \ln 2} \cdot \ln 2 = 2^x \ln 2\). At \(x = 0\) the slope is \(\ln 2 \approx 0.693\), the number quoted in the grade 10 sheet on \(e\). In general \((a^x)' = a^x \ln a\), which is why \(e\) is the convenient base: \(\ln e = 1\).
- (a) Outer \(\sin u\), inner \(u = \tfrac{\pi}{2} - x\) with \(u' = -1\): \((\cos x)' = \cos\!\left(\tfrac{\pi}{2} - x\right)\cdot(-1) = -\sin x\). (b) \((\sin x)'' = (\cos x)' = -\sin x\); \((\cos x)'' = (-\sin x)' = -\cos x\). Each graph curves downwards exactly where it is positive and upwards where it is negative: always bending back towards the axis, which is why it oscillates.
Stretch. \(f'(x) = e^x - 1\), zero only at \(x = 0\). For \(x \lt 0\), \(e^x \lt 1\) so \(f' \lt 0\): falling. For \(x > 0\), \(f' > 0\): rising. So \(f(0) = 0\) is the smallest value, and \(e^x \ge 1 + x\) with equality only at 0: the curve sits above its tangent at 0. With \(x = 1/n > 0\): \(e^{1/n} > 1 + \tfrac1n\). Both sides are positive, so raise to the power \(n\): \(e > \left(1 + \tfrac1n\right)^n\).