sinQ+sin^2Q=1
sinQ=1-sin^2Q=cos^2Q
3cos^2Q+cos^4Q - 2sinQ+1
=3cos^2Q+sin^2Q -2cos^2Q+1
=cos^2Q + sin^2Q +1
=2