If sin x + cos x = a, find the value of |sin x - cos x|.
sin x + cos x = a
squaring on both sides gives
sin2x+cos2x+2 sin x cos x=a2
1+sin 2x=a2
sin 2x=a2−1
If sin 2x=a2−1 then
(sin x−cos x)2=sin2x+cos2x−2 sin x cos
x=1−(a2−1)=2−a2
Take square root on both sides, we get
|sin x−cos x|=√2−a2