# How do you find the derivative of sin^2x+cosx?

I found: f$(x)=sin(x)[2cos(x)-1] #### Explanation: For the ${\sin}^{2} \left(x\right)$ I would use the Chain Rule deriving the ${\left(\right)}^{2}$ first and $\sin$ after, getting: f$(x)=2sin(x)cos(x)-sin(x)=
$= \sin \left(x\right) \left[2 \cos \left(x\right) - 1\right]$
(Alternately, if you want, you can write: ${\sin}^{2} \left(x\right) = \sin \left(x\right) \sin \left(x\right)$ and use the Product Rule).