If f(x)=√a2cos2x+b2sin2x+√a2sin2x+b2cos2x then the difference between the maximum and minimum values of {f(x)}2 is given by
(f(x))2=h(x)=a2+b2+2√(a2sin2x+b2cos2x)(a2cos2x+b2sin2x)
=a2+b2+2√a2b2(sin4x+cos4x)+(a4+b4)sin2xcos2x
=a2+b2+2√a2b2(1−2sin2xcos2x)+(a4+b4)sin2xcos2x
=a2+b2+2√a2b2+(a4+b4−2a2b2)sin2xcos2x
=a2+b2+2√a2b2+(a2−b2)2sin2xcos2x
=a2+b2+2√a2b2+(a2−b2)2sin22x4
Now
h(x) is maximum at x=π4
and minimum at x=π2
Hence
h(π4)=hmax=a2+b2+2√(a2−b2)2+4a2b24
=a2+b2+2√(a2−b2)2+4a2b24
=a2+b2+2√(a2+b2)24
=2(a2+b2) ...(i)
And
f(π2) gives
a2+b2+2ab ...(ii)
Hence
2(a2+b2)−(a2+b2+2ab)
=a2+b2−2ab
=(a−b)2