Riemann integral on trigonometric functions I have to calculate Riemann integral of function $g:[0;\pi/4]\rightarrow\mathbb{R}$ (on interval $[0;\pi/4]$) given as $g(x)=\frac{\tan(x)}{(\cos(x)^2-4)}$. Function $g$ is continous on interval $[0;\pi/4]$ so it is enough to calculate $\int_0^{\frac{\pi}{4}}{\frac{\tan(x)}{(\cos(x)^2-4)}}$. How to do that?

By substituting $x=\arctan(t)$ we have:
$$ I=\int_{0}^{\pi/4}\frac{\tan(x)}{\cos^2(x)-4}=\int_{0}^{1}\frac{t\,dt}{(t^2+1)\left(\frac{1}{1+t^2}-4\right)}=-\int_{0}^{1}\frac{t\,dt}{3+4t^2}$$
so:
$$ I = -\frac{1}{8}\int_{0}^{1}\frac{8t\,dt}{3+4t^2} = -\frac{1}{8}\left.\log(3+4t^2)\right|_{0}^{1} = \color{red}{\frac{1}{8}\,\log\frac{3}{7}}.$$
