This has been bugging me for a long time now... Can anyone please help me?

Integrate dx/(sin(x) + cos(x))

I used the identy that t= tan(x/2)

So following the sin and cos substitutaion I have

dx = 2dt/1+t^2

sin(x) = 2t/(1+t^2)

cos(x) = (1-t^2)/(1+t^2)

thus we have

Integral (2dt/(1+t^2))/((2t + 1-t^2)/(1+t^2)

this simplifies to

Integral 2dt/(2t+1-t^2)

then factor down into

Integral -2dt/(t-1)^2 -2

t=sqrt(2)sec(a) +1

Integral -2dt/2(sec(a)^2 -1)

Integral -dt/(tan^2(a))

Am I way off?? there seems to be way to many substitutions or something... I would appreciate it very much!