Evaluate $\int_0^{\frac{\pi}{2}}\frac{x^2}{1+\cos^2 x}dx$ Evaluate the following integral
$$\int_0^{\frac{\pi}{2}}\frac{x^2}{1+\cos^2 x}dx$$
This function does not have an elementary anti-derivative. How can we solve this?
 A: $\newcommand{\+}{^{\dagger}}%
 \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{\ceil}[1]{\,\left\lceil #1 \right\rceil\,}%
 \newcommand{\dd}{{\rm d}}%
 \newcommand{\ds}[1]{\displaystyle{#1}}%
 \newcommand{\equalby}[1]{{#1 \atop {= \atop \vphantom{\huge A}}}}%
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}%
 \newcommand{\fermi}{\,{\rm f}}%
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}%
 \newcommand{\half}{{1 \over 2}}%
 \newcommand{\ic}{{\rm i}}%
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}%
 \newcommand{\isdiv}{\,\left.\right\vert\,}%
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}%
 \newcommand{\ol}[1]{\overline{#1}}%
 \newcommand{\pars}[1]{\left( #1 \right)}%
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}%
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,#2\,}\,}%
 \newcommand{\sech}{\,{\rm sech}}%
 \newcommand{\sgn}{\,{\rm sgn}}%
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}%
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
Following $\large\verb*@RonGordon*$ fine answer, there is another way to evaluate ${\rm I}\pars{a}$ without introducing the 'little bumps' in the $C$ contour. For this purpose, it's useful to use the identities:
$$
{1 \over \omega \pm \ic 0^{+}} = \pp{1 \over \omega} \mp \ic\pi\delta\pars{\omega}
\quad\mbox{where}\quad\pp\ \mbox{denotes the}\ {\it\mbox{Principal Part}}.
$$ 
\begin{align}
K& = {1 \over 8}\int_{-\pi}^{\pi}{y^{2} \over 3 + \cos\pars{y}}\,\dd y
=
-\,{1 \over 8}\,\lim_{a \to 0}
\totald[2]{}{a}\int_{-\pi\ +\ 0^{+}}^{\pi\ -\ 0^{+}}
{\expo{\ic ay} \over 3 + \cos\pars{y}}\,\dd z
\\[3mm]&=
{1 \over 4}\ic\lim_{a \to 0}\totald[2]{}{a}
\oint_{-\pi\ +\ 0^{+}}^{\pi\ -\ 0^{+}}{z^{a} \over z^{2} + 6z + 1}\,\dd z
\\[3mm]&=
{1 \over 4}\ic\lim_{a \to 0}\totald[2]{}{a}\left\lbrack%
\overbrace{\oint_{C}{z^{a} \over z^{2} + 6z + 1}\,\dd z}^{\ds{=\ 0}}\right.
\\[3mm]&\left.\vphantom{\Huge A^{A^{A}}}-
\int_{-1}^{0}
{\pars{-x}^{a}\expo{\ic\pi a}
 \over \pars{x + \ic 0^{+}  - z_{+}}\pars{x - z_{-}}}\,\dd x
-
\int^{-1}_{0}
{\pars{-x}^{a}\expo{-\ic\pi a}
 \over \pars{x - \ic 0^{+}  - z_{+}}\pars{x - z_{-}}}\,\dd x\right\rbrack
\end{align}
where $\ds{z_{\pm} = -3 \pm 2\root{2}\,,\quad -1 < z_{+} < 0\,,\quad z_{-} < -1}$.

\begin{align}
K&={1 \over 4}\,\ic\,\lim_{a \to 0}\totald[2]{}{a}\left\lbrack%
-\expo{\ic\pi a}\int_{0}^{1}
{x^{a}\,\dd x \over \pars{x - \ic 0^{+} + z_{+}}\pars{x + z_{-}}}\right.
\\[3mm]&\left.\phantom{{1 \over 4}\,\ic\,\lim_{a \to 0}\totald[2]{}{a}\bracks{}}+
\expo{-\ic\pi a}\int_{0}^{1}
{x^{a}\,\dd x \over \pars{x + \ic 0^{+} + z_{+}}\pars{x + z_{-}}}\right\rbrack
\\[3mm]&=
{1 \over 4}\,\ic\,\lim_{a \to 0}\totald[2]{}{a}\bracks{%
-2\ic\sin\pars{\pi a}\ \pp\int_{0}^{1}
{{x^a}\,\dd x \over \pars{x + z_{+}}\pars{x + z_{-}}}
-2\pi\ic\cos\pars{\pi a}\,{1 \over -z_{+} + z_{-}}}
\\[3mm]&=\pi\ \pp\int_{0}^{1}
{\ln\pars{x} \over \pars{x + z_{+}}\pars{x + z_{-}}}\,\dd x
+ {\root{2} \over 16}\,\pi^{3}
\\[3mm]&=
{\root{2} \over 8}\,\pi\bracks{\int_{0}^{1}{\ln\pars{x} \over x + z_{-}}\,\dd x
-
\pp\int_{0}^{1}{\ln\pars{x} \over x + z_{+}}\,\dd x}  + {\root{2} \over 16}\,\pi^{3}
\\[3mm]&=
{\root{2} \over 8}\,\pi\bracks{{\rm Li_{2}}\pars{-3 - \root{2}}
-
\pp\int_{0}^{1}{\ln\pars{x} \over x + z_{+}}\,\dd x}  + {\root{2} \over 16}\,\pi^{3}
\end{align}

Also
\begin{align}
\pp\int_{0}^{1}{\ln\pars{x} \over x + z_{+}}\,\dd x
&=\lim_{\epsilon \to 0^{+}}\bracks{%
\int_{0}^{-z_{+} - \epsilon}{\ln\pars{x} \over x + z_{+}}\,\dd x
+
\int_{-z_{+} + \epsilon}^{1}{\ln\pars{x} \over x + z_{+}}\,\dd x}
\end{align}
A: Mathematica returns
$$
\frac{12 \pi  \text{Li}_2\left(3-2 \sqrt{2}\right)+\pi ^3}{24 \sqrt{2}},
$$
which does not look so appetizing.
