The 2 is a constant, so you wouldn't differentiate it. You should get:
f(x) = x^2 -1/2 * cos(x) <~the problem
solution:
Multiply -1 by cos to get -cos(x)
x^2 - cos(x)(1)/2 <~this two
d/dx(x^2) = 2x
d/dx(cos(x)(1)/2) = sin(x)*1+(-cos(x))*0 = sin(x)+0 = sin(x)
d/dx (x^2 -1/2 * cos(x)) = 2x+sin(x)
My question is what happened to the two in the denominator? We never worked with it. but if you take the derivitive of the 2 it's zero and anything divided by 0 is undef.... Right??