设t=tan(x/2),则x=2arctant,dx=2/(1+t²) dt
∫dx/(sinx+cosx)
=∫1/[2t/(1+t²)+(1-t²)/(1+t²)]·2/(1+t²) dt
=∫2/(-t²+2t+1) dt
=-2∫1/(t²-2t-1) dt
=-2∫1/[(t-1-√2)(t-1+√2)] dt
=-√2/2 ∫[1/(t-1-√2)-1/(t-1+√2)] dt
=-√2/2( ln|t-1-√2|-ln|t-1+√2|)+C
=-√2/2 ln|(t-1-√2)/(t-1+√2)|+C
=-√2/2 ln|(tanx/2-1-√2)/(tanx/2-1+√2)|+C