function[m2]=i2sin(a,b,x0,v)
if a<=x0-v
a1=-1;
else
a1=(a-x0)/v;
end
if b>=x0+v
b1=1;
else
b1=(b-x0)/v;
end
t1=((v^2+2*x0^2)/(2*pi))*(asin(b1)-asin(a1));
t2=(v^2/(2*pi))*(a1*sqrt(1-a1^2)-b1*sqrt(1-b1^2));
t3=(2*v*x0/pi)*(sqrt(1-a1^2)-sqrt(1-b1^2));
m2=t1+t2+t3;