Concept:The integrand is simplified by rewriting tanx and cotx in terms of sinx and cosx, then using the substitution t=sinx−cosx.Explanation:Let I=∫0π/4(tanx+cotx)dx.Rewrite as I=∫0π/4(cosxsinx+sinxcosx)dx.Combine the fractions: I=∫0π/4sinxcosxsinx+cosxdx.Multiply numerator and denominator by 2: I=2∫0π/42sinxcosxsinx+cosxdx.Since 2sinxcosx=1−(sinx−cosx)2, we get I=2∫0π/41−(sinx−cosx)2sinx+cosxdx.Put t=sinx−cosx, so dt=(cosx+sinx)dx=(sinx+cosx)dx.Limits: when x=0, t=−1; when x=π/4, t=0.Thus I=2∫−101−t2dt=2[sin−1t]−10.Evaluate: I=2(sin−10−sin−1(−1))=2(0−(−2π))=2π.Answer:2π, hence option D.