p1=Plot[I,{x,-1,1},AxesStyle->Dashed,Ticks->False,PlotStyle->{Black,Thick},AxesLabel->{Re[ξ],Im[ξ]},Epilog->{{Thick,Line[{{-1,0},{0,0}}]},Disk[{0,0},0.025]},AspectRatio->1/GoldenRatio,PlotRange->{{-1,1},{-1,1}/GoldenRatio},LabelStyle->{FontFamily->"Times",FontSize->12,Black},ImageSize->340]

Export["~/doc/research/first_order_singularities/paper/figs/F_lower_singularities.pdf",p1];

p2=Plot[I,{x,-1,1},AxesStyle->Dashed,Ticks->False,PlotStyle->{Black,Thick},AxesLabel->{Re[ξ],Im[ξ]},Epilog->{{Thick,Line[{{0,1/GoldenRatio/2},{0,1}}],Line[{{0,-1/GoldenRatio/2},{0,-1}}]},RegularPolygon[{0,1/GoldenRatio/2},0.025,4],RegularPolygon[{0,-1/GoldenRatio/2},0.025,4],
Line[{{0,1/GoldenRatio/2},{0.05,1/GoldenRatio/2}}],
{Black,Text[Style["i(Subscript[ξ, YL])",FontSize->12,Black,FontFamily->"Times"], {0.125,1/GoldenRatio/2}]}
},AspectRatio->1/GoldenRatio,PlotRange->{{-1,1},{-1,1}/GoldenRatio},LabelStyle->{FontFamily->"Times",FontSize->12,Black},ImageSize->340]

Export["~/doc/research/first_order_singularities/paper/figs/F_higher_singularities.pdf",p2];

p3=Plot[I,{x,-1,1},AxesStyle->Dashed,Ticks->False,PlotStyle->{Black,Thick},AxesLabel->{Re[θ],Im[θ]},Epilog->{{Thick,Line[{{0,1/GoldenRatio/2},{0,1}}],Line[{{0,-1/GoldenRatio/2},{0,-1}}]},RegularPolygon[{0,1/GoldenRatio/2},0.025,4],RegularPolygon[{0,-1/GoldenRatio/2},0.025,4],{Thick,Line[{{-1,0},{-0.75,0}}]},Disk[{-0.75,0},0.025],{Thick,Line[{{1,0},{0.75,0}}]},Disk[{0.75,0},0.025],
Line[{{0.75,0},{0.75,0.05}}],
Line[{{0,1/GoldenRatio/2},{0.05,1/GoldenRatio/2}}],
{Black,Text[Style["i(Subscript[θ, YL])",FontSize->12,Black,FontFamily->"Times"], {0.125,1/GoldenRatio/2}]},
{Black,Text[Style["(Subscript[θ, c])",FontSize->12,Black,FontFamily->"Times"], {0.75,0.1}]}
},AspectRatio->1/GoldenRatio,PlotRange->{{-1,1},{-1,1}/GoldenRatio},LabelStyle->{FontFamily->"Times",FontSize->12,Black},ImageSize->340]

Export["~/doc/research/first_order_singularities/paper/figs/F_theta_singularities.pdf",p3];

p4=Plot[(Sqrt[(0.95^2)-(x^2)])/GoldenRatio,{x,-1,1},AxesStyle->Dashed,Ticks->False,PlotStyle->{Red},AxesLabel->{Re[θ'],Im[θ']},Prolog->{
{Thickness[0.005],Red,Line[{{-0.95,0.0115},{-0.8,0.0115}}]},
{Thickness[0.005],Red,Circle[{-0.75,0},0.05,{0,π}]},
{Thickness[0.005],Red,Line[{{0.8,0.0115},{0.95,0.0115}}]},
{Thickness[0.005],Red,Circle[{0.75,0},0.05,{0,π}]},
{Thickness[0.005],Red,Line[{{-0.7,0},{0.-0.05,0}}]},
{Thickness[0.005],Red,Circle[{0,0},0.05,{0,π}]},
{Thickness[0.005],Red,Line[{{0.05,0},{0.25,0}}]},
{Thickness[0.005],Red,Circle[{0.3,0},0.05,{0,π}]},
{Thickness[0.005],Red,Line[{{0.35,0},{0.7,0}}]},
{Thickness[0.005],Red,Line[{{0.0115,1/GoldenRatio 0.95},{0.0115,1/GoldenRatio/2+0.05}}]},
{Thickness[0.005],Red,Line[{{-0.0115,1/GoldenRatio 0.95},{-0.0115,1/GoldenRatio/2+0.05}}]},
{Thickness[0.005],Red,Circle[{0,1/GoldenRatio/2},0.05]},
Line[{{0.3,0},{0.3,-0.05}}],
{Black,Text[Style["θ",FontSize->12,Black,FontFamily->"Times"], {0.3,-0.1}]}},
Epilog->{
{Thick,Line[{{0,1/GoldenRatio/2},{0,1}}],Line[{{0,-1/GoldenRatio/2},{0,-1}}]},RegularPolygon[{0,1/GoldenRatio/2},0.025,4],
Rotate[RegularPolygon[{0,0},0.025,4],π/4],RegularPolygon[{0,-1/GoldenRatio/2},0.025,4],{Thick,Line[{{-1,0},{-0.75,0}}]},Disk[{-0.75,0},0.025],{Thick,Line[{{1,0},{0.75,0}}]},Disk[{0.75,0},0.025],
Polygon[{0.3,0}+#&/@SortBy[0.025/1.5Join[CirclePoints[5],-CirclePoints[5]/2],ArcTan@@#&]]
},AspectRatio->1/GoldenRatio,PlotRange->{{-1,1},{-1,1}/GoldenRatio},LabelStyle->{FontFamily->"Times",FontSize->12,Black},ImageSize->340]

Export["~/doc/research/first_order_singularities/paper/figs/contour_path.pdf",p4];

ComplexExpand[Re[(1/((t-ξ)I t))],{t}]/.Im[t]->0

ComplexExpand[Re[(I/((I t-ξ)(((I t))^2)))]]

iF1[θc_,B_][x_]:=(x-θc) Exp[-1/(B(x-θc))]

iii2=((θ^2)/π)Integrate[(((((x^2)+((θ0)^2)))^(5/6))/(x^2))((1/(x-θ))+(1/(x+θ))),{x,θc,∞},Assumptions->{θ<θc,θ>0,θc>0,B>0,θ0>0,θ0<θc}]

Series[iF1[θc,B][x],{θ,θc,1}]

Series[((t[θ])^2)ξ Exp[-1/(b ξ)]/.ξ->(θ h'[θ])/((t[θ])^(15/8)),{θ,0,1}]

iii=((θ^2)/π)Integrate[((iF1[θc,B][x])/(x^2))((1/(x-θ))+(1/(x+θ))),{x,θc,∞},Assumptions->{θ<θc,θ>0,θc>0,B>0,θ0>0}]

itest=(x^(3/2 ))Integrate[(((y))^(1/2)) y Exp[-1/y]/(y+x)/(y^2),{y,0,∞},Assumptions->{x>0}]/π

ComplexExpand[Im[(Sqrt[-x])]]

Plot[Exp[-1/x](Sqrt[x]),{x,0,1}]

ComplexExpand[Im[I Exp[1/x](Sqrt[I x])]]

Plot3D[Evaluate[Im[I Exp[1/x](Sqrt[(x^2)])]/.x->x+I y],{x,-5,5},{y,-5,5}]

itest/.x->x+I 0.0000001/.x->-4

Plot[Evaluate@{Im[-itest/.x->y+I 0.000001],-(((-y))^(3/2)) Exp[1/y]HeavisideTheta[-y]},{y,-5,5}]

ComplexPlot[itest,{x,-1-I,1+I}]

Plot[(((x-θc) Exp[-1/(B(x-θc))])/(x^2))/.{θc->1.27,B->3.12},{x,1.27,10}]

Plot[Evaluate@Im[I Sign[Im[θ+ I (10^(-5))]]iF1[θc,B][θ+I (10^(-5))]-I Sign[Im[θ+ I (10^(-5))]]iF1[θc,B][-(θ+I (10^(-5)))]]/.{θc->1.27,B->3.12},{θ,-2,2}]

Plot[Evaluate@Re[(iii+I Sign[Im[θ]]iF1[θc,B][θ]-I Sign[Im[θ]]iF1[θc,B][-θ])/.θ->x+(10^(-7)) I]/.{θc->1.27,B->3.12},{x,-2,2},PlotRange->{-0.5,0.5}]

Plot[Evaluate@Im[(iii/.θ->θ+I (10^(-5)))]/.{θc->1.27,B->3.12},{θ,-2,2}]

Evaluate[Im[((((θ^2)+(0.2^2)))^(5/6))(iii+I θ/Abs[1[θc,B][θ]-I Sign[Im[θ]]iF1[θc,B][-θ])/.{θc->1.27,B->3.12}/.θ->x+I y]]/.{x->1.1,y->0.3}

Series[x Exp[1/x],{x,∞,0}]

iii2=Integrate[((x Exp[1/x])/(x^2))(1/(x+y)),{x,x0,∞},Assumptions->{y<x0,y>0,x0>0}]

FullSimplify[iii,Assumptions->{x0>0,y>0,y<x0}]

Plot[(y^2)Re@(iii)-0.2(y^2)ii/.x0->2/.θ0->0.5,{y,-5,5}]

ComplexExpand[(1-((θ^2)/((θc)^2)))(θ-0.1 (θ^3))(((1-(θ^2)))^(-15/8))/.θ->I θ]

Plot[Evaluate@ReIm[(1-((θ^2)/((θc)^2)))(θ-0.1 (θ^3))(((1-(θ^2)))^(-15/8))/.θ->I θ/.θc->1.2],{θ,0, 1.5}]

Plot[(1/((x-y)))-(1/(x+y))/.y->4,{x,-10,10}]

iiii=Integrate[D[((((-((θ0)^2)-(((I θ))^2)))^(5/6))/(((θ^2)+((θp)^2)))),θp],θp]

Simplify[ComplexExpand[Im[(iii+I Sign[Im[θ]] iF1[θc,B][θ]-I Sign[Im[θ]]iF1[θc,B][-θ])/.θ->I θ],TargetFunctions->Conjugate],Assumptions->{θ>0,θc>0,B>0}]

ii=Integrate[((iF1[θc,B][I θ])/((θ+y)(θ^2))),{θ,θ0,∞},Assumptions->{y>0,θ0>0,B>0,θc>0}]

ii=Integrate[(((((θ^2)-((θ0)^2)))^(5/6))/((θ+y)(θ^2))),{θ,θ0,∞},Assumptions->{y>0,θp∈Reals}]

Plot[(((1+(x^2)))^(5/6))-1,{x,0,10}]

Plot[(y^2)ii/.{θ0->0.18},{θp,0,1}]

i0=Limit[((θp)^2)+3((θp)^4)+0.8 ((θp)^6)+x Exp[1/x]ExpIntegralEi[-1/x]+y Exp[1/y]ExpIntegralEi[-1/y]+ii/.{θ0->0.18,x->θp-0.5,y->-0.5-θp},θp->0]

ComplexPlot[(((θp)^2)+3((θp)^4)+0.8 ((θp)^6)+x Exp[1/x]ExpIntegralEi[-1/x]+y Exp[1/y]ExpIntegralEi[-1/y]+ii/.{θ0->0.18,x->θp-0.5,y->-0.5-θp})-i0,{θp,-1.5-1.5I,1.5+1.5I}]

Integrate[(θ0

Integrate[(1/((θ^2)+((θp)^2))),θ]

2/(15/8)

2/(0.326419 4.78984)

Series[1/((θ-θc) h'[θ](((1-θ))^(-15/8))),{θ,θc,0}]