4.3.1 Derivatives of Sine and Cosine
In 4.2.2 we proved the following
\[
\lim_{h\to 0}\frac{\sin ( h+0) -\sin 0}{h} = \lim_{h\to 0}\frac{\sin h}{h} =1 \;\;\;\;\;\;
\lim_{h\to 0}\frac{\cos ( h+0) – \cos 0}{h} =\lim_{h\to 0} \frac{\cos h-1}{h} =0.
\]
These are precisely the derivatives of sine and cosine at \(x=0\).
Key point. What is rather remarkable is the fact that the difference quotients of sine and cosine at any other point \(a\) are closely related to these two difference quotients. As a result, the derivatives of sine and cosine are readily available. Here we prove a result a little bit more general.
Proposition 1. Let \(a \in \mathbb{R}\) be constant.
(a) Let \(f(x) = \sin a x\), then \(f'(x)=a\cos ax\) for all \(x \in \mathbb{R}\).
(b) Let \(g(x) = \cos a x\), then \(g'(x)=-a\sin a x\) for all \(x \in \mathbb{R}\).
Proof. (a)
\begin{align*}
\lim_{h\to 0}\frac{\sin a(x+h)-\sin a x}{h}
&=\lim_{h\to 0}\frac{\sin ax \cos ah + \sin a h \cos ax-\sin a x}{h} =\\
&=\lim_{h\to 0}\frac{\sin a x (\cos ah-1) + \sin a h \cos a x}{h}= \\
&=\sin a x\left( \lim_{h\to 0}\frac{a(\cos a h-1)}{ah}\right)+\left(\lim_{h\to 0}\frac{a\sin a h}{ah}\right)\cos ax =\\
& \underset{?}{=} (\sin ax)(a\cdot 0)+(a)(\cos a x) = a\cos ax.
\end{align*}
(b) Analogously, we have
\begin{align*}
\lim_{h\to 0}\frac{\cos a(x+h)-\cos ax}{h}&=\lim_{h\to 0}\frac{\cos ax \cos ah – \sin ax \sin ah -\cos ax}{h}=\\
&=\lim_{h\to 0}\frac{\cos ax (\cos ah-1) + \sin ax \sin ah}{h} = \\
& =\lim_{h\to 0} \cos ax \frac{\cos ah-1}{h} -\lim_{h\to 0} \frac{\sin ah}{h}\sin ax \\
& \underset{?}{=}\cos ax (a\cdot 0) – a\sin ax.
\end{align*}
□
4.3.2 Derivatives of Cosecant and Secant
Corollary 1. Let \(a \in \mathbb{R}\).
(a) Let \(f(x) = \csc a x\), then \(f'(x)=-a\csc ax\cot ax\) for all \(x \in D_{\csc}\).
(b) Let \(g(x) = \sec a x\), then \(g'(x)=a\sec a x\tan ax\) for all \(x \in D_{\sec}\).
&bnsp;
Proof.
(a) We already have two alternative ways to prove these formulas.
Proof 1. Use the Quotient Rule: \(\displaystyle \left(\frac{1}{h }\right)’ (x) = -\frac{1}{(h(x))^2}h'(x)\) and Proposition 1 (a) to get:
\[-\frac{1}{\sin^2(ax)}a\cos (ax)=-a\frac{1}{\sin a x}\frac{\cos ax}{\sin ax}
=-a\csc ax \cot ax.\]
Proof 2. Use the definition of derivative and the above calculation:
\begin{align*}
\lim_{h\to 0} \frac{\csc a(x+h)-\csc ax}{h}
&=\lim_{h\to 0}\frac{\displaystyle \frac{1}{\sin a(x+h)}-\frac{1}{\sin ax}}{h}
=\lim_{h\to 0}\frac{\displaystyle \frac{\sin a x-\sin a (x+h)}{\sin a (x+h)\sin a x}}{h} =\\
& =-\lim_{h\to 0}\frac{1}{\sin a (x+h)\sin a x}\frac{\sin a (x+h) – \sin a x}{h} =\\
& \underset{?}{=}-\frac{1}{\sin a x\sin a x}a\cos ax =-a\csc ax \cot ax.
\end{align*}
(b) Similar calculations yield two alternative proofs for (b).
□
4.3.3 Derivatives of Cotangent and Tangent
Proposition 2. Let \(a \in \mathbb{R}\).
(a) Let \(f(x) = \cot a x\), then \(f'(x)=-a \csc^2 ax\) for all \(x \in D_{\cot}\).
(b) Let \(g(x) = \tan a x\), then \(g'(x)=a\sec^2 a x\) for all \(x \in D_{\tan}\).
Proof. (a) Proof 1. Write \(\displaystyle \tan x =\frac{\sin x}{\cos x}\), and use the quotient rule and Proposition 1 to get:
\[\frac{(-a\sin a x)(\sin ax)-(\cos a x)(a\cos a x)}{\sin^2(ax)}=-a\frac{1}{\sin^2 a x}=-a\csc^2ax.\]
Proof 2. Use the definition of derivative.
Using the addition formula for cotangent (see Example 1 in 4.1.2).
\begin{align*}
\lim_{h\to 0}\frac{\cot a(x+h)-\cot (ax)}{h}
&=\lim_{h\to 0} \frac{\displaystyle \frac{\cot ax \cot ah-1}{\cot ah + \cot ax}-\cot ax}{h} =\\
&=\lim_{h\to 0}\frac{\cot ax \cot ah-1-\cot ax(\cot ah + \cot ax)}{h (\cot ah + \cot ax)}\\
& =\lim_{h\to 0}\frac{-1-\cot ax \cot ax}{h (\cot ah + \cot ax)} =\frac{-\csc ^2ax}{h (\cot ah +\cot ax)} \\
& =\lim_{h\to 0}\frac{-\csc ^2ax}{\displaystyle h \left(\frac{\cos a h}{\sin ah} +\cot ax\right)}
=\lim_{h\to 0}\frac{-\csc ^2ax}{\displaystyle h \left(\frac{\cos ah + \sin ah \cot ax}{\sin ah} \right)}\\
&=-\lim_{h\to 0}\csc ^2ax \frac{a\sin ah}{ah}\frac{1}{\cos ah +\cot ax \sin ah}
\underset{?}{=}-a\csc^2ax.
\end{align*}
(b) Similar calculations yield two alternative proofs for (b).
□
4.3.4 Tangent Lines
Example 1. Given the function \(f(x)=\cos x\), find the slope-intercept equation of the line tangent to its graph at the point with \(x\)-coordinate \(x=\pi/4\).
Solution. The slope of the tangent line at \(x=\frac{\pi}{4}\) is given by the derivative of \(f\) evaluate at \(x=\frac{\pi}{4}\): \(m = f’\left(\frac{\pi}{4}\right) = -\sin \frac{\pi}{4}=-\frac{\sqrt{2}}{2}\).
Since the point with \(x\) coordinate \(x=\pi/4\) has \(y\)-coordinate given by \(y=\cos \pi/4=\sqrt{2}/2\), using the point-slope equation for a line, we have
\[y-\frac{\sqrt{2}}{2}=-\frac{\sqrt{2}}{2}\left(x-\frac{\pi}{4}\right) \Longleftrightarrow
y=-\frac{\sqrt{2}}{2}x+ \left(\frac{\pi\sqrt{2}}{8}+\frac{\sqrt{2}}{2}\right).\]
Example 2. Find the \(x\)-coordinate of the points on the graph of
\(f(x)=x+\sin 2x\) on \([0,2\pi]\) whose tangent line is horizontal.
Solution.
A horizontal line has zero slope. Thus, for a horizontal tangent line at a point \((a,f(a))\), the derivative must vanish, that is, \(f'(a)=0\). Since \(f'(a)=1 -2\cos 2a\), we have
\[1 -2\cos 2a=0 \Longleftrightarrow \cos 2a =-\frac{1}{2}\Longleftrightarrow 2a = \frac{2\pi}{3}+ 2\pi k\;\; \mathrm{or} \;\; 2a= \frac{4\pi}{3}+ 2\pi k\;\; k, \in \mathbb{Z}.\]
Since we are looking for the \(a\in [0, 2\pi]\), it follows that \(\displaystyle a=\frac{\pi}{3},\;\frac{2\pi}{3},\;\frac{4\pi}{3},\;\frac{5\pi}{3}\) (explain why).
Example 3. Given \(f(x)= \sin 2x + 2\sin x\), \(x\in[0, 2\pi]\), find the \(x\)-coordinate of the points on its graph whose tangent lines are horizontal.
Solution. As in the previous example, we need to solve the equation
\[f'(x)= 0, \;\; \text{i.e.}\;\; 2\cos 2x + 2\cos x = 0, \;\; x\in[0, 2\pi].\]
Using the double-angle identity: \(\cos 2x = 2\cos^2x-1\), the last equation can be rewritten as
\[ 2\cos^2x-1 +\cos x =0 \Longleftrightarrow \left (2\cos x -1\right )\left (\cos x +1\right ) =0 \Longleftrightarrow \cos x = \frac{1}{2}\;\; \text{or} \;\; \cos x =-1.\]
Since, in addition, \(x\in [0, 2\pi]\), it follows that \(\displaystyle x \in \left \{\frac{\pi}{3}, \pi, \frac{5\pi }{3}\right \}\).
4.3.5 Rules of Differentiation
So far, we have established the following differentiation rules (see Theorem 5 in 2.4.4):
Let \(f\) and \(g\) be differentiable functions at a point \(a\), then
\(f+g\), \(f-g\), \(k f\) (for any constant \(k\)), \(f\cdot g\) are also differentiable at \(a\) and \(1/g\) and \(f/g\) are also differentiable at \(a\) provided \(g(a)\neq 0\). And in this case,
Linearity of the derivative.
1. \((f\pm g)'(a)=f'(a) \pm g'(a)\).
2. \((kf)'(a)=kf'(a)\).
Product Rule. 4. \((f\cdot g)'(a)=f'(a)\cdot g(a)+f(a)\cdot g'(a)\).
Quotient Rule. 5. \(\displaystyle \left (\frac{f}{g}\right )'(a)=\frac{f'(a)g(a)-f(a)g'(a)}{(g(a))^2}\).
In addition, we have the following particular rules. In the table \(n\in\mathbb{Z}\), \(m\in \mathbb{N}\), \(m\geq 2\), and \(a\) is a constant.
\[
\renewcommand{\arraystretch}{2}
\begin{array}{c|c||c|c||c|c||c|c}
f(x)&f'(x) &f(x)&f'(x) &f(x)&f'(x) &f(x)&f'(x)\\ \hline
x^n &nx^{n-1} & \sin ax & a\cos ax & \tan ax & a\sec^2 ax &\sec ax & \ a \sec ax \tan ax\\ \hline
\sqrt[m]{x} &\displaystyle \frac{1}{m} \frac{1}{\sqrt[m]{x^{m-1}}} &\cos a x & – a\sin ax & \cot ax & -a \csc^2 ax & \csc a x & – a\csc ax \cot ax
\end{array}
\]
Example 1. Compute the derivative of the function and simplify it as much as possible.
(a) \(f(x)=x^2\cot \pi x\); (b) \(\displaystyle g(t)=\frac{\cot \pi t}{1+\csc \pi t}\); (c) \(\displaystyle h(s)=\frac{s\tan \pi s}{1+\sec \pi s}\).
Solution. (a) \(f'(x)\underset{?}{=}2x\cot \pi x-\pi x^2 \csc^2 \pi x\).
(b)
\begin{align*}
g'(t)
&=\frac{(1+\csc \pi t)(-\pi \csc^2\pi t ) – \cot \pi t(-\pi \cot \pi t \csc \pi t) }{(1+\csc \pi t)^2} =\\
&=\frac{-\pi \csc\pi t ((1+\csc \pi t)( \csc\pi t ) – \cot^2 \pi t)}{(1+\csc \pi t)^2}
=-\frac{\pi \csc\pi t( \csc\pi t +\csc^2\pi t – \cot^2 \pi t )}{(1+\csc \pi t)^2}=\\
&\underset{?}{=}-\frac{\pi \csc\pi t( \csc\pi t +1)}{(1+\csc \pi t)^2}=\frac{-\pi \csc\pi t}{1+\csc \pi t}
\underset{?}{=}-\frac{\pi }{1+\sin \pi t}, \;\; t \notin \mathbb{Z}.
\end{align*}
(c) First apply the quotient rule, and then, when computing the derivative of the numerator, the product rule.
\begin{align*}
h'(s)
&=\frac{(1+\sec \pi s)(\pi s \sec^2 \pi s+ \tan \pi s)-s\tan \pi s \cdot \pi \sec \pi s \tan \pi s}{(1+\sec \pi s)^2} = \\
&=\frac{(1+\sec \pi s)\left (\pi s\left (1+\tan^2 \pi s\right )+ \tan \pi s\right )-\pi s\tan^2 \pi s \sec \pi s}{(1+\sec \pi s)^2} = \\
&=\frac{ \pi s(1+\sec \pi s) + \pi s \tan^2 \pi s + \tan \pi s(1+\sec \pi s)}{(1+\sec \pi s)^2} = \\
&\underset{?}{=}\frac{ \pi s \sec \pi s(1 + \sec \pi s) + \tan \pi s(1+\sec \pi s)}{(1+\sec \pi s)^2} = \\
&\underset{?}{=}\frac{ \pi s \sec \pi s + \tan \pi s}{1+\sec \pi s }
\underset{?}{=}\frac{\pi s + \sin \pi s}{1+\cos \pi s}, \;\; s\neq \frac{1}{2}+k, k\in \mathbb{Z}.
\end{align*}
4.3.6 Exercises
- (a) Prove that if \(g(x) =\cos ax\), \(a\) constant, then \(g'(x)=-a \sin ax\). Justify all steps.
(b) Use the addition formulas for sine and cosine to prove
(i) \(\displaystyle \tan(x+h)=\frac{\tan x + \tan h}{1-\tan x \tan h}\); (ii) \(\displaystyle \cot (x+h) =\frac{\cot x \cot h-1}{\cot h + \cot x}\).
- \(\displaystyle \frac{\cos a(x+h)-\cos ax}{h} =a \cos ax \frac{\cos a h-1}{ah} – a\frac{\sin ah}{ah}\sin ax\).
- \(\displaystyle \frac{\tan a(x+h)-\tan ax}{h} = a\sec^2 ax \frac{\sin ah}{ah}\frac{\sec ah}{1-\tan ax \tan ah} \).
- \(\displaystyle \frac{\sec a(x+h)-\sec a x}{h} = a\frac{1-\cos ah}{ah} \sec a(x+h) +a\tan ax \sec a(x+h)\frac{\sin ah}{ah}\).
- \(\displaystyle \frac{\sin a(x+h)-\sin a x}{h} = a\sin ax \frac{\cos ah-1}{ah} + a\frac{\sin a h}{ah}\cos a x\).
- \(\displaystyle \frac{\cot a(x+h)-\cot ax}{h} =-a\csc ^2ax \frac{\sin ah}{ah}\frac{1}{\cos ah +\cot ax \sin a h}\).
- \(\displaystyle \frac{\csc a (x+h)-\csc a x}{h} =-a\frac{\cos a h -1}{ah}\csc a(x+h)-a\frac{\sin ah}{ah}\cot ax \csc a(x+h)\).
In exercises 2–7, (a) show that each difference quotient can be rewritten as stated; (b) use the results in (a) to prove the formulas for the derivatives of the six trigonometric functions.
In problems 8–13, find the slope-intercept equation of the line tangent to the graph of the function at the point with \(x\)-coordinate \(a\).
- \(f(x) =\sin 2x \), \(\displaystyle a=\frac{5\pi}{6}\).
- \(f(x) = \tan \pi x\), \(\displaystyle a=-\frac{1}{3}\).
- \(f(x) =x\sin 2x \), \(\displaystyle a=\frac{5\pi}{4}\).
- \(f(x) = x^2\tan \pi x\), \(a=1\).
- \(f(x) =\sin \pi x + \cos \pi x \), \(\displaystyle a=-\frac{1}{4}\).
- \(f(x) =-2x+\csc 2x \), \(\displaystyle a=-\frac{\pi}{6}\).
In problems 14–19, use the rules of differentiation to compute \(f’\). Simplify your answer.
- \(f(x) = \sec \pi x \tan \pi x\).
- \(f(x) =\cos x \csc 3x \).
- \(\displaystyle f(x) =\frac{\tan \pi x}{1 + \sec \pi x} \).
- \(\displaystyle f(x) =\frac{\sin 2x}{1+\sin 2x} \).
- \(\displaystyle f(x) =\frac{\sin 3x}{1+\cos 3x} \).
- \(\displaystyle f(x) =\frac{\cot 3 x }{1+\csc 3 x} \).
In problems 20–23, find the \(x\)-coordinate of the points on the graph of \(f\), whose tangent line is horizontal.
- \(f(x)= \cos 2x – 2\sin x\), \(x\in[-\pi, \pi]\).
- \(f(x)= \sin 2x – 2\sin x\), \(x\in[-\pi, \pi]\).
- \(f(x)= \tan x – 2\sec x\), \(x\in[0, 2\pi]\).
- \(f(x)= \cot x + 2\csc x\), \(x\in[0, 2\pi]\).
-
(a) Find the first four derivatives of \(f(x)=x e^x\).
(b) Find a pattern and predict what the \(10^{\text{th}}\)-derivative of \(f\) should be.
(c) Provide a general rule (formula) for the \(n^{\text{th}}\)-derivative of \(f\).
- (a) Find the first eight derivatives of \(f(x)=x \sin x\).
(b) Find a pattern (or patterns) to predict what the \(19^{\text{th}}\)- and \(20^{\text{th}}\)-derivatives of \(f\) should be, and the \(101^{\text{st}}\)- and \(102^{\text{nd}}\)-derivatives.
(c) Provide a general rule for the \(n^{\text{th}}\)-derivative of \(f\). Hint: For \(n\) even, \(n=2k\); for \(n\) odd, \(n=2k -1\), \(k \in \mathbb{N}\).