hgrie's private definitions

Plot options

red=RGBColor[1,0,0];
green=darkgreen;(*RGBColor[0,1,0];*)
darkgreen=CMYKColor[1,0,1,.5];
blue=RGBColor[0,0,1];
darkblue= CMYKColor[1,1,0,.3];
violet=RGBColor[.6,0,1];
white=RGBColor[1,1,1];
black=RGBColor[0,0,0];
fillcolour=RGBColor[0.572549, 0.564706, 1];
grey=GrayLevel[.85];
slidegrey=GrayLevel[.6];
solid=Dashing[{1,0}]; (*solid*)
dotdashed=Dashing[{0.005,0.02,0.02,0.02}]; (*dot-dashed*)
middashed=Dashing[{0.02,0.02}];(*mid dashed*)
longdashed=Dashing[{0.04,0.02}]; (*long dashed*)
dashed=middashed; (* CHOOSE DASHING!!!!!*)
dotted=Dashing[{0.003,0.015}]; (*dotted*)
axes=None;
imagesize=Automatic;

figimagesizeexp={290,200};
figimagesize={400*12.5/14.1*10.7/10.6,400/GoldenRatio};
figimagesize2=1.5{400*12.5/14.1*10.7/10.6,400/GoldenRatio};
figimagesizeArray2=1.5 {2*357.9553057674295`,(400/GoldenRatio)};
figimagesizeArray3=1.5 {3*357.9553057674295`,(400/GoldenRatio)};
plotoptions={
Background->white,
Frame->True,
Prolog->AbsoluteThickness[1],
ImageSize-> figimagesize};

define correct ticks for θ ∈[0;180] degree

thetatableprelim=Table[{i,"",{3/900,0}},{i,0,180,5}];
thetatablenumbers=Table[{i,StringForm["``",i],{6/900,0}},{i,0,180,30}];
thetatablenonumbers=Table[{i,"",{6/900,0}},{i,0,180,30}];
thetatableup=Union[
Delete[thetatableprelim,Table[{i},{i,1,Dimensions[thetatableprelim][[1]],6}]],
thetatablenonumbers];
thetatabledown=Union[
Delete[thetatableprelim,Table[{i},{i,1,Dimensions[thetatableprelim][[1]],6}]],
thetatablenumbers];

Plot Options which depend on the math..ematica version

math 6 and higher does not know any more about "DisplayTogether" and other stuff (curse Wolfram)

Most noticable: 
The plot options "MaxRecursion -> 0" and "PerformanceGoal -> "Speed"" dramatically increas the speed with which plots are rendered -- without a real loss of accuracy in the plots!!
Thus: use "plotoptions" for thorough plots, and "prelimplotoptions" for quick plots.

Append[plotoptions,BaseStyle->{FontFamily->"Times",Italic}];
prelimplotoptions=Append[plotoptions,PerformanceGoal->"Speed"];
Append[prelimplotoptions,MaxRecursion->0];
circle[colour_,thickness_]:=Graphics/@{{colour,thickness,Circle[{0,0},1]}}
disk[colour_]:=Graphics/@{{colour,Disk[{0,0},1]}}
emptytriangle[colour_,thickness_]:=Graphics/@{{colour,thickness,Line[{{1,0},{0,Sqrt[3]},{-1,0},{1,0}}]}}
filledtriangle[colour_]:=Graphics/@{{colour,Polygon[{{1,0},{0,Sqrt[3]},{-1,0}}]}}
emptysquare[colour_,thickness_]:=Graphics/@{{colour,thickness,Line[{{-0.5,-0.5},{0.5,-0.5},{0.5,0.5},{-0.5,0.5},{-0.5,-0.5}}]}}
filledsquare[colour_]:=Graphics/@{{colour,Polygon[{{-0.5,-0.5},{0.5,-0.5},{0.5,0.5},{-0.5,0.5}}]}}
emptydiamond[colour_,thickness_]:=Graphics/@{{colour,thickness,Rotate[Line[{{-0.5,-0.5},{0.5,-0.5},{0.5,0.5},{-0.5,0.5},{-0.5,-0.5}}],45 Degree,{0,0}]}}
filleddiamond[colour_]:=Graphics/@{{colour,Rotate[Polygon[{{-0.5,-0.5},{0.5,-0.5},{0.5,0.5},{-0.5,0.5}}],45 Degree,{0,0}]}}

Stieltjes Integral as Asymptotic Series

stieltjesseries[m_,x_]=Sum[(-x)^n n!,{n,0,m}];

stieltjesintegral[x_]=Integrate[Exp[-t]/(1+x t),{t,0,∞}];

x=0.1;(*a moderately small value*)
mmax=2.5/x;(* the "sweet-spot" should be at about n ≈ 1/x*)
Print[StringForm["Exact answer: ``",stieltjesintegral[x]]]
Show[
Plot[{stieltjesintegral[x](*,Re[stieltjesseries[m,x]]*)},{m,0,mmax},Evaluate[plotoptions],PlotStyle->{(*{blue,solid},*){red,dashed}},PlotRange->{0.89,0.94},FrameLabel->{"max. number of terms nmax","value"}],
ListPlot[Table[{m,Re[stieltjesseries[m,x]]},{m,0,mmax}]]]
Print["1st row: nmax; 2nd row: Sum result; 3rn row: rel. error 1- Sum/exact"]
Transpose[Table[{m,stieltjesseries[m,x],1-stieltjesseries[m,x]/stieltjesintegral[x]},{m,0,mmax,4}]]//MatrixForm
Table[{m,stieltjesseries[m,x],1-stieltjesseries[m,x]/stieltjesintegral[x]},{m,0,mmax}]//MatrixForm

x=0.5;(*a relatively large value*)
mmax=2.5/x;(* the "sweet-spot" should be at about n ≈ 1/x*)
Print[StringForm["Exact answer: ``",stieltjesintegral[x]]]
Show[
Plot[{stieltjesintegral[x](*,Re[stieltjesseries[m,x]]*)},{m,0,mmax},Evaluate[plotoptions],PlotStyle->{(*{blue,solid},*){red,dashed}},(*PlotRange->{0,1.2},*)FrameLabel->{"max. number of terms nmax","value"}],
ListPlot[Table[{m,Re[stieltjesseries[m,x]]},{m,0,mmax}]]]
Print["1st row: nmax; 2nd row: Sum result; 3rn row: rel. error 1- Sum/exact"]
Transpose[Table[{m,stieltjesseries[m,x],1-stieltjesseries[m,x]/stieltjesintegral[x]},{m,0,mmax}]]//MatrixForm
Table[{m,stieltjesseries[m,x],1-stieltjesseries[m,x]/stieltjesintegral[x]},{m,0,mmax}]//MatrixForm

x=0.01;(*a small value*)
mmax=3/x;(* the "sweet-spot" should be at about n ≈ 1/x*)
Print[StringForm["Exact answer: ``",stieltjesintegral[x]]]
Show[
Plot[{stieltjesintegral[x](*,Re[stieltjesseries[m,x]]*)},{m,0,mmax},Evaluate[plotoptions],PlotStyle->{(*{blue,solid},*){red,dashed}},PlotRange->{0.99018,0.9902},FrameLabel->{"max. number of terms nmax","value"}],
ListPlot[Table[{m,Re[stieltjesseries[m,x]]},{m,0,mmax}]]]
Print["1st row: nmax; 2nd row: Sum result; 3rn row: rel. error 1- Sum/exact"]
Transpose[Table[{m,stieltjesseries[m,x],1-stieltjesseries[m,x]/stieltjesintegral[x]},{m,0,mmax,50}]]//MatrixForm
Table[{m,stieltjesseries[m,x],1-stieltjesseries[m,x]/stieltjesintegral[x]},{m,0,mmax,50}]//MatrixForm