How does this become 1? What trig identities am would I use to solve this?

#2sin^2(x/2) + cosx =1#