If sin x + cos x = a, Find the Value of |sin x − cos x|
Question
If
\[ \sin x+\cos x=a, \]find the value of
\[ |\sin x-\cos x|. \]Solution
Given
\[ \sin x+\cos x=a. \]Squaring both sides,
\[ a^2 = (\sin x+\cos x)^2 \] \[ = \sin^2x+\cos^2x+2\sin x\cos x \] \[ = 1+2\sin x\cos x. \]Now,
\[ (\sin x-\cos x)^2 = \sin^2x+\cos^2x-2\sin x\cos x \] \[ = 1-(a^2-1) \] \[ = 2-a^2. \]Taking positive square root because of the modulus sign,
\[ |\sin x-\cos x| = \sqrt{\,2-a^2\,}. \]