First of all, we must use the equivalent formula of cos2x, it is cos2x=2cos^2x-1, the equation has become 2cos^2x-1 +2cosx +1 = 0, it means 2cos^2x+2cosx = 0, or cosx(cosx+1)=0, we get cosx=0, implying x=Pi/2, or (cosx+1)=0, cosx= -1 implying x = Pi for x=0, cos2*0+2cos0+1=1+2+1=4 impossible for x= Pi, cos2*Pi+2cosPi+1=1-2+1=0 it is exact , so the solution is x=Pi