First, expand the square:
(sinθ−cosθ)2=sin2θ−2sinθcosθ+cos2θ Substitute this back into the expression for M:
M=sin2θ−2sinθcosθ+cos2θ+2sin2θ+cotθ Rearrange the terms:
M=sin2θ+cos2θ+2sin2θ−2sinθcosθ+cotθ Use the identity sin2θ+cos2θ=1: M=1+2sin2θ−2sinθcosθ+cotθ Rewrite cotθ as sinθcosθ: M=1+2sin2θ−2sinθcosθ+sinθcosθ Combine the last two terms:
M=1+2sin2θ+sinθcosθ−2sin2θcosθ Factor cosθ from the numerator: M=1+2sin2θ+sinθcosθ(1−2sin2θ) Use the double angle formula cos(2θ)=1−2sin2θ: M=1+2sin2θ+sinθcosθcos(2θ) M=1+2sin2θ+cotθcos(2θ) However, let's retrace our steps from the earlier equation:
M=1+2sin2θ−2sinθcosθ+cotθ M=1+2sin2θ−sin(2θ)+cotθ Also consider
M=sin2θ−2sinθcosθ+cos2θ+2sin2θ+sinθcosθ M=3sin2θ−2sinθcosθ+cos2θ+sinθcosθ M=3sin2θ−sin(2θ)+cos2θ+sinθcosθ M=2sin2θ−sin(2θ)+sin2θ+cos2θ+sinθcosθ M=2sin2θ−sin(2θ)+1+sinθcosθ M=2sin2θ−sin(2θ)+1+cotθ M=1−sin(2θ)+cotθ+2sin2θ Let's go back to
M=1+2sin2θ−2sinθcosθ+cotθ M=1+2sin2θ−sin2θ+cotθ Let's try M=1+2sin2θ−sin2θ+sinθcosθ=1+2sin2θ−sin2θ+cotθ