solve x^2-2*27*cos45*x+27^2-31^2=0