Solution (source code)

= Solution

\b[Singularities and cuts.] There are four <simple poles> $z_j=e^{i(\pi/4+j\pi/2)}$, $j=0,1,2,3$, because the roots of $1+z^4$ are simple and do not coincide with $\pm1$. At $z=\pm1$, the local behavior is a nonzero constant times $(z\mp1)^{-1/2}$: these are square-root <branch points>. Infinity is not a <branch point>; on either branch $f(z)=O(z^{-5})$, so it extends there with a zero of order five. Three valid choices of <branch cuts> are the segment $[-1,1]$, the two rays $(-\infty,-1]\cup[1,\infty)$ joined through infinity, or a semicircular arc joining $-1$ to $1$ and avoiding the <poles>. A circuit about either endpoint changes the sign, while a circuit about both endpoints does not.

\b[Branch and residues.] On $\mathbb C\setminus[-1,1]$, let $s(z)=\sqrt{z^2-1}$ be the branch with $s(z)/z\to1$ at infinity, and define $\sqrt{1-z^2}=-is(z)$. Its upper boundary value on $(-1,1)$ is positive. The <residue> at a <simple pole> $z_j$ is
$$
\operatorname{Res}(f,z_j)=\frac{i}{4z_j^3s(z_j)}.
$$
For fully explicit values, put
$$
A=\sqrt{\frac{\sqrt2-1}{2}},\qquad B=\sqrt{\frac{\sqrt2+1}{2}}.
$$
In counterclockwise order $z_0,z_1,z_2,z_3$, the values of $s$ are $A+iB,-A+iB,-A-iB,A-iB$. Since $A^2+B^2=\sqrt2$, substitution yields
$$
\boxed{\begin{aligned}
r_0=r_2&=\tfrac18\bigl[A-B-i(A+B)\bigr],\\
r_1=r_3&=\tfrac18\bigl[B-A-i(A+B)\bigr].
\end{aligned}}
$$
A <branch point> has no ordinary <residue>, since it has no single-valued <Laurent series> on a punctured neighborhood. At infinity the <residue> is zero.

\b[Contour evaluation.] The original contour goes counterclockwise around a large circle and clockwise round the slit, with its upper lip directed to the right. The large-circle contribution is $O(R^{-4})$. Small endpoint arcs contribute $O(\epsilon^{1/2})$. The artificial slit extension from $1$ to $R$ has equal boundary values on both sides, so its contributions cancel. On $(-1,1)$ the two boundary values of $f$ are opposite. Thus, with $I$ denoting the requested real integral, the <residue theorem> gives
$$
2I=2\pi i\sum_{j=0}^3r_j,\qquad \sum_{j=0}^3r_j=-\frac{i}{2}(A+B).
$$
Therefore
$$
\boxed{I=\frac{\pi}{2}(A+B)=\frac{\pi}{2}\sqrt{1+\sqrt2}.}
$$