# Differentiate cos(x^2+1) using first principle of derivative?

Feb 25, 2018

$- \sin \left({x}^{2} + 1\right) \cdot 2 x$

#### Explanation:

$\frac{d}{\mathrm{dx}} \cos \left({x}^{2} + 1\right)$

For this problem, we need to use chain rule, as well as the fact that the derivative of $\cos \left(u\right) = - \sin \left(u\right)$. Chain rule basically just states that you can first derive the outside function with respect to what is inside the function, and then multiply this by the derivative of what is inside the function.

Formally,

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\mathrm{dy}}{\mathrm{du}} \cdot \frac{\mathrm{du}}{\mathrm{dx}}$,

where $u = {x}^{2} + 1$.

We first need to work out the derivative of the bit inside the cosine, namely $2 x$. Then, after having found the derivative of the cosine (a negative sine), we can just multiply it by $2 x$.

$= - \sin \left({x}^{2} + 1\right) \cdot 2 x$

Feb 26, 2018

#### Explanation:

$f \left(x\right) = \cos \left({x}^{2} - 1\right)$

We need to find

${\lim}_{h \rightarrow 0} \frac{f \left(x + h\right) - f \left(x\right)}{h} = {\lim}_{h \rightarrow 0} \frac{\cos \left({\left(x + h\right)}^{2} - 1\right) - \cos \left({x}^{2} - 1\right)}{h}$

Let's focus on the expression whose limit we need.

$\frac{\cos \left(\left({x}^{2} - 1\right) + \left(2 x h + {h}^{2}\right)\right) - \cos \left({x}^{2} - 1\right)}{h}$

$= \frac{\cos \left({x}^{2} - 1\right) \cos \left(2 x h + {h}^{2}\right) - \sin \left({x}^{2} - 1\right) \sin \left(2 x h + {h}^{2}\right) - \cos \left({x}^{2} - 1\right)}{h}$

$= \cos \left({x}^{2} - 1\right) \frac{\cos \left(2 x h + {h}^{2}\right) - 1}{h} - \sin \left({x}^{2} - 1\right) \sin \frac{2 x h + {h}^{2}}{h}$

$= \cos \left({x}^{2} - 1\right) \frac{\cos \left(2 x h + {h}^{2}\right) - 1}{h \left(2 x + h\right)} \left(2 x + h\right) - \sin \left({x}^{2} - 1\right) \sin \frac{2 x h + {h}^{2}}{h \left(2 x + h\right)} \left(2 x + h\right)$

We will use the following limits:

${\lim}_{h \rightarrow 0} \frac{\cos \left(2 x h + {h}^{2}\right) - 1}{h \left(2 x + h\right)} = {\lim}_{t \rightarrow 0} \frac{\cos t - 1}{t} = 0$

${\lim}_{h \rightarrow 0} \sin \frac{2 x h + {h}^{2}}{h \left(2 x + h\right)} = {\lim}_{t \rightarrow 0} \sin \frac{t}{t} = 1$

And ${\lim}_{h \rightarrow 0} \left(2 x + h\right) = 2 x$

To evaluate the limit:

$\cos \left({x}^{2} - 1\right) \left(0\right) \left(2 x\right) - \sin \left({x}^{2} - 1\right) \cdot \left(1\right) \cdot \left(2 x\right) = - 2 x \sin \left({x}^{2} - 1\right)$