I think you have to first separate the integral:1/(1+v^2) + v/(1+v^2),
so the integral of the first term is ArcTan (v) and for the integral of the second term i recommend you to do a change of variable:
y= 1+v^2
so
dy= 2v
and
v= dy/2and then you substitute:v/(1+v^2) = (1/2)(dy/y)
and the integral is
(1/2) (In y)finally you plug in the initial variables:
(1/2)(In [1+v^2])
so the total integral is:
ArcTan (y) + (1/2)(In [1+v^2])
It is unchanged because the same number would still be in the middle and there would still be the same amount of numbers
if
11,15,21,22,23,27,30 before 22 is the median
if
11,15,21,22,23,27,30 after 22 is still the median
The median is unchanged