When trying to integrate $\frac{1}{1+sin(x)}$, I used two methods.
Weierstrass substitution gives me
$\frac{-2}{\tan(\frac{x}{2}) + 1}$Multiplying by the conjugate gives me
$\tan x - \frac{1}{\cos x}$
Yet when I plug in numbers, I get different results
$\tan(0) - \frac{1}{\cos(0)} = -1-\frac{2}{t+\tan(\frac{0}{2})} = -2$
$\tan(90) - \frac{1}{\cos(90)} =$ undefined$ -\frac{2}{t+\tan(\frac{90}{2})} = -1$
https://www.youtube.com/watch?v=CKuE9hFDec8 https://www.youtube.com/watch?v=6pGLK7iPpmA
These two videos by the same person did the same two methods and got the same answers, so I don't think I made any calculation errors.