Considering the general case
#a sin x+ b cos x = ?# we can proceed with calling
#c= sqrt(a^2+b^2)# and
#a sin x+ b cos x = c(a/c sin x+b/c cosx)#
but there exists by construction #phi# such that
#a/c = cos phi# and #b/c = sin phi# so
# c(a/c sin x+b/c cosx)=c(sin x cos phi + cos x sin phi)# and
#c(sin x cos phi + cos x sin phi) = c sin(x + phi)#
In our case
#2(sinx-cosx)= 2(a sin x + b cos x)# then
#{(a = 1),(b = -1):} rArr c = sqrt2# and
#cos phi = 1/sqrt2#
#sin phi = -1/sqrt2#
and also
#phi = arctan phi = arctan(-1/sqrt2,1/sqrt2) = 3/4 pi#
and finally
#2(sinx-cosx)= 2 sqrt2 sin(x + 3/4 pi)#