Let us solve one problem using Weierstrass substitution
∫ 1/(1 + cos x + sin x) dx applying Weierstrass substitution
t= tan x/2 , sin x = 2 t/(1 + t²), cos x= 1 - t²)/ (1 + t²) , dx= 2 dt/ (1 + t²)
= ∫ 1/ 1 +( 1 - t²/1 + t²) + (2 t / 1 + t²) • 2/1 + t² dt
= 2 ∫ 1/ 1 + 1 - t²/1 + t² + 2 t /1 + t² • 1/1 + t² dt
= 2 ∫ 1/ [ (1 + t² + 1 - t² + 2 t) / (1 + t²) ] • (1/1 + t²) dt { take common denominator}
= 2 ∫ 1/ [ (2 + 2 t) / (1 + t²) ] • 1/(1 + t²) dt
= 2 ∫ (1 + t²) / (2 + 2 t) • ( 1 + t² ) dt { (1 + t²) cancels out }
= 2 ∫ 1 / (2 + 2 t) dt
= 2 ∫ 1 / 2 ( 1 + t ) dt
= 2/2 ∫ 1/ ( 1 + t ) dt
= ∫ 1/ ( 1 + t ) dt
= ln | 1 + t | dt + C { substituting back t = tan x/2 }
= ln | 1 + tan x/2 | + C