# How do you find f'(x) using the definition of a derivative for f(x)=cos x?

Oct 23, 2015

See the explanation.

#### Explanation:

$f ' \left(x\right) = {\lim}_{h \to 0} \frac{f \left(x + h\right) - f \left(x\right)}{h}$

$f ' \left(x\right) = {\lim}_{h \to 0} \frac{\cos \left(x + h\right) - \cos x}{h}$

$f ' \left(x\right) = {\lim}_{h \to 0} \frac{\cos x \cosh - \sin x \sinh - \cos x}{h}$

When $h \to 0$ then $\cosh \to 1$:

$f ' \left(x\right) = {\lim}_{h \to 0} \frac{\cos x \cdot 1 - \sin x \cdot \sinh - \cos x}{h}$

$f ' \left(x\right) = {\lim}_{h \to 0} \frac{\cos x - \sin x \sinh - \cos x}{h}$

$f ' \left(x\right) = {\lim}_{h \to 0} \frac{- \sin x \sinh}{h} = - \sin x {\lim}_{h \to 0} \frac{\sinh}{h} = - \sin x$

since ${\lim}_{h \to 0} \frac{\sinh}{h} = 1$.

Oct 23, 2015

The answer is $- \sin \left(x\right)$

#### Explanation:

This is the definition of the derivative:

${\lim}_{x \to h} \frac{f \left(x + h\right) - f \left(x\right)}{h}$

So we know that $f \left(x\right) = \cos \left(x\right)$, so let's go ahead and plug it in:

${\lim}_{x \to h} \frac{\cos \left(x + h\right) - \cos \left(x\right)}{h}$

Now, before we progress any further, we need to lay down two facts:

1. ${\lim}_{x \to h} \frac{\cos \left(h\right) - 1}{h} = 0$

2. ${\lim}_{x \to h} \sin \frac{h}{h} = 1$

If you'd like to verify these yourself, you can just plug these functions into your calculator, and see what they approach as $x$ nears 0.

Now, if you noticed, $\cos \left(x + h\right)$ is not very nice to work with as it is. So, we'll need to use an identity to split it up. If you look it up, you'll know that:

$\cos \left(x + h\right) = \cos \left(x\right) \cos \left(h\right) - \sin \left(x\right) \sin \left(h\right)$

So, let's use this to split up $\cos \left(x + h\right)$:

${\lim}_{x \to h} \frac{\cos \left(x\right) \cos \left(h\right) - \sin \left(x\right) \sin \left(h\right) - \cos \left(x\right)}{h}$

Now we can factor out a $\cos \left(x\right)$ out of 2 of the terms, and we'll get:

${\lim}_{x \to h} \frac{\cos \left(x\right) \left(\cos \left(h\right) - 1\right) - \sin \left(x\right) \sin \left(h\right)}{h}$

And if we did some algebra:

${\lim}_{x \to h} \frac{\cos \left(x\right) \left(\cos \left(h\right) - 1\right)}{h} - \frac{\sin \left(x\right) \sin \left(h\right)}{h}$

And applied our first identity:

${\lim}_{x \to h} \cos \left(x\right) \left(0\right) - \frac{\sin \left(x\right) \sin \left(h\right)}{h}$

And now if we factored out a $- \sin \left(x\right)$, we'd get:

${\lim}_{x \to h} - \sin \left(x\right) \left(\sin \frac{h}{h}\right)$

Now we can apply our second identity:

${\lim}_{x \to h} - \sin \left(x\right) \left(1\right)$

And since there are no $h$ terms in this, the limit just cancels out, and we're left with $- \sin \left(x\right)$.

Of course, this is the ultra-long way to derive the answer to this, and most calculus teachers just prefer you simply memorise this. And practically speaking, it's easier than deriving it all over each time.

The first 11 minutes of this video do this too. The only difference is that this video derives ${\lim}_{x \to h} \frac{\sin \left(x + h\right) - \sin \left(x\right)}{h}$, but to be honest the process is nearly completely the same.

Hope that helps :)