f(x)=(sinx-cosx)sinx
=sin^2x-sinx*cosx
=(1-cos2x)/2-1/2sin2x
=1/2-1/2cos2x-1/2sin2x
=1/2-√2/2(√2/2*sin2x+√2/2cos2x)
=1/2-√2/2sin(2x+π/4)
f(x)=(sinx-cosx)sinx
=sin^2x-sinx*cosx
=(1-cos2x)/2-1/2sin2x
=1/2-1/2cos2x-1/2sin2x
=1/2-√2/2(√2/2*sin2x+√2/2cos2x)
=1/2-√2/2sin(2x+π/4)