# How do you differentiate sqrt(cos(x)) by first principles?

Apr 3, 2017

$\frac{d}{\mathrm{dx}} \sqrt{\cos \left(x\right)} = - \sin \frac{x}{2 \sqrt{\cos \left(x\right)}}$

#### Explanation:

Let $f \left(x\right) = \sqrt{\cos \left(x\right)}$

Then:

$\frac{f \left(x + h\right) - f \left(x\right)}{h} = \frac{\sqrt{\cos \left(x + h\right)} - \sqrt{\cos \left(x\right)}}{h}$

$\textcolor{w h i t e}{\frac{f \left(x + h\right) - f \left(x\right)}{h}} = \frac{\left(\sqrt{\cos \left(x + h\right)} - \sqrt{\cos \left(x\right)}\right) \left(\sqrt{\cos \left(x + h\right)} + \sqrt{\cos \left(x\right)}\right)}{h \left(\sqrt{\cos \left(x + h\right)} + \sqrt{\cos \left(x\right)}\right)}$

$\textcolor{w h i t e}{\frac{f \left(x + h\right) - f \left(x\right)}{h}} = \frac{\cos \left(x + h\right) - \cos \left(x\right)}{h \left(\sqrt{\cos \left(x + h\right)} + \sqrt{\cos \left(x\right)}\right)}$

$\textcolor{w h i t e}{\frac{f \left(x + h\right) - f \left(x\right)}{h}} = \frac{\left(\cos \left(x\right) \cos \left(h\right) - \sin \left(x\right) \sin \left(h\right)\right) - \cos \left(x\right)}{h \left(\sqrt{\cos \left(x + h\right)} + \sqrt{\cos \left(x\right)}\right)}$

$\textcolor{w h i t e}{\frac{f \left(x + h\right) - f \left(x\right)}{h}} = \frac{\cos \left(x\right) \left(\cos \left(h\right) - 1\right) - \sin \left(x\right) \sin \left(h\right)}{h \left(\sqrt{\cos \left(x + h\right)} + \sqrt{\cos \left(x\right)}\right)}$

Now:

cos t = 1/(0!) - t^2/(2!) + O(t^4)

So:

(cos t - 1)/t = -t/(2!) + O(t^3)

And:

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

Also:

sin t = t/(1!) - O(t^3)

So:

$\sin \frac{t}{t} = 1 - O \left({t}^{2}\right)$

And:

${\lim}_{t \to 0} \left(\sin \frac{t}{t}\right) = 1$

So we find:

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

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

$= \frac{\left(0 \cdot \cos \left(x\right)\right) - \left(1 \cdot \sin \left(x\right)\right)}{\sqrt{\cos \left(x\right)} + \sqrt{\cos \left(x\right)}}$

$= - \sin \frac{x}{2 \sqrt{\cos \left(x\right)}}$

That is:

$\frac{d}{\mathrm{dx}} \sqrt{\cos \left(x\right)} = - \sin \frac{x}{2 \sqrt{\cos \left(x\right)}}$