We want to derive 4π exactly.

Notation: when A, B and C are 3 vectors, [A B C] is the determinant formed by the arrangement of their components into a matrix.

Consider two linked squares:

We need the double integral over a pair of sticks: Consider situated vector differentials: and the vector between them:
r = <−x, y, 1>

[A B r] =
dx00
0dy0
−xy1
= dx dy
We need the double integral of [A B r](|r|−3/2) = integral dx dy (1 + x2 + y2)−3/2 for x from 0 to x and for y from 0 to y.


The integral of (a+x2)−3/2 is (x/a)(a+x2)−1/2

Scheme confirmation of integration:

(define a 1.7)
(define (f x) (expt (+ a (* x x)) -3/2))
(define dx 0.00001)
(define (i x) (* (/ x a)(expt (+ a (* x x)) -1/2)))
(define (d f) (lambda (x) (/ (- (f (+ x dx)) (f x)) dx)))
(define ndi (d i))

(ndi 1.23) => 0.17364076608794574
(f 1.23) =>   0.17364176322200472
(ndi 2.144) => 0.06328846378078623
(f 2.144) =>   0.06328878701715454
∫∫((1 + x2 + y2)−3/2)dx dy = x∫((1/(1 + y2))(1 + x2 + y2)−1/2) dy
1/((1+x^2)(sqrt(a+x^2)))Integrated is:

Scheme Check
(define (f x) (/ (* (+ 1 (* x x))(sqrt (+ a (* x x))))))
(define (i x) (let ((s (sqrt (- a 1))))
    (/ (atan (/ (* s x)(sqrt (+ (* x x) a)))) s)))
(define ndi (d i))
(ndi 1.23) => 0.2220103555328201
(f 1.23) =>   0.22201186718770302
(ndi 2.144) => 0.07120410513428155
(f 2.144) =>   0.07120449912364094

Resuming double integral with x -> y and a -> 1+x2
x∫((1/(1 + y2))(1 + x2 + y2)−1/2) dy =
x tan−1 (√(1+x2 − 1) y/√(y2 + 1+x2)) / √(1+x2 − 1) =
x tan−1 (xy/√(1 + x2 + y2)) /x =
tan−1 (xy/√(1 + x2 + y2))
which we call I(x, y).
The symmetry is pleasant and necessary.

Confirmed!

(define (I x y) (atan (/ (* x y) (sqrt (+ 1 (* x x) (* y y))))))

Back to our pair of linked squares.
Consider the two sides:
<−1, 0, 0>, <1, 0, 0>.
<0, 1, 1>, < 0, 1, −1>
They are perpendicular and their closest points are their centers at <0, 0, 0> and <0, 1, 0> respectively. The distance between them is 1. The pair contributes 4I(1, 1) = 2π/3 to the double integral. There are 7 pairs of sides that are congruent to this case bringing us to 14π/3 = (/ (* 14 π) 3) = 14.660765716752367 .

Consider the two sides:
<1, 2, 0>, <−1, 2, 0>
< 0, −1, −1>, <0, −1, 1>
They are perpendicular and their closest points are their centers at <0, 2, 0> and <0, −1, 0> respectively. The distance between them is 3. This unduplicated pair contributes −4I(1/3, 1/3) = (* -4 (I 1/3 1/3)) = − 0.40066968464623914 to the double integral.

Consider the two sides:
<1, 0, 0>, <1, 2, 0>
< 0, −1, −1>, <0, −1, 1>
They are perpendicular and their closest points are at <1, −1, 0> and <0, −1, 0> respectively. The closest point on the first side is not in the segment. The distance between them is 1. This pair contributes −2(I(1, 3) − I(1, 1)) to the double integral. The are four such congruent pairs contributing −8(I(1, 3) − I(1, 1)) = (* -8 (- (I 3 1) (I 1 1))) = −1.6937254177469558 .

The other 4 pairs are parallel and contribute nothing. The sum is 4π to 16 digits. It would seem that there is a relation between the three tan−1 values. The good news is that nearly everything checks numerically.

tan−1(x) + tan−1(y) = tan−1((x+y)/(1-xy))

The entire double integral is:
28I(1, 1) − 4I(1/3, 1/3) − 8I(3, 1) + 8I(1, 1) =
4(9I(1, 1) − I(1/3, 1/3) − 2I(3, 1)) =
4(9 tan−1(1/√3) − tan−1((1/9)/√(11/9)) − 2 tan−1(3/√11)) =
4(9 tan−1(3−1/2) − tan−1(3−111−1/2) − 2 tan−1(3 11−1/2)) =

(+ (* 9 (atan (/ (sqrt 3))))
   (atan (/ (/ -9) (sqrt (/ 11 9))))
   (* -2 (atan (/ 3 (sqrt 11))))) => π

I know how to show that the total integral is 4π but I have found a more convincing demonstration.