\(\sin^6a+\cos^6a+3\sin^2a-\cos^2a\\ =\sin^6a+3\sin^2\cos^2\left(\sin^2a+\cos^2a\right)+\cos^6a-3\sin^2a\cos^2a\left(\sin^2a+\cos^2a\right)+3\sin^2a-\cos^2a\\ =\left(\sin^2a+\cos^2a\right)^3-3\sin^2a.\cos^2a.1+3\sin^2a-cos^2a\\ =1^3-\cos^2a+3\sin^2a-3\sin^2\cos^2\\ =\left(1-\cos^2a\right)\left(3\sin^2a+1\right)\)