veff2[x_] := -Log[ 4 NIntegrate[ ArcSin[ Sqrt[2 x- Sin[θ1]^2]],{θ1, 0, ArcSin[Sqrt[2 x]]}]/π^2 ] /; x< 1/2
veff2[x_] := -Log[ 2 ArcSin[Sqrt[2x-1]]/π + 4 NIntegrate[ ArcSin[ Sqrt[2 x- Sin[θ1]^2]],{θ1, ArcSin[Sqrt[2 x-1]],π/2}]/π^2 ] /; x> 1/2;
(*  data2= Table[{x,veff2[x]},{x,10^(-5),1-10^(-5),0.001}];
ListPlot[{data1, data2},Joined->True] *) 
b= 1/X0 ;
eps = X0 -1 ;
r= 2b (1+ eps x);
db = r/(2b)-1;
fb =- Log[ 4  X0 db/(X0^2-1)/π ] // FullSimplify;
da = 1- r/(2);
fa = - Log[ 1- 4 X0  da/(X0^2-1)/π] // FullSimplify;
 Plot[ {veff2[x], fb/. X0-> 1.1, fa /. X0-> 1.1},{x,0.0,1}, PlotRange->{0,8}] 
data= Table[{r,veff2[r]},{r,10^(-5),1-10^(-5),0.01}]; 
SetDirectory[NotebookDirectory[]]
Directory[]
Export["Effective_Potential_Final.dat",data]  ;