\(\renewcommand {\hspace }{\ifstar \LWRorighspace \LWRorighspace }\) \(\def \o {\unicode {x00F8}}\) \(\def \l {\unicode {x0142}}\) \(\renewcommand {\ref }{\ifstar \LWRref \LWRref }\) \(\require {textcomp}\) \(\newcommand {\RR }{\mathbb {R}} \) \(\renewcommand {\qedhere }{} \) \(\def\alpha{\unicode{x1D6FC}}\) \(\def\beta{\unicode{x1D6FD}}\) \(\def\pi{\unicode{x1D70B}}\)

Week 5 Differentiating \(\ln ,\) \(x^b,\) \(\sin \) and \(\cos \)

Version 2025/02/26 Week 5 in PDF All notes in PDF To other weeks

We start this chapter by differentiating \(\ln (x),\) the natural logarithm function. Since we introduced \(\ln \) as the inverse function of \(e^x,\) we will need the following result.

The Inverse Rule of differentiation

Theorem 5.1: The Inverse Rule.

Let \(f (x)\) be strictly monotonic and continuous on \([a, b],\) and let \(g\) be the inverse of \(f\) so that \(g\) is strictly monotonic and continuous by the Inverse Function Theorem.

Suppose \(f\) is differentiable at \(\ell \in (a,b)\) and that the derivative \(f'(\ell )\) is not zero.

Then \(g\) is differentiable at \(k=f(\ell ),\) and \(g'(k) = \dfrac 1{f'(\ell )}.\)

  • Proof. We begin in the same way as in the proof of the Chain Rule: using Proposition 4.6, write \(f(x)-f(\ell ) = F_\ell (x) (x-\ell )\) for all \(x\) and in particular for \(x=g(y),\) so

    \[ f(g(y)) - f(g(k)) = F_\ell (g(y)) (g(y) - g(k)). \]

    Since \(f\) and \(g\) are inverse to each other, \(f(g(y))=y,\) so

    \[ y-k = F_\ell (g(y))(g(y)-g(k)). \]

    When \(y\ne k,\) we have \(y-k\ne 0,\) and the equation shows that \(F_\ell (g(y))\ne 0\) (because the left-hand side is not \(0\)). When \(y=k,\) we have \(F_\ell (g(y)) = F_\ell (\ell ) = f'(\ell )\) which is not \(0\) by assumption. Hence \(F_\ell (g(y))\) is never zero, and we can divide by it:

    \[ \frac {1}{F_\ell (g(y))}(y-k) = g(y) - g(k). \]

    Since \(\frac {1}{F_\ell (g(y))}\) is continuous at \(y=k\) by Algebra of Continuous Functions and continuity of composition, by Proposition 4.6 \(g(y)\) is differentiable at \(k\) with

    \[ \frac {1}{F_\ell (g(k))} = \frac {1}{F_\ell (\ell )} = \frac 1{f'(\ell )} \]

    as derivative.

We immediately deduce

Corollary 5.2: inverse of a function differentiable on an interval.

If \(f\) is strictly monotone and differentiable on an open interval, its inverse function \(f^{-1}\) is differentiable everywhere it is defined except the points \(f(\ell )\) with \(f'(\ell )=0,\) and

\begin{equation*} \frac {d(f^{-1})}{dy}(y) = \frac 1{\dfrac {df}{dx}(f^{-1}(y))}. \quad \text {\qed } \end{equation*}

Can the derivative of a strictly increasing function be zero at some points? Yes:

Example: a point where the inverse to a monotone function is not differentiable.

Construct a continuous strictly increasing function \(f(x)\) such that \(f'(\ell )=0\) for some point \(\ell .\) Check that \(f^{-1}\) is not differentiable at \(f(\ell )\) in your example.

Solution: for example, \(f(x)=x^3\) and \(\ell =0.\) We have \(f'(0)=0.\) For the inverse function \(\sqrt [3]y,\) the limit \(\lim \limits _{y\to 0}\dfrac {\sqrt [3]{\vphantom {0}y}-\sqrt [3]{\vphantom {y}0}}{y-0} =\lim \limits _{y\to 0}\dfrac 1{(\sqrt [3]y)^2}\) is \(\infty .\) This suggests “infinite derivative” at \(0,\) yet formally means that \(\sqrt [3]y\) is not differentiable at \(0.\) Figure 5.1 shows horizontal tangent to the graph of \(x^3,\) and vertical tangent for \(\sqrt [3]{x},\) at \((0,0).\)

(-tikz- diagram)

Figure 5.1: \(x^3\) has zero derivative at \(0,\) the inverse function is not differentiable at \(0\)

Corollary: derivative of \(\ln \).

\(\dfrac {d}{dy} \ln (y)=\dfrac 1y\) for all \(y\in (0,+\infty ).\)

Indeed, \(\ln \) is the inverse function to \(\exp ,\) so, using the Inverse Rule and the Theorem which says that \(\exp '=\exp ,\) we calculate

\[ \ln '(y) = \frac {1}{\exp '(\ln (y))}=\frac {1}{\exp (\ln (y))} =\frac 1y. \]

Functions \(x^b\) and \(a^x\)

Definition: \(a^b\).

For positive real \(a\) and real \(b\) we define

\[ a^b = e^{b \ln a}. \]

Remark: this satisfies the exponent laws \(a^{b+c}=a^b a^c,\) \((ac)^b=a^b c^b,\) \(a^0=1\) and \(a^{-b}=1/a^b\) (exercise: deduce these from the properties of the functions \(\ln \) and \(\exp \)). In particular, \(a^n\) defined as \(a\cdot a\cdot \ldots \cdot a\) (\(n\) factors) coincides with \(e^{n \ln a}.\)

Example: derivative of \(x^b\).

Fix \(b\in \RR .\) The function \(x^b\) is defined for positive \(x.\) Show that

\[ \frac {d}{dx}(x^b)=bx^{b-1}. \]

Solution. Indeed, by Chain Rule \(\frac {d}{dx}(x^b) = \frac {d}{dx}(\exp (b\ln (x)) = \exp '(b\ln (x))\cdot b\ln '(x).\) Using the derivatives of \(\exp (x)\) and of \(\ln (x)\) obtained earlier, this is \(\exp (b \ln (x)) \cdot bx^{-1} = x^b \cdot bx^{-1} = bx^{b-1}\) where we use the exponent laws.

Exercise. Let \(a>0.\) Use the Chain Rule to show that \(\frac d{dx} (a^x) = a^x \ln a.\)

The limit definition of \(e^x\) (optional material)

The section “The limit definition of \(e^x\)” was not covered in class and is not examinable.

Although in this course we define \(e^x\) as the sum \(\sum _{k\ge 0}x^k/k!,\) originally it was defined via the following limit.

Proposition 5.3: the limit definition for \(e^x\) (not examinable).

For all \(x\in \RR ,\) \(e^x=\lim _{n\to \infty }(1+\frac xn)^n.\) In particular, \(e=\lim _{n\to \infty }(1+\frac 1n)^n.\)

  • Proof. The function \(\ln (1+y)\) is differentiable (by Chain Rule), and its derivative at \(y=0\) is \(\frac 1{1+0}=1.\) By Proposition 4.6 we can write \(\ln (1+y) = F_0(y)y\) where the slope function \(F_0\) is continuous at \(0\) with \(F_0(0)=1.\) Then for a fixed \(x\in \RR ,\)

    \[ \Bigl ( 1+\frac xn\Bigr )^n = e^{n \ln (1+\frac xn)} = e^{n F_0(\frac xn)\frac xn} = e^{F_0(\frac xn)x}. \]

    The sequence \(y_n = \frac xn\) is monotone with limit \(0\) so Lemma 1.1 and its Corollary tell us that \(\lim _{n\to \infty } e^{F_0(y_n)x}\) is \(\lim _{y\to 0} e^{F_0(y)x}.\) Since \(e^{F_0(y)x}\) is a continuous function of \(y,\) by criterion of continuity its limit as \(y\to 0\) equals its value at \(0,\) which is \(e^{F_0(0)x} = e^{1\cdot x}=e^x.\)

End of the non-examinable section.

The functions \(\sin \) and \(\cos \)

In this course, \(\sin \alpha \) and \(\cos \alpha \) are defined as the ratio of sides in a right-angled triangle. Thus, if \(P_\alpha \) is the point on the unit circle centred at the origin \(O\) such that the angle between the \(x\) axis and \(OP_\alpha \) is \(\alpha ,\) then \(P_\alpha \) has coordinates \((\cos \alpha , \sin \alpha ).\) This defines the sine and cosine of all \(\alpha \in \RR ,\) see Fig. 5.2. Note that \(\alpha \) is in radians: the angle equal to the full revolution (full circle) is \(2\pi .\) The definition implies that for all \(\alpha \in \RR ,\)

\[ \cos (-\alpha )=\cos \alpha , \ \sin (-\alpha )=-\sin \alpha ,\ \cos \alpha =\sin \bigl (\frac \pi 2-\alpha \bigr ). \]

We also define \(\tan \alpha =\dfrac {\sin \alpha }{\cos \alpha }\) whenever \(\cos \alpha \ne 0.\) When \(\alpha \in (-\frac \pi 2,\frac \pi 2),\) the straight line \(OP_\alpha \) intersects the tangent to the circle at \(P_0\) at the point \(T_\alpha (1,\tan \alpha ),\) see Fig. 5.2.

(-tikz- diagram)

Figure 5.2: definition of \(\sin \alpha ,\) \(\cos \alpha \) and \(\tan \alpha \)

Lemma 5.4: the sine-angle-tangent inequality.

\(0\le \sin \alpha \le \alpha \le \tan \alpha \) for all \(\alpha \in (0,\frac \pi 2).\)

  • Proof. In Fig. 5.2, area(\(\triangle OP_0P_\alpha \)) \(=\) \(\frac 12\) \(\times \) base \(\times \) height \(=\frac 12\times 1 \times \sin \alpha = \frac 12 \sin \alpha .\)

    The area of the sector \(OP_0P_\alpha \) with central angle \(\alpha \) is \(\frac \alpha {2\pi }\) \(\times \) area(circle) \(=\) \(\frac \alpha {2\pi }\times \pi =\frac 12\alpha .\)

    Area(\(\triangle O P_0 T_\alpha \)) is \(\frac 12 \times 1 \times \tan \alpha .\) We have \(\triangle OP_0P_\alpha \) \(\subseteq \) sector \(OP_0P_\alpha \) \(\subseteq \) \(\triangle OP_0T_\alpha ,\) therefore \(\frac 12\sin \alpha \le \frac 12\alpha \le \frac 12\tan \alpha .\)

Remark. Graphs in Fig. 5.3 illustrate the behaviour of \(\sin x,\) \(x\) and \(\tan x\) for small \(x.\)

(-tikz- diagram)

Figure 5.3: graphs of \(\sin x,\) \(x\) and \(\tan x\) for small \(x\)

Corollary 5.5: limit of sine at \(0\).

\(\lim _{x\to 0}|\sin x|=0.\)

  • Proof.

    The inequality in Lemma 5.4 can be written as \(0\le |\sin x| \le x\) when \(x\in (0,\frac \pi 2),\) as \(\sin x\) is positive for these \(x.\) Since \(\lim _{x\to 0+} 0 = \lim _{x\to 0+}x = 0,\) we have \(\lim _{x\to 0+} |\sin x| =0\) by Sandwich Rule.

    Putting \(t=-x,\) we have \(\lim _{x\to 0-} |\sin x| = \lim _{t\to 0+}|\sin (-t)| = \lim _{t\to 0+}|\sin t| = 0.\)

    The one-sided limits exist and are equal, so \(\lim _{x\to 0}|\sin x|\) is their common value \(0.\)

We need another result about \(\sin \) and \(\cos \) with a geometric proof.

Lemma 5.6: sine and cosine subtraction formulas.

i. \(\sin y-\sin x=2\sin (\frac {y-x}2)\cos (\frac {y+x}2);\)
ii. \(\cos y-\cos x=-2\sin (\frac {y-x}2)\sin (\frac {y+x}2).\)

(-tikz- diagram)

Figure 5.4: proof of the sine addition formula for \(\sin \alpha +\sin \beta \)

  • Proof of Lemma 5.6 — proof not examinable. If \(M\) is the midpoint of the segment \(P_\alpha P_\beta ,\) the vector \(\overrightarrow {OM}\) is \(\frac 12(\overrightarrow {OP}_\alpha +\overrightarrow {OP}_\beta )\) and so the \(y\)-coordinate of \(M\) is \(\frac 12(\sin \alpha +\sin \beta ).\) On the other hand, see Fig. 5.4, \(\overrightarrow {OM}\) is proportional to \(\overrightarrow {OP}_{(\alpha +\beta )/2}\) and, from the right-angled triangle \(\triangle OMP_\beta \) we can see that \(\overrightarrow {OM} = \cos (\frac {\alpha -\beta }2)\overrightarrow {OP}_{(\alpha +\beta )/2}.\) This expresses the \(y\)-coordinate of \(M\) via the \(y\)-coordinate of \(P_{(\alpha +\beta )/2}:\)

    \[ \frac 12(\sin \alpha +\sin \beta ) = \cos (\tfrac {\alpha -\beta }2) \sin (\tfrac {\alpha +\beta }2). \]

    This sine addition formula holds for all \(\alpha ,\beta \in \RR .\) Substitute \(\alpha =y,\) \(\beta =-x\) to obtain the sine subtraction formula i. as claimed.

    Substitute \(\alpha =\frac \pi 2-y,\) \(\beta =x-\frac \pi 2:\) the LHS becomes \(\frac 12(\sin (\frac \pi 2-y)-\sin (\frac \pi 2-x))\) which is \(\frac 12(\cos y-\cos x),\) the RHS becomes \(\cos (\frac \pi 2-\frac {y+x}{2})\sin (\frac {-y+x}2)=-\sin (\frac {y+x}2)\sin (\frac {y-x}2),\) equivalent to the cosine subtraction formula ii.

Proposition 5.7: continuity of \(\sin \) and \(\cos \).

\(\sin x\) and \(\cos x\) are continuous functions on \(\RR .\)

  • Proof. In the sine subtraction formula (Lemma 5.6), we bound the modulus of \(\cos \) by \(1:\)

    \[ |\sin y - \sin x| = 2 \left |\sin \tfrac {y-x}2\right | \left |\cos \tfrac {y+x}2\right | \le 2 |\sin h|, \]

    where we put \(h=(y-x)/2.\) Opening out the modulus, we get

    \[ -2|\sin h| \le \sin y - \sin x \le 2|\sin h|. \]

    Taking the limit as \(y\to x,\) equivalently \(h\to 0,\) we have \(\lim _{h\to 0} 2|\sin h|=0\) by Corollary 5.5. Hence by Sandwich Rule

    \[ \lim _{y\to x} \sin (y)-\sin (x) = 0 \quad \Leftrightarrow \quad \lim _{y\to x} \sin (y) =\sin (x), \]

    so by the criterion of continuity, \(\sin \) is continuous at \(x.\)

    Continuity of \(\cos \) is proved similarly and is left to the student.

Comparing the graphs of \(\sin x\) and \(x\) in Fig. 5.3, we suspect that these two functions have the same gradient at \(0.\) Let us formalise this.

Proposition 5.8: special limit for sine.

\(\lim _{x\to 0}\dfrac {\sin x}{x}=1.\)

  • Proof. We compute the one-sided limits. If \(x\in (0,\frac \pi 2),\) we have

    \[ \cos x = \frac {\sin x}{\tan x} \le \frac {\sin x}{x} \le \frac {\sin x}{\sin x}=1 \]

    from the sine-angle-tangent inequality in Lemma 5.4. As \(x\to 0+,\) \(\cos x\to \cos 0=1\) because \(\cos \) is a continuous function. Hence by Sandwich Rule \(\lim _{x\to 0+}\frac {\sin x}x =1.\)

    In \(\lim _{x\to 0-}\frac {\sin x} x,\) change the variable, \(x=-y.\) The limit becomes \(\lim _{y\to 0+}\frac {\sin (-y)}{-y}=\lim _{y\to 0+}\frac {\sin y} y=1.\)

    Both one-sided limits are equal to \(1,\) so \(\lim _{x\to 0}\frac {\sin x}{x}\) exists and equals \(1,\) as claimed.

Theorem 5.9: differentiation of \(\sin \) and \(\cos \).

Functions \(\sin x\) and \(\cos x\) are differentiable everywhere on \(\RR ,\) and

\[ \sin ' x = \cos x, \qquad \cos ' x = -\sin x. \]

  • Proof. Use the sine subtraction formula to write \(\sin y-\sin x =2\sin h \cos (x+ h)\) with \(h=(y-x)/2.\) Then

    \[ \frac {\sin y-\sin x}{y-x} = \frac {2\sin h\cos (x+h)}{2h} = \frac {\sin h}{h} \cos (x+h), \]

    and so

    \[ \sin ' x = \lim _{h\to 0} \frac {\sin h}{h} \times \lim _{h\to 0} \cos (x+h) = 1\times \cos (x+0) =\cos x \]

    by AoL, the Special Limit for sine and continuity of \(\cos .\)

    To differentiate \(\cos ,\) use \(\cos y -\cos x = -2 \sin h \sin (x+ h)\) and conclude similarly.

Version 2025/02/26 Week 5 in PDF All notes in PDF To other weeks