Help calculating two integrals-- generalized and definite 
The first one is to calculate
$$\int_{-\infty}^{\infty} \frac{1}{(1+4x^2)^2} dx.$$

I think this one should be solvable with the method of substitution but I tried using $t=4x^2$ which didn't work well, or where I have miscalculated something.

The second one is, for every $n\in\mathbb N$, to calculate
$$\int_{-1}^{1} (1-x^2)^n dx.$$

So, I really don't know how to solve the second integral. Maybe through the use of $n=1,2,3,\cdots$ and look for any patterns?
 A: As Jack mentioned, we have
$$I=\int_{-\infty}^{\infty} \frac{1}{(1+4x^2)^2} dx=2\int_{0}^{\infty} \frac{1}{(1+4x^2)^2} dx$$
Set $x=\frac{1}{2}\tan \theta$, we have
$$I=\int_{0}^{\frac{\pi}{2}} \cos^2\theta \,d\theta=\frac{1}{2}\beta\left(\frac 12,\frac 32\right)$$
Second Integral
$$J=\int_{-1}^{1} (1-x^2)^n dx=2\int_{0}^{1} (1-x^2)^n dx$$
Set $x^2=t$, we have
$$J=\int_{0}^{1} t^{-\frac{1}{2}}(1-t)^ndt =\beta\left(\frac{1}{2},n+1\right)$$
A: Alternative approach for the first integral: by Residue Theorem
$$\int_{-\infty}^{+\infty}\frac{dx}{(1+4x^2)^2}=2\pi i\cdot\mbox{Res}\left(\frac{1}{(1+4z^2)^2},\frac{i}{2}\right)\\=2\pi i\cdot-\frac{1}{4}\frac{d}{dz}\left(\frac{1}{(1-2iz)^2}\right)_{z=i/2}=2\pi i\cdot\left(-\frac{i}{8}\right)=\frac{\pi}{4}.$$
Alternative approach for the second integral: for $n>0$,
$$I_n:=\int_{-1}^1 (1-x^2)^n dx=\left[ (1-x^2)^n x\right]_{-1}^1 -n\int_{-1}^1 x(1-x^2)^{n-1} (-2x) dx\\
=-2n\int_{-1}^1 (1-x^2)^{n-1} (-x^2+1-1) dx=-2n I_n+2nI_{n-1}.$$
Hence 
$$I_n=\frac{2n}{2n+1}\cdot I_{n-1}=\frac{(2n)\cdot (2n-2)}{(2n+1)\cdot(2n-1)}\cdot I_{n-2}=\cdots=\frac{(2n)!!}{(2n+1)!!}\cdot I_0=2\cdot \frac{(2n)!!}{(2n+1)!!}.$$
A: For the first one, integrating by parts, 
$$\int\dfrac1x\cdot\dfrac x{(1+4x^2)^2}dx$$
$$=\dfrac1x\int\dfrac x{(1+4x^2)^2}dx-\int\left(\dfrac{d(1/x)}{dx}\int\dfrac x{(1+4x^2)^2}dx\right)dx$$
$$=-\dfrac1{8x(1+4x^2)}-\int\dfrac{dx}{8x^2(1+4x^2)}$$
Now,
$$\int\dfrac{dx}{x^2(1+4x^2)}=\int\dfrac{1+4x^2-4x^2}{x^2(1+4x^2)}dx$$
A: $\newcommand{\angles}[1]{\left\langle\,{#1}\,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\Li}[1]{\,\mathrm{Li}_{#1}}
 \newcommand{\mc}[1]{\,\mathcal{#1}}
 \newcommand{\mrm}[1]{\,\mathrm{#1}}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$


*

*\begin{align}
\color{#f00}{\int_{-\infty}^{\infty}{\dd x \over \pars{1 + 4x^{2}}^{2}}} & =
\int_{0}^{\infty}{\dd x \over \pars{1 + x^{2}}^{2}} =
-\lim_{\mu \to 1}\,\partiald{}{\mu}\int_{0}^{\infty}{\dd x \over  x^{2} + \mu}
\\[5mm] & =
-\lim_{\mu \to 1}\,\partiald{}{\mu}
\pars{\mu^{-1/2}\int_{0}^{\infty}{\dd x \over  x^{2} + 1}} =
-\lim_{\mu \to 1}
\pars{-\,\half\,\mu^{-3/2}\,\,\,{\pi \over 2}} = \color{#f00}{\pi \over 4}
\end{align}



*\begin{align}
\mc{J} & =
\color{#f00}{\int_{-\infty}^{\infty}{\dd x \over \pars{1 + 4x^{2}}^{2}}} =
\int_{0}^{\infty}{\dd x \over \pars{1 + x^{2}}^{2}}\ =\
\overbrace{\int_{0}^{\infty}{\dd x \over x^{2}\bracks{\pars{1/x - x}^{2} + 4}}}
^{\ds{\mc{J}}}
\\[5mm] 
\stackrel{x\ \mapsto\ 1/x}{=} &\
\underbrace{\int_{0}^{\infty}{\dd x \over \pars{1/x - x}^{2} + 4}}_{\ds{\mc{J}}}
=
\half\pars{\mc{J} + \mc{J}} =
\half\int_{0}^{\infty}
{1 \over \pars{1/x - x}^{2} + 4}\,\pars{1 + {1 \over x^{2}}}\,\dd x
\\[5mm] &
\stackrel{\pars{x - 1/x}\ \mapsto\ x}{=}\,\,\,\,\,
\half\int_{-\infty}^{\infty}{\dd x \over x^{2} + 4} =
{1 \over 4}\int_{-\infty}^{\infty}{\dd x \over x^{2} + 1} =
\color{#f00}{\pi \over 4}
\end{align}

A: The first integral can also be evaluated using Glaisher's theorem, which says that if:
$$f(x)=\sum_{n=0}^{\infty}(-1)^n c_n x^{2n}$$
then we have:
$$\int_{0}^{\infty}f(x) dx = \frac{\pi}{2}c_{-\frac{1}{2}}$$
if the integral converges and where an appropriate analytic continuation of the series expansion coefficients has to be used (e.g. factorials replaced by gamma functions). This is a special case of Ramanujan's master theorem.
In this case we can easily obtain the series expansion. Differentiating the the geometric series:
$$\frac{1}{1+u} = \sum_{n=0}^{\infty}(-1)^n u^n$$
yields:
$$\frac{1}{(1+u)^2} = \sum_{n=0}^{\infty}(-1)^n (n+1)u^n$$
We thus have:
$$\frac{1}{(1+4 x^2)^2} = \sum_{n=0}^{\infty}(-1)^n (n+1)4^n x^{2n}$$
This means that $c_n = (n+1)4^n$ and $c_{-\frac{1}{2}} = \frac{1}{4}$, the integral from minus to plus infinity is thus $\frac{\pi}{4}$.
