Calculate this integral using most elementary methods: $\int \arctan^2 x \,\mathrm dx$
Write the arc tangent using logarithms to get: $$I:= \int \arctan^2x \,\mathrm d x=-\frac 14\int \left( \ln (1+xi)-\ln(1-xi)\right)^2\,\mathrm d x=\\ \int \ln^2(1+xi)\,\mathrm dx-2\int \ln (1-xi)\ln(1+xi)\,\mathrm d x+\int \ln^2(1-xi)\,\mathrm d x $$
The first integral can be solved by substituting $u=1+xi$ and then integrating by parts: $$I_1:=\int \ln^2(1+xi)\,\mathrm dx=-i\int\ln^2(u)=-i\left(2\int \ln u\,\mathrm d u+u\ln^2u\right)=-i\left( u\ln^2u-2u\ln u+2u\right)=\boxed{-iu\ln^2u+2iu\ln u-2iu}$$
The third integral is a bit more difficult but similar - substitute $u=-1+xi$, $v=\ln u$ and then integrate by parts twice to get the result: $$I_3:=\ln^2(1-xi)\,\mathrm d x=-i\int(\ln u+\ln(-1))^2\,\mathrm d u=-i\int e^v(v+\pi i)^2 \,\mathrm d v=\\ 2i\int e^v(v+\pi i)\,\mathrm d v-ie^v(v+\pi i)=\boxed{-ie^v\left((v+\pi i)^2-2(v+\pi i)+2\right)}$$
The second integral however is much trickier and messier. First, integrate by parts: $$-2I_2:=-2\int\ln(1-xi)\ln(1+xi)\,\mathrm d x \\ I_2=\int\ln(1-xi)\ln(1+xi)\,\mathrm d x=-\int\frac{(x-i)\ln(1+xi)-x+i}{x+i}\,\mathrm d x-\\ i(1+xi)\ln(1-xi)\left( \ln(1+xi)-1\right) $$
$$-J:=-\int\frac{(x-i)\ln(1+xi)-x+i}{x+i}\,\mathrm d x$$
Expand: $$J=\int\frac{(x-i)\ln(1+xi)}{x+i}\,\mathrm d x-\int\frac{x}{x+i}\,\mathrm dx+i\int\frac{1}{x+i}\,\mathrm dx=\int\frac{(x-i)\ln(1+xi)}{x+i}\,\mathrm d x+\\ (1-i)(\ln(x+i))+x$$
Subsitute $u=x+i$ and expand again: $$K:= \int\frac{(x-i)\ln(1+xi)}{x+i}\,\mathrm d x =\int\frac{(u-2i)\left( \ln(u-2i)+\frac\pi 2 i\right)}{u}\,\mathrm d u=\\ -2i\int\frac{\ln(u-2i)}{u}\,\mathrm d u+\int\ln(u-2i)\,\mathrm d u-\pi\ln u+\frac\pi 2 iu $$
The second integral is solved immediately after substituting $v=u-2i$: $$K_2:=\int\ln(u-2i)\,\mathrm d u=v\ln v-v=(u-2i)\ln(u-2i)-u+2i$$
To solve the first one we can rewrite the integrand: $$-2iK_1:=-2i\int\frac{\ln(u-2i)}{u}\,\mathrm d u \\ K_1=\int \frac{\ln\left( \frac{i}{2}u+1\right)}{u}\,\mathrm d u+\left( \log 2-\frac{\pi}{2}i\right)(\ln u)$$
and now substitute $v=-\frac i2 u$ to finish by seeing that the integral is a dilogarithm: $$\int \frac{\ln\left( \frac{i}{2}u+1\right)}{u}\,\mathrm d u=-\int -\frac{\ln(1-v)}{v}\,\mathrm d v=-\mathrm{Li}_2 (v)=-\mathrm{Li}_2\left( -\frac{i}{2}u\right)$$
And thus our integral is solved. Plug in all the previously solved integrals and undo the substitutions to get the final, messy result which I won't be writing out here.