Derivative of Cosine

We shall prove formula for derivative of cosine function using by definition or first principle method.

Let us suppose that the function of the form y = f\left( x \right) = \cos x.

First we take the increment or small change in the function.

\begin{gathered} y + \Delta y = \cos \left( {x + \Delta x} \right) \\ \Delta y = \cos \left( {x + \Delta x} \right) - y \\ \end{gathered}

Putting the value of function y = \cos x in the above equation, we get

\Delta y = \cos \left( {x + \Delta x} \right) - \cos x\,\,\,\,{\text{ - - - }}\left( {\text{i}} \right)

Using formula from trigonometry, we have

\cos A - \cos B = - 2\sin \left( {\frac{{A + B}}{2}} \right)\sin \left( {\frac{{A - B}}{2}} \right)

Using this formula in equation (i), we get

\begin{gathered} \Delta y = - 2\sin \left( {\frac{{x + \Delta x + x}}{2}} \right)\sin \left( {\frac{{x + \Delta x - x}}{2}} \right) \\ \Delta y = - 2\sin \left( {\frac{{2x + \Delta x}}{2}} \right)\sin \left( {\frac{{\Delta x}}{2}} \right) \\ \end{gathered}

Dividing both sides by \Delta x, we get

\begin{gathered} \Rightarrow \frac{{\Delta y}}{{\Delta x}} = \frac{{ - 2\sin \left( {\frac{{2x + \Delta x}}{2}} \right)\sin \left( {\frac{{\Delta x}}{2}} \right)}}{{\Delta x}} \\ \Rightarrow \frac{{\Delta y}}{{\Delta x}} = - \frac{{\sin \left( {\frac{{2x + \Delta x}}{2}} \right)\sin \left( {\frac{{\Delta x}}{2}} \right)}}{{\frac{{\Delta x}}{2}}} \\ \end{gathered}

Taking limit of both sides as \Delta x \to 0, we have

\begin{gathered} \Rightarrow \mathop {\lim }\limits_{\Delta x \to 0} \frac{{\Delta y}}{{\Delta x}} = - \mathop {\lim }\limits_{\Delta x \to 0} \frac{{\sin \left( {\frac{{2x + \Delta x}}{2}} \right)\sin \left( {\frac{{\Delta x}}{2}} \right)}}{{\frac{{\Delta x}}{2}}} \\ \Rightarrow \frac{{dy}}{{dx}} = \mathop { - \lim }\limits_{\Delta x \to 0} \sin \left( {\frac{{2x + \Delta x}}{2}} \right)\mathop {\lim }\limits_{\Delta x \to 0} \frac{{\sin \left( {\frac{{\Delta x}}{2}} \right)}}{{\frac{{\Delta x}}{2}}} \\ \end{gathered}

Consider \frac{{\Delta x}}{2} = u, as \Delta x \to 0 then u \to 0, we get

 \Rightarrow \frac{{dy}}{{dx}} = - \mathop {\lim }\limits_{\Delta x \to 0} \sin \left( {\frac{{2x + \Delta x}}{2}} \right)\mathop {\lim }\limits_{u \to 0} \frac{{\sin u}}{u}

Using the relation from limit \mathop {\lim }\limits_{x \to 0} \frac{{\sin x}}{x} = 1, we have

\begin{gathered} \Rightarrow \frac{{dy}}{{dx}} = - \sin \left( x \right)\left( 1 \right) \\ \Rightarrow \frac{{dy}}{{dx}} = - \sin x \\ \end{gathered}

Example: Find the derivative of

y = f\left( x \right) = \cos \sqrt {{x^2} + 1}

We have the given function as

y = \cos \sqrt {{x^2} + 1}

Differentiation with respect to variable x, we get

\frac{{dy}}{{dx}} = \frac{d}{{dx}}\cos \sqrt {{x^2} + 1}

Using the rule, \frac{d}{{dx}}\cos x = - \sin x, we get

\begin{gathered} \frac{{dy}}{{dx}} = - \sin \sqrt {{x^2} + 1} \frac{d}{{dx}}\sqrt {{x^2} + 1} \\ \frac{{dy}}{{dx}} = - \sin \sqrt {{x^2} + 1} \frac{1}{{2\sqrt {{x^2} + 1} }}\frac{d}{{dx}}\left( {{x^2} + 1} \right) \\ \frac{{dy}}{{dx}} = - \sin \sqrt {{x^2} + 1} \frac{1}{{2\sqrt {{x^2} + 1} }}\left( {2x} \right) \\ \frac{{dy}}{{dx}} = - \frac{{x\sin \sqrt {{x^2} + 1} }}{{\sqrt {{x^2} + 1} }} \\ \end{gathered}