Solve for x -2sin(x)^2+cos(x)+1=0