If we let t = tan ( x/2 ) , - π < x < π , then by sketching a right triangle we get
cos( x/2 ) = 1/ √(1+t2) and sin ( x/2 ) = t/ √(1+t2).
Then by using the double angle formulas we obtain
cos( x ) = (1 - t2 )/ (1+ t2 ) , sin ( x ) = 2t / (1+ t2 ) and tan( x ) = 2t / (1- t2 )
Also d x = [ 2/ ( 1+ t2 )] d t.
Substituting the above to the original integral we can convert into an ordinary rational function of t.
Therefore ∫ dx / ( sin x + tan x ) = ∫ [2 / ( 1+ t2 ) d t ] / [ 2 t / ( 1+ t2 ) + 2 t / ( 1- t2 ) ] =
=( 1/2 ) ∫[( 1- t2 ) d t ] / t = (1 /2 ) ∫(d t)/t + (1/2) ∫t d t = ( 1/ 2) ln t + ( 1/4 ) t2 +ξ =
= ( 1/ 2) ln [tan(x/2)] + ( 1/4 ) [ tan(x/2)]2 +ξ , where ξ is a constant.
Thanks for the question. This was a "juicy" one.