Let s=sinx and c=cosx.
Then sin2x=s2,cos2x=c2,cos2x=c2−s2,sin2x=2sc.
The determinant becomes
f(x)=s21+s2s21+c2c2c2c2−s2c2−s22sc.
Apply the row operations R2→R2−R1 and R3→R3−R1:
f(x)=s2101+c2−1−1c2−s202sc−c2+s2.
Expand using the first row:
First form the cross product of the second and third rows: [1,−1,0]×[0,−1,2sc−c2+s2]=(−t,−t,−1) where t=2sc−c2+s2.
Dotting this with the first row gives
f(x)=s2(−t)+(1+c2)(−t)+(c2−s2)(−1).
Since s2+c2=1, we get s2+1+c2=2, hence
f(x)=−2t−(c2−s2).
Substituting t=2sc−(c2−s2):
f(x)=−2(2sc−(c2−s2))−(c2−s2)=−4sc+(c2−s2).
Using c2−s2=cos2x and 2sc=sin2x, we obtain
f(x)=cos2x−2sin2x.
Put y=2x (so y∈R). Then
f(x)=g(y)=cosy−2siny.
Write this as a single sine function.
The general form acosy+bsiny has amplitude a2+b2.
Here a=1,b=−2⇒a2+b2=1+4=5.
Therefore −5≤g(y)≤5, so the maximum value is 5.
Hence the maximum value of f(x) is 5, which corresponds to Option C.