\(cotx-tanx=\frac{cosx}{sinx}-\frac{sinx}{cosx}=\frac{cos^2x-sin^2x}{sinx.cosx}=\frac{cos2x}{\frac{1}{2}sin2x}=2cot2x\)
\(\frac{cos^2x-sin^2x}{1+sin2x}=\frac{\left(cosx-sinx\right)\left(cosx+sinx\right)}{sin^2x+cos^2x+2sinx.cosx}=\frac{\left(cosx-sinx\right)\left(cosx+sinx\right)}{\left(cosx+sinx\right)^2}=\frac{cosx-sinx}{cosx+sinx}\)
\(=\frac{\frac{cosx}{cosx}-\frac{sinx}{cosx}}{\frac{cosx}{cosx}+\frac{sinx}{cosx}}=\frac{1-tanx}{1+tanx}\)