Trigonometric Integrals $\int \frac{1}{1+\sin^2(x)}\mathrm{d}x$ and $\int \frac{1-\tan(x)}{1+\tan(x)} \mathrm{d}x$ Any idea of calculating this two integrals $\int \frac{1}{1+\sin^2(x)}\,dx$ and $\int \frac{1-\tan(x)}{1+\tan(x)} \mathrm{d}x$?
I found a solution online for the first one but it requires complex numbers which have not been taught by the professor.

For the first one you may use that trig. 1 $$\frac{1}{1+\sin^{2}(x)} = \frac{1}{\cos^{2}(x)+2\sin^{2}(x)}= \frac{1}{\cos^{2}(t)}\frac{1}{1+2\tan^{2}(x)}$$ Now it is pretty clear that the change of variable $\tan(x)=t$ reduces to a standard arctanget integral $\int{\frac{dt}{1+2t^{2}}}$
For the second one, notice that $$\frac{1-\tan(x)}{1+\tan(x)}= \frac{\cos(x)-\sin(x)}{\sin(x)+\cos(x)} = \frac{d}{dx}\left( \ln(\sin(x)+\cos(x))\right)$$
