Skip to main content

Subsection 2.8.5 Step 3: \(\diff{}{x} \{ \sin x \}\) and \(\diff{}{x} \{ \cos x\}\) for General \(x\)

To proceed to the general derivatives of \(\sin x\) and \(\cos x\) we are going to use the above two results and a couple of trig identities. Remember the addition formulae  5 You really should. Look this up in Appendix A.8 if you have forgotten.

\begin{align*} \sin(a+b) &= \sin(a) \cos(b) + \cos(a) \sin(b)\\ \cos(a+b) &= \cos(a) \cos(b) - \sin(a) \sin(b) \end{align*}

To compute the derivative of \(\sin(x)\) we just start from the definition of the derivative:

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

The computation of the derivative of \(\cos x\) is very similar.

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

We have now found the derivatives of both \(\sin x\) and \(\cos x\text{,}\) provided \(x\) is measured in radians.

These formulae are pretty easy to remember — applying \(\diff{}{x}\) to \(\sin x\) and \(\cos x\) just exchanges \(\sin x\) and \(\cos x\text{,}\) except for the minus sign  6 There is a bad pun somewhere in here about sine errors and sign errors. in the derivative of \(\cos x\text{.}\)

Remark 2.8.4 Optional — Another derivation of \(\diff{}{x}\cos x =-\sin x\)

We remark that, once one knows that \(\diff{}{x}\sin x =\cos x\text{,}\) it is easy to use it and the trig identity \(\cos(x) = \sin\big(\frac{\pi}{2}-x\big)\) to derive \(\diff{}{x}\cos x =-\sin x\text{.}\) Here is how 7 We thank Serban Raianu for suggesting that we include this..

\begin{align*} \diff{}{x}\cos x \amp=\lim_{h\rightarrow 0}\frac{\cos (x+h)-\cos x}{h} =\lim_{h\rightarrow 0}\frac{\sin\big(\frac{\pi}{2}-x-h) -\sin\big(\frac{\pi}{2}- x\big)}{h} \\ \amp=-\lim_{h'\rightarrow 0}\frac{\sin\big(x'+h')-\sin(x')}{h'} \qquad\text{with }x'=\tfrac{\pi}{2}-x,\ h'=-h\\ \amp=-\diff{}{x'}\sin x'\Big|_{x'=\tfrac{\pi}{2}-x} =-\cos\big(\tfrac{\pi}{2}- x\big)\\ \amp=-\sin x \end{align*}

Note that if \(x\) is measured in degrees, then the formulas of Lemma 2.8.3 are wrong. There are similar formulas, but we need the chain rule to build them — that is the subject of the next section. But first we should find the derivatives of the other trig functions.