the first one substitute u=cosx the other tan^2x+1=sec^x .... tan^2x=sec^2-1 and now the integrate for sec^2x =tanx and integrate of -1 =-x
you know the answer right ??
but if you derive my answer you will get the integral I try it I think there is no problem if I multiply with 1-sinx
or if the integral have limits then we should look at the interval [0,pi/2]
I cant multiply with 1-sinx or 1-cosx or 1-tanx .....