Derivative of Sine and Cosine



Derivative of the Cosine Function

Let's calculate the derivative of the function \( f(x) = \sin(x) \) as the limit of the difference quotient:

\[ f'(x_0) = \lim_{h \to 0} \frac{f(x_0 + h) - f(x_0)}{h} \] \[ = \lim_{h \to 0} \frac{\sin(x_0 + h) - \sin(x_0)}{h} \]

We use the trigonometric identity for the difference of sines:

\[ \sin(x_0 + h) - \sin(x_0) = 2 \sin\left(\frac{h}{2}\right) \cos\left(x_0 + \frac{h}{2}\right) \]

Substituting this identity into the difference quotient, we get:

\begin{align} \frac{\sin(x_0 + h) - \sin(x_0)}{h} &= \frac{2 \sin\left(\frac{h}{2}\right) \cos\left(x_0 + \frac{h}{2}\right)}{h} \\ &= \frac{\sin\left(\frac{h}{2}\right) \cos\left(x_0 + \frac{h}{2}\right)}{\frac{h}{2}} \end{align}

We know that:

\[ \lim_{h \to 0} \frac{\sin(\frac{h}{2})}{\frac{h}{2}} = 1 \quad \text{and} \quad \lim_{h \to 0} \cos\left(x_0 + \frac{h}{2}\right) = \cos(x_0). \]

Therefore:

\[ \lim_{h \to 0} \frac{\sin(x_0 + h) - \sin(x_0)}{h} = \cos(x_0) \]

The derivative of the function \( \sin(x) \) is therefore:

\[ f'(x) = \cos(x) \quad , \quad \forall x \in \mathbb{R} \]

Derivative of the Sine Function

Now let's calculate the derivative of the function \( g(x) = \cos(x) \) as the limit of the difference quotient:

\[ g'(x_0) = \lim_{h \to 0} \frac{g(x_0 + h) - g(x_0)}{h} \] \[ = \lim_{h \to 0} \frac{\cos(x_0 + h) - \cos(x_0)}{h} \]

We use the trigonometric identity for the difference of cosines:

\[ \cos(x_0 + h) - \cos(x_0) = -2 \sin\left(x_0 + \frac{h}{2}\right) \sin\left(\frac{h}{2}\right) \]

Substituting this identity into the difference quotient, we get:

\begin{align} \frac{\cos(x_0 + h) - \cos(x_0)}{h} &= \frac{-2 \sin\left(x_0 + \frac{h}{2}\right) \sin\left(\frac{h}{2}\right)}{h} \\ &= \frac{-\sin\left(x_0 + \frac{h}{2}\right) \sin\left(\frac{h}{2}\right)}{\frac{h}{2}}\end{align}

We know that:

\[ \lim_{h \to 0} \frac{\sin(\frac{h}{2})}{\frac{h}{2}} = 1 \quad \text{and} \quad \lim_{h \to 0} \sin\left(x_0 + \frac{h}{2}\right) = \sin(x_0). \]

Therefore:

\[ \lim_{h \to 0} \frac{\cos(x_0 + h) - \cos(x_0)}{h} = -\sin(x_0) \]

The derivative of the function \( g(x) = \cos(x) \) is therefore:

\[ g'(x) = -\sin(x) \quad , \quad \forall x \in \mathbb{R} \]