# What is the derivative of ( cos (x) ) / ( 2 + sin (x) )?

$f ' \left(x\right) = \setminus \frac{- 2 \setminus \sin x - 1}{{\left(2 + \setminus \sin x\right)}^{2}}$

#### Explanation:

Given function:

$f \left(x\right) = \setminus \frac{\setminus \cos x}{2 + \setminus \sin x}$

Differentiating above function w.r.t. $x$ using quotient rule as follows

$\frac{d}{\mathrm{dx}} f \left(x\right) = \frac{d}{\mathrm{dx}} \left(\setminus \frac{\setminus \cos x}{2 + \setminus \sin x}\right)$

$f ' \left(x\right) = \setminus \frac{\left(2 + \setminus \sin x\right) \frac{d}{\mathrm{dx}} \left(\setminus \cos x\right) - \setminus \cos x \frac{d}{\mathrm{dx}} \left(2 + \setminus \sin x\right)}{{\left(2 + \setminus \sin x\right)}^{2}}$

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

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

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

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

Jul 27, 2018

$- \frac{2 \sin x + 1}{2 + \sin x} ^ 2$

#### Explanation:

We have a quotient here, so we can find the derivative using quotient rule which, if you forgot, is:

$\frac{d}{\mathrm{dx}} \left(g \frac{x}{h \left(x\right)}\right) = \frac{g ' \left(x\right) \cdot h \left(x\right) - h ' \left(x\right) \cdot g \left(x\right)}{{h}^{2} \left(x\right)}$

So let's apply it:

$f \left(x\right) = \cos \frac{x}{2 + \sin x}$

$f ' \left(x\right) = \setminus \frac{\left(2 + \setminus \sin x\right) \frac{d}{\mathrm{dx}} \left(\setminus \cos x\right) - \left(\setminus \cos x\right) \frac{d}{\mathrm{dx}} \left(2 + \setminus \sin x\right)}{{\left(2 + \setminus \sin x\right)}^{2}}$

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

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

$f ' \left(x\right) = \frac{- 2 \sin x - \left(\textcolor{red}{{\sin}^{2} x + {\cos}^{2} x}\right)}{2 + \sin x} ^ 2$

To simplify this further, we can use the pythagorean identity:
color(red)(sin^2x+cos^2x=1

So:

$f ' \left(x\right) = \frac{- 2 \sin x - 1}{2 + \sin x} ^ 2$ or $- \frac{2 \sin x + 1}{2 + \sin x} ^ 2$