∫dxsinx+cosx
=∫dx2tanx21+tan2x2+1−tan2x21+tan2x2
=∫1+tan2x21−tan2x2+2tanx2
=∫sec2x21−tan2x2+2tanx2
Let tanx2=t ⇒12sec2x2dx=dt
⇒sec2x2dx=2dt
Replacing the values, we get
I=∫dt1−t2+2t
=∫2dt1−(t2−2t)
=∫2dt2−(t−1)2
=2∫dt(√2)2−(t−1)2
=1√2log∣∣
∣∣√2+(t−1)√2−(t−1)∣∣
∣∣+C
=1√2log∣∣
∣
∣∣√2+tanx2−1√2−tanx2+1)∣∣
∣
∣∣+C