Solution
Set
h(x)=1+x2arctan(2−x2).
Since h is even, we have
I=∫01h(x)dx+∫02h(x)dx.
Let
K=∫01h(x)dx,J=∫02h(x)dx.
Thus
I=K+J.
We first evaluate J. More generally, define
F(a)=∫0a1+x2arctan(a2−x2)dx,a>0.
Differentiating with respect to a, the boundary term vanishes since
arctan(0)=0, and therefore
F′(a)=a∫0a(1+x2)(1+a2−x2)a2−x2dx.
Using
x=asinθ,0≤θ≤2π,
we obtain
F′(a)=a∫0π/2(1+a2sin2θ)(1+a2cos2θ)dθ.
Now
(1+a2sin2θ)(1+a2cos2θ)=1+a2+4a4sin2(2θ).
Hence, using the standard integral
∫0π/2A+Bsin2udu=2A(A+B)π,
we get
F′(a)=(a2+2)1+a2πa.
Since F(0)=0,
F(a)=π∫0a(t2+2)1+t2tdt.
Put
u=1+t2.
Then
du=1+t2tdt,t2+2=u2+1,
so
F(a)=π∫11+a21+u2du.
Therefore
F(a)=π(arctan1+a2−4π).
Taking a=2, we find
J=F(2)=π(3π−4π)=12π2.
It remains to determine K.
Using
arctany=∫0y1+t2dt,
we may write
J=∬Q(1+x2)(1+y2)dxdy,
where
Q={(x,y)∈R2:x≥0, y≥0, x2+y2≤2}.
Inside Q, consider the square
C=[0,1]×[0,1].
Its weighted area is
∬C(1+x2)(1+y2)dxdy=(∫011+x2dx)2=(4π)2=16π2.
The two remaining parts of Q,
{x>1}and{y>1},
have equal weighted areas by the symmetry x↔y.
If L denotes either of these two equal contributions, then
J=16π2+2L.
On the other hand, K corresponds to the part of Q with
0≤x≤1, hence
K=16π2+L.
Consequently,
K=21(J+16π2).
Thus
I=J+K=21(3J+16π2).
Since
J=12π2,
we finally obtain
I=21(4π2+16π2)=325π2.