Solution:
Key idea: We put x=tanθ, which turns 1−x22x into tan2θ. For ∣x∣<1 we have −4π<θ<4π, so 2θ lies in (−2π,2π) and tan−1(tan2θ)=2θ. Then ∫tan−1xdx is found by parts, ∫uvdx=u∫vdx−∫(dxdu∫vdx)dx.
Step 1 — Simplify the integrand.
With x=tanθ, we use tan2θ=1−tan2θ2tanθ.
tan−1(1−x22x)=tan−1(tan2θ)
tan−1(1−x22x)=2θ
tan−1(1−x22x)=2tan−1x
So the integral becomes:
I=2∫tan−1xdx
Step 2 — Integrate tan−1x by parts.
We write tan−1x⋅1, with u=tan−1x, dxdu=1+x21 and ∫1dx=x.
∫tan−1xdx=xtan−1x−∫1+x2xdx
∫tan−1xdx=xtan−1x−21log(1+x2)
Step 3 — Double it.
We multiply by 2 and add the constant.
I=2xtan−1x−log(1+x2)+C
Therefore, ∫tan−1(1−x22x)dx=2xtan−1x−log(1+x2)+C for ∣x∣<1.