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

The limit of the difference quotient is

\begin{align} f'(x_0) &= \lim_{x \to x_0} \frac{f(x) - f(x_0)}{x - x_0} \\ &= \lim_{x \to x_0} \frac{\sin(x) - \sin(x_0)}{x - x_0} \end{align}

We use the trigonometric identity for the difference of sines:

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

Substituting this identity into the difference quotient, we get:

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

Knowing that \( x - x_0 = 2 \cdot \frac{x - x_0}{2} \), we can simplify:

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

Taking the limit, we use the fundamental limit \( \lim_{x \to x_0} \frac{\sin\left(\frac{x - x_0}{2}\right)}{\frac{x - x_0}{2}} = 1 \). Therefore:

\[ \lim_{x \to x_0} 2 \cos\left(\frac{x + x_0}{2}\right) = 2 \cos\left(\frac{2x_0}{2}\right) = \cos(x_0) \]

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

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

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

The limit of the difference quotient is

\begin{align} g'(x_0) &= \lim_{x \to x_0} \frac{g(x) - g(x_0)}{x - x_0} \\ &= \lim_{x \to x_0} \frac{\cos(x) - \cos(x_0)}{x - x_0} \end{align}

We use the trigonometric identity for the difference of cosines:

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

Substituting this identity into the difference quotient, we get:

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

Simplifying using \( x - x_0 = 2 \cdot \frac{x - x_0}{2} \), we get:

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

Taking the limit, we recall that \( \lim_{x \to x_0} \frac{\sin\left(\frac{x - x_0}{2}\right)}{\frac{x - x_0}{2}} = 1 \). Therefore:

\[ \lim_{x \to x_0} -2 \sin\left(\frac{x + x_0}{2}\right) = -2 \sin\left(\frac{2x_0}{2}\right) = -\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}\]