for the first derivative of f(theta)=2cos(theta)+cos^2(theta),

I got

f'(theta)=-2sin(theta)+2cos(theta)-sin(theta)=0

After simplifying it, the book had

(-sin(theta))(1+cos(theta))=0 ... how did they get (1+cos(theta))??? the answers is prob really simple but i am stuck on it if anyone could kindly help. @Mathematics