Integration of $\cos(x)/(5+\sin(x)^2)$ Is the following integration correct?
Consider the integral $\int_{-\pi}^\pi \frac{\cos(x)}{5+\sin(x)^2} dx$.
Substitute $y = \sin(x)$ then we have $\frac{dy}{dx} = \cos(x)$ and hence $dy = \cos(x) dx$ and we get
$$\int_{-\pi}^\pi \frac{\cos(x)}{5+\sin(x)^2}dx = \int_{\sin(-\pi)}^{\sin(\pi)} \frac{1}{5+y^2}dy = \int_{0}^{0} \frac{1}{5+y^2}dy = 0.$$
The substitution seems a bit odd, but the result $0$ is correct. Thanks in advance :)
 A: HINT:
The substitution $y=\sin(x)$ is not legitimate on $[-\pi,\pi]$ since the sine function does not have a unique inverse function there.  However, the sine function does have a uniquely definable inverse on $[0,\pi/2]$.
Note that we have from even symmetry
$$\begin{align}
\int_{-\pi}^\pi \frac{\cos(x)}{5+\sin^2(x)}\,dx&=2\int_0^{\pi}\frac{\cos(x)}{5+\sin^2(x)}\,dx\\\\
&=2\int_0^{\pi/2}\frac{\cos(x)}{5+\sin^2(x)}\,dx+2\int_{\pi/2}^\pi\frac{\cos(x)}{5+\sin^2(x)}\,dx \tag 1
\end{align}$$
Now the substitution $y=\sin(x)$ is legitimate on each of the integrals on the right-hand side of $(1)$.
A: Hint:
$$\cos(x) = \cos(-x)\\\sin(x)=-\sin(-x)$$
Can you use this to find an appropriate symmetry?
A: Hint: split the integral into two pieces $-\pi$ to $0$ and $0$ to $\pi$. Note the point symmetry of the integrand for the points $P_1=(-\pi/2,0)$ and $P_2=(\pi/2,0)$.  You can achieve this by substitution $x=u\pm \pi/2$ and $dx = du$. You should see that you will get odd functions after the substitutions, which both evaluate to $0$.

An alternative approach: Use the substitution $\sin(x)=\sqrt{5}u \implies \cos(x)dx=\sqrt{5}du$:
$$\int_{-\pi}^\pi \frac{\cos(x)}{5+\sin(x)^2}dx=\frac{1}{5}\int\frac{du}{1+u^2}=\frac{1}{5}\arctan(u)=\frac{1}{5}\arctan \left(\frac{\sin(x)}{\sqrt{5}}\right)\biggr|_{-\pi}^{\pi}=0$$
A: You are correct that the integral is 0.
To proceed with the integration:
do the substitution 
$\sin x = \sqrt 5 \tan t\\ \cos x \;dx = \sec^2 t\; dt$ 
$\int_{-\pi}^{\pi} \frac {\cos x}{5 + \sin^2 x} dx = \frac 1{\sqrt5} \tan^{-1}(\sqrt 5 \sin x)|_{-\pi}^{\pi}$
Does that really help to explain why it integrates to 0?
perhaps not.
The integrand is periodic with period $2\pi$, i.e. $f(x+2\pi) = f(x)$ and we are integrating over the full period.
Furthermore, over a full period, the wave spends equal time below the line as it does above the line.  $f(x) = -f(x+\pi) = -f(x-\pi)$
For every point in the interval, there is a corresponding point where $f(a) = -f(b).$  And, that means that over any interval of $2\pi$ the integral will be $0.$
