# How do you differentiate y=(2+sinx)/(x+cosx)?

## I'm assuming I use f(x)/g(x)=((f'(x)g(x)-(f(x)g(x)))/[g(x)]^2), but I can't seem to get it to work for me. How exactly would I do something like this?

Mar 6, 2018

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

#### Explanation:

$\text{First, let's recall the Quotient Rule:}$

$\setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad {\left[f \frac{x}{g} \left(x\right)\right]}^{'} \setminus = \setminus \frac{g \left(x\right) f ' \left(x\right) - f \left(x\right) g ' \left(x\right)}{g {\left(x\right)}^{2}} \setminus \quad .$

$\text{We are given the function to differentiate:}$

$\setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad y \setminus = \setminus \frac{2 + \sin x}{x + \cos x} \setminus \quad .$

Use the quotient rule to derive the following:

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

y' = $\frac{\left[\left(x + \cos x\right) \left(\cos x\right)\right] - \left[\left(2 + \sin x\right) \left(1 - \sin x\right)\right]}{x + \cos x} ^ 2$

multiplying the numerator out gets you this:

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

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

$\setminus \quad \setminus \setminus$ = $\frac{x \cos x + {\cos}^{2} x - 2 + \sin x + {\sin}^{2} x}{x + \cos} ^ 2$

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

then the only simplification you can use is the trig identity

${\sin}^{2} + {\cos}^{2} = 1$

to get:

y' = $\frac{x \cos x + \sin x - 2 + 1}{x + \cos x} ^ 2$

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