Well, 9 years later, this answer is going to utilize an approach via a contour integral. Denote
I=∫1−11x1+x1−x−−−−−√ln(2x2+2x+12x2−2x+1)dx∈R
our integral of interest.
Complex function
Let
f(z)=1zz+1z−1−−−−−√(ln(2z+1+i2z−1+i)+πi2),
where
w−−√and
lnware chosen such that they have a branch cut at the negative real axis (the so-called
principal branches) in
w-plane, that is
argw∈(−π,π]. We denote
h(z)=1zz+1z−1−−−−−√,g(z)=ln(2z+1+i2z−1+i)+πi2
so
f(z)=h(z)g(z). To find the branch cuts of
f(z), we need to find which points on the
z-plane are mapped onto the negative real axis in
w. That is to solve
w−−√B.C.:w=z+1z−1=−t,t>0;lnwB.C.:w=2z+1+i2z−1+i=−t,t>0.
After simple manipulations, we arrive at
h(z)B.C.:z=t−1t+1∈(−1,1);g(z)B.C.:z=t−12(t+1)−i2∈(−1−i2,1−i2).
where
(z1,z2)means here a line segment from
z1to
z2for any in general complex
z1,z2.
Poles and residues
At z→∞, we have f(z)=πi2z+O(1/z2), a simple pole. So
Res∞f(z)=−limz→∞zf(z)=−πi2.
Note that there is no pole at
z=0since
2z+1+i2z−1+i=−i−2iz+O(z2),
so
g(z)=−πi2+2z+πi2+O(z2)=2z+O(z2),
which cancels the simple pole of
h(z)at
0±0i.
Branch jumps
- (−1,1):Let t∈(−1,1). Since the complex square root function changes sign on the branch discontinuity, h(t+i0)=−h(t−i0)and so f(t+i0)=−f(t−i0).
- (−1−i2,1−i2):Let t∈(−1/2,1/2). For z=t−1/2i±i0,
2z+1+i2z−1+i∣∣∣t−i/2±i0=−r+(2z+1+i2z−1+i)′∣∣∣t−i/2(±i0)=−r−4(1−2t)2(±i0)=−r∓i0.
where −ris some negative number (branch cut mapped on negative numbers −r). Hence, g(t+i0)−g(t−i0)=ln(−r−i0)−ln(−r+i0)=−2πi.
Residue theorem
We integrate f(z)along contour Cdefined in Figure below. The contour is also split as C=C1+…+C6.

According to the Residue theorem,
∮Cf(z)dx=−2πiRes∞f(z)=−π2.
On the other hand,
∮Cf(z)dz=∑k=16∫Ckf(z)dz.(1)
Parametrisation
For C1,…C6, we have the following parametrisation:
- ⊝C1:z=t+i0,t∈(−1,1),dz=dt; Since h(z)has a branch cut here, f(t+i0)=h(t+i0)g(t). To obtain h(t+i0), we first compute
z+1z−1∣∣∣t+i0=z+1z−1∣∣∣t+(z+1z−1)′∣∣∣ti0=−1+t1−t−2(1−t)2i0=−1+t1−t−i0,
so h(t+i0)=−it1+t1−t−−−√. For g(z), we can write g(t)=ln∣∣∣2t+1+i2t−1+i∣∣∣+arg(2t+1+i2t−1+i)+πi2=12ln(2t2+2t+12t2−2t+1)+iξ(t)
for some real function ξ(t)which vanishes at t=0. Although we don't need this function, we express it anyway for completeness: Since −π<arg(2t+1+i)−arg(2t−1+i)<π, we have arg(2t+1+i2t−1+i)=arg(2t+1+i)−arg(2t−1+i)and so ξ(t)=arctan(2t−1)−arctan(2t+1)+π2.
Overall, f(t+i0)=−it1+t1−t−−−−−√(12ln(2t2+2t+12t2−2t+1)+iξ(t)).
Hence ∫C1f(z)dz=−∫⊝C1f(z)dz=−∫1−1f(t+i0)dt=i2I−I0,
where we denote I0=∫1−1ξ(t)t1+t1−t−−−−−√dt∈R.
- C2: Using knowledge of branchjumps,
∫C2f(z)dz=−∫⊝C2f(z)dz=−∫C1(−f(z))dz=i2I−I0.
- C3=⊝C6, so
∫C3f(z)dz+∫C6f(z)dz=∫C3f(z)dz−∫⊝C6f(z)dz=0
- C4: Using knowledge of branchjumps,
∫C4f(z)dz=−∫⊝C4h(z)g(z)dz=−∫C5h(z)(g(z)−2πi)dz=−∫C5f(z)dz+2πi∫C5h(z)dz.
Comparison & Antiderivative
Comparing the terms, that is by using (1), we get
−π2=iI−2I0+2πi∫C5h(z)dz.(2)
We now solve the remaining integral ∫C5h(z)dz. For brevity, we denote a=−1−i2,b=1−i2, so C5=(a,b). Notice h(z)is now holomorphic in the vicinity of C5. If we find its antiderivative H(z)also holomorphic there, then
∫C5h(z)dz=H(b)−H(a).(3)
This task is rather simple. First, we start by integrating h(z)as if it was a real function. For x>1, we have by substitution (x−1)/(x+1)=u2,
∫h(x)dx=∫1xx+1x−1−−−−−√dx=∫4u2u4−1du=2argcoth(x+1x−1−−−−−√)+2arccot(x+1x−1−−−−−√).
Hence, a suitable antiderivative in the complex plane is the following:
H(z)=ln⎛⎝⎜z+1z−1−−−√+1z+1z−1−−−√−1⎞⎠⎟−iln⎛⎝⎜z+1z−1−−−√+iz+1z−1−−−√−i⎞⎠⎟.
We know the branch of H(z)due to ν=z+1z−1−−−√is z∈(−1,1). Assuming the principal branches, we now check where are the other possible branches of H(z)due to ln's.
lnwB.C.:w=ν+1ν−1=−t,t>0;lnwB.C.:w=ν+iν−i=−t,t>0.
w(ν)B.C.:ν=t−1t+1=∈(−1,1);w(ν)B.C.:ν=it−1t+1∈(−i,i).
H(z)B.C.:z=ν2+1ν2−1∈(−∞,0).
Hence, the B.C. of H(z)lies at (−∞,1), safely away from C5. Substituting (3)into (2), we get the value of I. And as a bonus, also I0. For I,
I=2πRe(H(a)−H(b)).(4)
Substituing aand binto z+1z−1, we get
a+1a−1=−15+2i5=1q2e2αi,b+1b−1=−1+2i=q2e2αi
with
q=51/4>1and
α=π2−12arctan2. Note that
π/4<α<π/2, so
a+1a−1−−−−−√=1qeαi,b+1b−1−−−−−√=qeαi.
In the case of b, substituing into ν=z+1z−1−−−√and after simple manipulations,
ν+1ν−1∣∣∣ν=qeαi=q2−2iqsinα−1q2−2qcosα+1,ν+iν−i∣∣∣ν=qeαiq2+2iqcosα−1q2−2qsinα+1.
Hence, since the denominators are real,
H(b)=ln(q2−2iqsinα−1)−ln(q2−2qcosα+1)−iln(q2+2iqcosα−1)+iln(q2−2qsinα+1),
expanding the logarithms into real and imaginary part,
H(b)=12ln(q4−2q2cos(2α)+1)+iarg(q2−2iqsinα−1)−ln(q2−2qcosα+1)−12iln(1+2q2cos(2α)+q4)+arg(q2+2iqcosα−1)+iln(q2−2qsinα+1)
Since we are interested only in real part (just I),
ReH(b)=12ln(q4−2q2cos(2α)+1)−ln(q2−2qcosα+1)+arg(q2+2iqcosα−1)
Similarly for a(change qto 1/q).
ReH(a)=12ln(1q4−2q2cos(2α)+1)−ln(1q2−2qcosα+1)+arg(1q2+2iqcosα−1)=12ln(q4−2q2cos(2α)+1)−ln(q2−2qcosα+1)+π−arg(q2+2iqcosα−1).
Therefore, we have ourselves the grand finale,
I=4π(π2−arg(q2+2iqcosα−1))=4πarccot2qcosαq2−1.
To show this result is the same as the ones found already by others, note that
(2qcosαq2−1)2=4q2sin2(π2−α)(q2−1)2=45–√sin2(12arctan2)(5–√−1)2=25–√1−15√(5–√−1)2=1+5–√2.