<<MB/MB.m

(*   The integrand of the MB integral for the one-loop propagator diagram with m1=m and m2=0 *)

MB[a1_,a2_]:=(-1)^(a1+a2)/QQ^(a1+a2+ep-2)/Gamma[a1]/Gamma[a2] Gamma[2-ep-a2]Gamma[a1+a2+ep-2+z]Gamma[2-ep-a1-z]Gamma[-z]/Gamma[4-2ep-a1-a2-z]mm^z/QQ^z;

(*  Notation: mm=m^2, QQ=-q^2;
I Pi^(d/2) is pulled out  *)

(*  The diagram with a1=1 and a2=1  *)

P1=MB[1,1]

P1Rules=MBoptimizedRules[P1,ep->0,{},{ep}]

P1cont=MBcontinue[P1,ep->0,P1Rules]

P1select=MBpreselect[P1cont,{ep,0,0}]

P1exp=MBexpand[P1select,E^(EulerGamma ep),{ep,0,0}]

P1exp[[1]]

P1exp[[2]]

int1=P1exp[[2]] [[1]]//. {Gamma[2-z]-> (1-z) Gamma[1-z],Gamma[1-z]-> -z Gamma[-z],Gamma[z]->Gamma[1+z]/z}

(*  The MB integral can be evaluated by closing the integration contour to the right in the complex z-plane.      *)

(*  First two residues  *)

res12=-Residue[int1,{z,0}]-Residue[int1,{z,1}]

(*  Now we take residues at z=2,3,...  *)

int1/. {Gamma[-z] Gamma[1+z]-> -π Csc[π z]}

(*  Now we take (minus) the residue at z=n, To do this we shift the variable and then take 
a residue at z=0 *)

% /. z-> z +n

% /.  {Csc[π (n+z)]->(-1)^n Csc[π z] }

-Residue[%,{z,0}]

(*  Sum up contributions of the residues at z=2,3,... *)

Sum[%,{n,2,Infinity}]

(*  We add the above contributions from the residues 
at z=0 and z=1 as well as B1exp[[1]]              *)

Simplify[%+res12+P1exp[[1]][[1]]]

%/.Log[((mm+QQ)/QQ)]-> Log[mm+QQ]-Log[QQ]

res= % /. Log[mm+QQ]-> Log[(mm+QQ)/mm]+Log[mm]

(*  result           *)

resSimpl=2+(1/ep)-Log[mm]- (1+(mm/QQ)) Log[1+(QQ/mm)];

(*   check   *)

Simplify[res-resSimpl]