This is the integration I am trying to solve $$\int_{0}^{\pi} \sin^{2}(\theta)\sec^{3}(\theta)d\theta$$
putting $$z=e^{i\theta}$$ $$\int_{\gamma} \frac{-2{(z^{2}-1)}^2}{i(z-i)^{3}(z+i)^{3}}d\theta$$
when applying the residue theorem over a circle of radius 1, singularities are on the circle instead of inside the circle.How can we evaluate a integration like this
Thanks
Your integral can be written as $$ \int_0^{\pi}\sin^2(\theta)\sec^3(\theta)d\theta = \frac{1}{2}\int_0^{2\pi}\sin^2(\theta)\sec^3(\theta)d\theta = i\int_C\frac{(z^2-1)^2}{(z^2+1)^3}dz $$ Taking the following contour:
Then \begin{align} \int_0^{\pi}\sin^2(\theta)\sec^3(\theta)d\theta &= \frac{1}{2}\int_0^{2\pi}\sin^2(\theta)\sec^3(\theta)d\theta\\ & = i\int_C\frac{(z^2-1)^2}{(z^2+1)^3}dz\\ & = i\pi\sum\text{Res}\\ & = i\pi\biggl[\lim_{z\to i}\frac{d^2}{dz^2}(z-i)^3\frac{(z^2-1)^2}{(z^2+1)^3} + \lim_{z\to -i}\frac{d^2}{dz^2}(z+i)^3\frac{(z^2-1)^2}{(z^2+1)^3}\biggr] \end{align}