10. Differenting Trigonometric and Inverse Trigonometric Functions#

10.1. Small angle approximations#

We would like to differentiate \(\sin x\) and \(\cos x\) from first principles. To this, it will help to understand how these function behaves for small values of \(x\).

Theorem 10.1 (Small angle approximation)

For small values of \(h\),

(10.1)#\[\sin(h)\approx h, \hspace{2em} \text{ and } \hspace{2em} \cos(h)\approx 1-\frac{h^2}{2}\]

In particular,

(10.2)#\[\lim_{h\rightarrow 0}\frac{\sin(h)}{h}=1, \hspace{2em} \text{ and } \hspace{2em} \lim_{h\rightarrow 0}\frac{1-\cos(h)}{h}=0,\]

Note

For equation (10.1) to hold, \(h\) must be expressed in radians, not degrees.

There are a few ways to see why these equations hold. If you know the Maclaurin series for sine and cosine, you can obtain (10.1) by truncating it after degree \(2\) (we do this in MAS004).

There is also a geometric explanation. Consider a sector of the unit circle with angle \(h\).

_images/smallangle.png

Fig. 10.1 Unit circle indicating the small angle approximation for sine#

When \(h\) is small, \(\sin(h)\) becomes a better and better approximation for the arclength of the sector with angle \(h\). But since the radius is 1, arclength is equal to \(h\) radians, and hence \(\sin(h)\approx h\). For small \(h\), it follows that \(\frac{\sin(h)}{h}\approx 1\), approaching equality as \(h\rightarrow 0\).

We can now deduce the small angle approximation for \(\cos\). Note that by the double angle formula for \(\cos\),

\[ \cos(h) = 1-2\sin^2\left(\frac{h}{2}\right). \]

By the small angle approximation for sine, \(\sin\left(\frac{h}{2}\right)\approx \frac{h}{2}\), and hence

\[ \cos(h)\approx 1-2\left(\frac{h}{2}\right)^2 = 1-\frac{h^2}{2}, \]

provided \(h\) is small. Rearranging this equation,

\[ \frac{1-\cos(h)}{h}\approx\frac{h}{2}, \]

and therefore

\[ \lim_{h\rightarrow 0}\frac{1-\cos(h)}{h} = \lim_{h\rightarrow 0}\frac{h}{2} = 0. \]

10.2. The derivative of \(y=\sin x\)#

We are now ready to differentiate \(y=\sin x\) from first principles. To do this, we must investigate

\[ \frac{\sin(x+h)-\sin(x)}{h} \]

as \(h\rightarrow 0\).

By the compound angle formula for sine,

\[ \sin(x+h)=\sin(x)\cos(h)+\cos(x)\sin(h). \]

Hence

\[\begin{align*} \frac{\sin(x+h)-\sin(x)}{h} &= \frac{\sin(x)\cos(h)+\cos(x)\sin(h)-\sin(x)}{h} \\ &= \frac{\sin(x)\big(\cos(h)-1\big)+\cos(x)\sin(h)}{h} \\ &= \sin(x)\left(\frac{\cos(h)-1}{h}\right) +\cos(x)\left(\frac{\sin(h)}{h}\right). \end{align*}\]

Hence, using (10.2),

\[\begin{align*} \lim_{h\rightarrow 0}\frac{\sin(x+h)-\sin(x)}{h} &= \sin(x)\lim_{h\rightarrow 0}\frac{\cos(h)-1}{h} + \cos(x)\lim_{h\rightarrow 0}\frac{\sin(h)}{h} \\ &= \sin(x)\cdot 0 +\cos(x)\cdot 1. \end{align*}\]

That is, we have shown that

\[ \frac{dy}{dx}= \cos(x). \]

Let’s state this as a theorem, for emphasis.

Theorem 10.2 (The derivative of \(\sin x\))

The derivative of the sine function is given by

\[ \frac{d}{dx}\Big(\sin x\Big) = \cos x. \]

10.3. The derivative of \(y=\cos x\)#

We could repeat the argument above, expanding

\[ \frac{\cos(x+h)-\cos(x)}{h} \]

and applying the small angle approximations of Section 10.1 to calculate its limit as \(h\rightarrow 0\). However, there is a quicker way, now that we know the derivative of sine.

Recall that \(\cos x = \sin(\frac{\pi}{2} + x)\) and \(\cos (\frac{\pi}{2} + x) = -\sin x\). This will allow us to calculate the derivative of \(\cos x\) using the chain rule.

Let \(y=\cos x\) and put \(u = \frac{\pi}{2} + x\). Then

\[ y = \cos x = \sin\left(\frac{\pi}{2}+x\right) = \sin u. \]

Hence, by the chain rule,

\[\begin{align*} \frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx} &= (\cos u)\cdot 1\\ &= \cos\left(\frac{\pi}{2} + x \right) = -\sin x. \end{align*}\]

Hence we have proved the following.

Theorem 10.3 (The derivative of \(\cos x\))

The derivative of the cosine function is given by

\[ \frac{d}{dx}\Big(\cos x\Big) = -\sin x. \]

10.4. Differentiating tan, sec, cosec and cot#

Using the rules for differentiation we developed earlier we can easily differentiate each of \(\tan x\), \(\sec x\), \(\text{cosec} x\) and \(\cot x\).

Example 10.1 (The derivative of \(\tan x\))

Let \(y =\tan x\). Show that \(\frac{dy}{dx} =\sec^2 x\).

Solution.
We begin by recalling the identity \(\sin^2 x+\cos^2 x=1\). Let \(y = \tan x = \frac {\sin x}{\cos x}\). We can use the quotient rule with \(u = \sin x\) and \(v = \cos x\) to get

\[\begin{align*} \frac{dy}{dx} = \frac{v\frac{du}{dx} - u\frac{dv}{dx}}{v^2} &= \frac{\cos x \cos x - \sin x (-\sin x)}{\cos^2 x}\\ &= \frac{\cos^2 x + \sin^2 x}{\cos^2 x}\\ &= \frac{1}{\cos^2 x} = \sec^2 x \end{align*}\]

(where we recall that \(\sec x = \frac 1{\cos x}\)).

Example 10.2 (The derivative of \(\sec x\))

Let \(y=\sec x=\frac 1{\cos x}\). Show that \(\frac{dy}{dx}=\sec x \tan x\).

Solution.
Let \(y = \sec x = \frac 1{\cos x}\). We can use the chain rule with \(u = \cos x\) to get \(y = u^{-1}\). Then

\[ \frac{dy}{dx} = -u^{-2}(-\sin x) = \frac{1}{\cos^2 x}\cdot\sin x = \frac{1}{\cos x}\cdot\frac{\sin x}{\cos x}=\sec x \tan x. \]

Example 10.3 (The derivative of \(\text{cosec} x\))

Let \(y=\text{cosec} x=\frac 1{\sin x}\). Show that \(\frac{dy}{dx}=-\text{cosec} x \cot x\).

Solution.
We use the chain rule with \(u = \sin x\) to get \(y = u^{-1}\). Then

\[ \frac{dy}{dx} = \left(- u^{-2}\right)\cos x = -\frac{1}{\sin^2 x}\cdot\cos x = -\frac{1}{\sin x}\cdot\frac{\cos x}{\sin x}=-\text{cosec} x \cot x. \]

Example 10.4 (The derivative of \(\cot x\))

Let \(y=\cot x=\frac {\cos x}{\sin x}\). Show that \(\frac{dy}{dx} = - \text{cosec}^2 x\).

Solution.
We use the quotient rule with \(u = \cos x\) and \(v=\sin x\) so that \(y=\frac{u}{v}\). Then

\[ \frac{dy}{dx} = \frac{\sin x(-\sin x) - \cos x(\cos x)}{\sin^2 x} = \frac{-1}{\sin^2 x} = - \text{cosec}^2 x. \]

10.5. Examples#

Example 10.5

Let \(y = \sin (3x)\). Find \(\frac{dy}{dx}\).

Solution.
We use the chain rule with \(u = 3x\) so that \(y = \sin u\). Then \(\frac{dy}{du} = \cos u\) and \(\frac{du}{dx} = 3\). Thus

\[ \frac{dy}{dx} = \cos u\times 3 = 3\cos(3x). \]

Example 10.6

Differentiate \(y = \tan^2(x)\).

Solution.
Since \(y = \tan^2(x) = (\tan(x))^2\) we use the chain rule with \(u = \tan x\) so that \(y = u^2\). Then \(\frac{dy}{du} = 2u\) and \(\frac{du}{dx} = \sec^2(x)\). Thus

\[ \frac{dy}{dx} = 2u.\sec^2(x) = 2\sec^2(x)\tan(x). \]

Example 10.7

Differentiate \(y = \sin x\cos 3x\).

Solution.
We use the product rule with \(u = \sin x\) and \(v = \cos(3x)\). Then \(\frac{du}{dx} = \cos x\) and \(\frac{dv}{dx} = -3\sin(3x)\). Thus

\[ \frac{dy}{dx} = \cos x\cos(3x) +\sin x (-3\sin(3x)) = \cos x \cos(3x) - 3 \sin x \sin(3x). \]

10.6. Derivatives of inverse trigonometric functions#

When we differentiate the inverse trigonometric functions we get some surprising results. It is very important to remember these as they crop up when we deal with integration.

Example 10.8 (The derivative of \(\tan^{-1} x\))

Show that the derivative of \(\displaystyle \tan^{-1} x\) is \(\displaystyle \frac 1{1+x^2}\).

Solution.
Let \(y = \tan^{-1} x\). Then \(x = \tan y\) so \(\frac{dx}{dy} = \sec^2 y\). The inverse function rule then tells us that

\[ \frac{dy}{dx} = \frac 1{\frac{dx}{dy}} = \frac 1{\sec^2 y}. \]

But we have to express \(\frac{dy}{dx}\) in terms of \(x\) which means we have to find a connection between \(\sec^2 y\) and \(\tan y\). We know that

\[ \sin^2 y + \cos^2 y = 1\]

and thus, on dividing the equation by \(\cos^2 y\), we get

\[ \tan^2 y + 1 = \sec^2 y. \]

Thus

\[ \frac{dy}{dx} = \frac 1{\sec^2 y}=\frac{1}{1+\tan^2 y} = \frac{1}{1+x^2}. \]

Example 10.9 (The derivative of \(\sin^{-1} x\))

Show that the derivative of \(\sin^{-1}(x)\) is \(\displaystyle \frac1{\sqrt{1-x^2}}\).

Solution.
Let \(y = \sin^{-1} x\) so that \(x = \sin y\). Then \(\frac{dx}{dy} = \cos y\) and by the inverse function rule

\[ \frac{dy}{dx} = \frac{1}{\frac{dx}{dy}}=\frac{1}{\cos y}. \]

This time we need to express \(\cos y\) in terms of \(x\). Using the relationship \(\sin^2y+\cos^2y=1\) we get \(\cos^2 y = 1-\sin^2 y\) so that \(\cos y = \pm \sqrt{1-\sin^2 y}\). We need to determine which square root to take.

Now \(y=\sin^{-1}x\), which has range \(\{y\in \mathbb{R}:- \frac\pi 2 \leq y\leq \frac\pi 2\}\). But for \(-\frac{\pi}{2}\leq y\leq \frac{\pi}{2}\) we have \(\cos y \geq 0\), so we see that we need to use the positive square root; that is

\[ \cos y =\sqrt{1-\sin^2 y}. \]

Now, remembering that \(\sin y = x\) we get

\[ \frac{dy}{dx} = \frac{1}{\cos y}=\frac{1}{\sqrt{1-\sin^2 y}} = \frac{1}{\sqrt{1-x^2}}. \]

Example 10.10 (The derivative of \(\cos^{-1} x\))

Show that the derivative of \(\cos^{-1}x\) is \(\displaystyle -\frac 1{\sqrt{1-x^2}}\).

Solution.
Let \(y = \cos^{-1} x\) so that \(x = \cos y\). Then \(\frac{dx}{dy} = -\sin y\) and by the inverse function rule

\[ \frac{dy}{dx} = - \frac{1}{\sin y}. \]

To express \(\sin y\) in terms of \(x\), our relationship \(\sin^2 y + \cos^2 y = 1\) gives \(\sin^2 y = 1-\cos^2 y\) so that \(\sin y = \pm \sqrt{1-\cos^2 y}\). This time \(y=\cos^{-1} x\) has range \(\{y: 0\leq y\leq \pi\}\) and \(\sin y \geq 0\) for \(0\leq y \leq\pi\), so again we use the positive square root to get

\[ \sin y=\sqrt{1-\cos^2 y}. \]

Now, remembering that \(\cos y = x\) we get

\[ \frac{dy}{dx} = - \frac{1}{\sin y}=-\frac{1}{\sqrt{1-\cos^2 y}} = -\frac{1}{\sqrt{1-x^2}}. \]

We summarise these three results.

Theorem 10.4 (Differentiating the Inverse Trigonometric Functions)

  1. \(\displaystyle \frac{d}{dx}\left(\sin^{-1}x\right)=\frac{1}{\sqrt{1-x^2}}\).

  2. \(\displaystyle \frac{d}{dx}\left(\cos^{-1}x\right)=-\frac{1}{\sqrt{1-x^2}}\).

  3. \(displaystyle \frac{d}{dx}\left(\tan^{-1}x\right)=\frac{1}{1+x^2}\).

10.7. Examples#

Example 10.11

Differentiate \(y = \sin^{-1} (3x)\).

Solution.
We use the chain rule with \(u = 3x\) so that \(y = \sin^{-1}u\). Then \(\frac{dy}{du} = \frac{1}{\sqrt{1-u^2}}\) and \(\frac{du}{dx} = 3\). Thus

\[ \frac{dy}{dx} = \frac 1{\sqrt{1-u^2}}\times 3 = \frac 3{\sqrt{1-9x^2}}. \]

Example 10.12

Differentiate \(y = \cos^{-1}(2x+1)\tan^{-1} (x^2)\).

Solution.
Here we use the product rule with \(u = \cos^{-1}(2x+1)\) and \(v=\tan^{-1}(x^2)\). Clearly we’ll need to use the chain rule to find \(\frac{du}{dx}\) and \(\frac{dv}{dx}\).

For \(\frac{du}{dx}\), let \(w = 2x+1\) so that \(u = \cos^{-1} w\). Now \(\frac{dw}{dx} = 2\) and \(\frac{du}{dw} = -\frac{1}{\sqrt{1-w^2}}\). Thus

\[ \frac{du}{dx} = -\frac{1}{\sqrt{1-w^2}}\times 2 = -\frac{2}{\sqrt{1-(2x+1)^2}}. \]

For \(\frac{dv}{dx}\), let \(w = x^2\) so that \(v = \tan^{-1}(w)\). Now \(\frac{dv}{dw} = \frac{1}{1+w^2}\) and \(\frac{dw}{dx} = 2x\). Hence

\[ \frac{dv}{dx} = \frac{1}{1+w^2} \times 2x = \frac{2x}{1+x^4}. \]

Thus

\[ \frac{dy}{dx} = v\frac{du}{dx} + u\frac{dv}{dx} = -\tan^{-1}(x^2).\frac{2}{\sqrt{1-(2x+1)^2}} + \cos^{-1}(2x+1).\frac{2x}{1+x^4}. \]

Example 10.13

Differentiate \(y = \sin^{-1}(\sin x)\).

Solution.
We must be little careful here. If \(-\frac{\pi}{2} < x < \frac\pi 2\) then \(\sin^{-1}(\sin x)= x\) as \(\sin^{-1} x \) and \(\sin x\) are inverse functions in this range. Hence, for \(-\frac{\pi}{2} < x < \frac{\pi}{2}\) we have \(y=x\) so \(\frac{dy}{dx} = 1\).

For the full solution we use the chain rule with \(u = \sin x\) so that \(y = \sin^{-1} u\). Now \(\frac{du}{dx} = \cos x\) and \(\frac{dy}{du} = \frac{1}{\sqrt{1-u^2}}\). Thus

\[\begin{align*} \frac{dy}{dx} &= \frac{1}{\sqrt{1-u^2}}\cdot\cos x \\ &= \frac{\cos x}{\sqrt{1-\sin^2 x}}\\ &= \frac{\cos x}{\sqrt{\cos^2 x}}. \end{align*}\]

If we look at the points where \(\cos x \neq 0\), we see that \(\sqrt{\cos^2 x}=\pm \cos x\) depending on whether \(\cos x\) is positive or negative. Thus we have, for \(\cos x \neq 0\),

\[\begin{align*} \frac{dy}{dx} &= \frac{\cos x}{\pm \cos x}\\ &= \pm 1\quad\mbox{depending on the value of $x$.} \end{align*}\]

But we can see from the graph of \(y = \sin^{-1}(\sin x)\) below that when \(\cos x = 0\), the derivative of \(\sin^{-1}(\sin x)\) is actually \(0\).

_images/sin%5E-1%28sinx%29.png

Fig. 10.2 Graph of \(y=\sin^{-1}(\sin x)\)#

10.8. Table of Standard Derivatives#

We summarise our findings so far in a table.

The following table of derivatives is an exhaustive list of all of the standard derivatives you need to know for MAS003.

f(x)

f’(x)

\(x^r\) \((r\in\mathbb{R})\)

\(rx^{r-1}\)

\(\ln(x)\) \((x>0)\)

\(\frac{1}{x}\) \((x>0)\)

\(e^x\)

\(e^x\)

\(\sin x\)

\(\cos x\)

\(\cos x\)

\(-\sin x\)

\(\tan x\)

\(\sec^2 x\)

\(\sec x\)

\(\sec x\tan x\)

\(\text{cosec} x\)

\(-\text{cosec} x\cot x\)

\(\cot x\)

\(-\text{cosec}^2 x\)

\(\sin^{-1}x\)

\(\frac{1}{\sqrt{1-x^2}}\)

\(\cos^{-1}x\)

\(-\frac{1}{\sqrt{1-x^2}}\)

\(\tan^{-1}x\)

\(\frac{1}{x^2+1}\)

In addition to knowing these derivatives, you will need to be able to use them with the various diffentiation rules, to find derivatives of more sophisticated functions.

For example, using the table together with the chain rule, we get that for any differentiable function \(f(x)\),

\[ \frac{d}{dx}\left(e^{f(x)}\right)=f'(x)e^{f(x)}, \]
\[ \frac{d}{dx}\left(\ln(f(x))\right)=\frac{f'(x)}{f(x)} \hspace{1em} (\text{provided} \hspace{1em} f(x)>0), \]

and similar formulae involving trig and inverse trig functions applied to \(f(x)\).

These sorts of facts will be very helpful when we come to study integration.