Integration of the Poisson equation for a trapezoids

The full analytical integral is given in Step 8. The previous steps are neccessary due to the complexity of the integeral. At some points Mathematica needs some manual simplifications.

Note that the results seem to contain logarithms of units. This is solved by scaling the original problem:
(∫_0^gg)(∫_0^gg)(∫_(-(yW/2)-dW+(dW/gg)x)^(+(yW/2)+dW-(dW/gg)x))(∫_(-(yW/2)-dW+(dW/gg)ξ)^(+(yW/2)+dW-(dW/gg)ξ))(1/(Sqrt[(((x-ξ))^2)+(((y-η))^2)]))dxdydξdη
=(Subscript[x, 0]^3)(∫_0^(OverHat[gg]))(∫_0^(OverHat[gg]))(∫_(-((OverHat[yW])/2)-(OverHat[dW])+(dW/gg)(OverHat[x]))^(+((OverHat[yW])/2)+(OverHat[dW])-(dW/gg)(OverHat[x])))(∫_(-((OverHat[yW])/2)-(OverHat[dW])+(dW/gg)(OverHat[ξ]))^(+((OverHat[yW])/2)+(OverHat[dW])-(dW/gg)(OverHat[ξ])))(1/(Sqrt[((((OverHat[x])-(OverHat[ξ])))^2)+((((OverHat[y])-(OverHat[η])))^2)]))d(OverHat[x])d(OverHat[y])d(OverHat[ξ])d(OverHat[η])
where
(Subscript[x, 0])(OverHat[x])=x
(Subscript[x, 0])(OverHat[y])=y
(Subscript[x, 0])(OverHat[ξ])=ξ
(Subscript[x, 0])(OverHat[η])=η
(Subscript[x, 0])(OverHat[gg])=gg
(Subscript[x, 0])(OverHat[dW])=dW
(Subscript[x, 0])(OverHat[yW])=yW

yW is the length of the short side of the parallel egdes
The opposite side has the length yW+2 dW, i.e. dW decribes the broadening  and yW the edge length of the sharp particle.
zH is the particle height such that the trapeze height is gg=(Sqrt[(zH^2)+(dW^2)]).

To get the self energy the integral has to be multiplied by (1/2)((σ^2)/(4(Subscript[πμ, 0]))), where σ is the magnetic surface charge density. [σ]=(Wb/(m^2))=(Vs/(m^2))=T⟹[(Subscript[x, 0]^3)((σ^2)/(Subscript[μ, 0]))]=J

The solutions given below already contain the factor (1/(4π))

Functions F[i, j, k][{x, y, z}]

Supplementary functions for the  Green function

Lx[{x_,y_,z_}]:=ArcTanh[(x/(Norm[{x,y,z}]))];
Lx[{0,y_,z_}]:=0;
Lx[{0.,y_,z_}]:=0;
Ly[{x_,y_,z_}]:=Lx[{y,z,x}];
Lz[{x_,y_,z_}]:=Lx[{z,x,y}];

Px[{x_,y_,z_}]:=x ArcTan[((y z)/(x Norm[{x,y,z}]))];
Px[{0,y_,z_}]:=0;
Px[{0.,y_,z_}]:=0;
Py[{x_,y_,z_}]:=Px[{y,z,x}];
Pz[{x_,y_,z_}]:=Px[{z,x,y}];

Integrals of the Green function

F[0,0,0][{x_,y_,z_}]:=(1/(Norm[{x,y,z}]));

F[1,0,0][{x_,y_,z_}]:=Lx[{x,y,z}];
F[0,1,0][{x_,y_,z_}]:=F[1,0,0][{y,z,x}]
F[0,0,1][{x_,y_,z_}]:=F[1,0,0][{z,x,y}]

F[2,0,0][{x_,y_,z_}]:=x Lx[{x,y,z}]-Norm[{x,y,z}];
F[0,2,0][{x_,y_,z_}]:=F[2,0,0][{y,z,x}]
F[0,0,2][{x_,y_,z_}]:=F[2,0,0][{z,x,y}]

F[1,1,0][{x_,y_,z_}]:=y Lx[{x,y,z}]+x Ly[{x,y,z}]-Pz[{x,y,z}];
F[1,1,0][{x_,0,0}]:=0;
F[1,1,0][{x_,0.,0.}]:=0;
F[1,1,0][{0,y_,0}]:=0;
F[1,1,0][{0.,y_,0.}]:=0;
F[1,0,1][{x_,y_,z_}]:=F[1,1,0][{x,z,y}]
F[0,1,1][{x_,y_,z_}]:=F[1,1,0][{z,y,x}]

F[2,1,0][{x_,y_,z_}]:=x y Lx[{x,y,z}]+(1/2)((x^2)-(z^2)) Ly[{x,y,z}]-x Pz[{x,y,z}]-(1/2)y Norm[{x,y,z}];
F[2,0,1][{x_,y_,z_}]:=F[2,1,0][{x,z,y}]
F[1,2,0][{x_,y_,z_}]:=F[2,1,0][{y,x,z}]
F[0,2,1][{x_,y_,z_}]:=F[2,1,0][{y,z,x}]
F[1,0,2][{x_,y_,z_}]:=F[2,1,0][{z,x,y}]
F[0,1,2][{x_,y_,z_}]:=F[2,1,0][{z,y,x}]

F[1,1,1][{x_,y_,z_}]:= x y Lz[{x,y,z}]+y z Lx[{x,y,z}]+z x Ly[{x,y,z}]-(1/2)(x Px[{x,y,z}]+y Py[{x,y,z}]+z Pz[{x,y,z}])

F[2,2,0][{x_,y_,z_}]:= (1/2)(x((y^2)-(z^2))Lx[{x,y,z}]+y((x^2)-(z^2))Ly[{x,y,z}])-x y Pz[{x,y,z}]+((Norm[{x,y,z}])/6)(3(z^2)-((Norm[{x,y,z}])^2));
F[2,0,2][{x_,y_,z_}]:=F[2,2,0][{z,x,y}];
F[0,2,2][{x_,y_,z_}]:=F[2,2,0][{y,z,x}];

F[2,1,1][{x_,y_,z_}]:=  x y z Lx[{x,y,z}]+((y ((x^2)-((y^2)/3)))/2)Lz[{x,y,z}]+((z ((x^2)-((z^2)/3)))/2)Ly[{x,y,z}]-((x^2)/6)Px[{x,y,z}]-(x/2)(y Py[{x,y,z}]+z Pz[{x,y,z}])-((y z)/3)Norm[{x,y,z}];
F[1,2,1][{x_,y_,z_}]:=F[2,1,1][{y,z,x}];
F[1,1,2][{x_,y_,z_}]:=F[2,1,1][{z,x,y}];

F[2,2,2][{x_,y_,z_}]:=(1/24)(x Lx[{x,y,z}](6 (y^2) (z^2)-(y^4)-(z^4))+y Ly[{x,y,z}](6 (x^2) (z^2)-(x^4)-(z^4))+z Lz[{x,y,z}](6 (x^2) (y^2)-(x^4)-(y^4)))-((x y z)/6)(x Px[{x,y,z}]+y Py[{x,y,z}]+z Pz[{x,y,z}])+((Norm[{x,y,z}])/60)(((Norm[{x,y,z}])^4)-5((x^2)(y^2)+(y^2)(z^2)+(z^2)(x^2)))

Step 0 ( only numerical integration)

trapezeSelfEnergyInt0[yW_,zH_,dW_]:=Module[
{gg=(Sqrt[(zH^2)+(dW^2)]),int},
int=NIntegrate[(1/(Sqrt[(((y-η))^2)+(((x-ξ))^2)])),{x,0,gg},{y,-(yW/2)-dW+(dW/gg)x,(yW/2)+dW-(dW/gg)x},{ξ,0,gg},{η,-(yW/2)-dW+(dW/gg)ξ,(yW/2)+dW-(dW/gg)ξ},Method->"QuasiMonteCarlo"];
Return[(int/(4π))]]

QuasiMonteCarlo has low precision but works fast.

Step 1 (analytical integration of y and η, utilizing the known results F[i,k,r][{x,y,z}])

trapezeSelfEnergyInt1[yW_,zH_,dW_]:=Module[
{gg=(Sqrt[(zH^2)+(dW^2)]),int},
int=NIntegrate[(F[0,2,0][{x-ξ,yW+2dW-(dW/gg)(x+ξ),0}]-F[0,2,0][{x-ξ,(dW/gg)(x-ξ),0}]),{x,0,gg},{ξ,0,gg},Method->"QuasiMonteCarlo"];
Return[(int/(2π))]]

Step 2 (integrating the second summand of Step 1)

sol3Log[dW_,gg_]:=(1/6) dW (gg^2) Log[(((gg^2)+2 dW (dW+(Sqrt[(dW^2)+(gg^2)])))/(gg^2))]

trapezeSelfEnergyInt2[yW_,zH_,dW_]:=Module[
{gg=(Sqrt[(zH^2)+(dW^2)]),int},
int=NIntegrate[F[0,2,0][{x-ξ,yW+2dW-(dW/gg)(x+ξ),0}],{x,0,gg},{ξ,0,gg},Method->"QuasiMonteCarlo"];
Return[((int+(( (gg^2))/3) (Sqrt[(gg^2)+(dW^2)])-sol3Log[dW,gg])/(2π))]]

Step 3 (after expanding F[0,20,][...] integrating the first root)

preliminary considerations

F[0,2,0][{x-ξ,yW+2dW-(dW/gg)(x+ξ),0}]//TrigToExp

solRoot=Integrate[(Sqrt[(((x-ξ))^2)+(((2 dW+yW-((dW (x+ξ))/gg)))^2)]),{x,0,gg},{ξ,0,gg},Assumptions-> {yW>0,dW>0,gg>0}]

FullSimplify[solRoot,{yW>0,dW>0,gg>0}]

ws1=(1/(6 dd ((((dd^2)+(gg^2)))^2)))(gg^2) (2 dd ((dd^2)+(gg^2)) ((bb^3)+4 (dd^3)-(dd^2) (Sqrt[(((bb+dd))^2)+(gg^2)])+(gg^2) (Sqrt[(((bb+dd))^2)+(gg^2)])+2 bb dd (3 dd-(Sqrt[(((bb+dd))^2)+(gg^2)]))-(bb^2) (-3 dd+(Sqrt[(((bb+dd))^2)+(gg^2)])))+(gg^2) (Sqrt[(dd^2)+(gg^2)]) (2 (bb+dd) ((bb^2)+2 bb dd+4 (dd^2)) ArcSinh[(dd/gg)]-(bb^3) ArcTanh[((2 dd (bb+dd) (Sqrt[((dd^2)+(gg^2)) ((((bb+dd))^2)+(gg^2))]))/(2 (dd^2) (((bb+dd))^2)+((bb^2)+2 bb dd+2 (dd^2)) (gg^2)))]+2 dd (3 (bb^2)+6 bb dd+4 (dd^2)) Log[((-dd (bb+dd)+(gg^2)+(Sqrt[((dd^2)+(gg^2)) ((((bb+dd))^2)+(gg^2))]))/((bb+2 dd) gg))]));

w3=(w2=(1/(6 dd (Γ^4)))(gg^2) (2 dd (Γ^2) ( (β^3)+ 3(dd^3)+3 bb (dd^2)+τ((τ^2)-2(β^2)))+(gg^2) Γ (2 β ((β^2)+3 (dd^2)) ArcSinh[(dd/gg)]-(bb^3) ArcTanh[((2 dd β Γ τ)/((β^2)((dd^2)+(gg^2))+(dd^2)(τ^2)))]+2 dd (3 (β^2)+(dd^2)) Log[((-dd β+(gg^2)+Γ τ)/((β+ dd) gg))]))//.{Γ->(Sqrt[(dd^2)+(gg^2)]),β->bb+dd,τ->(Sqrt[(β^2)+(gg^2)])});

Simplify[w3-ws1,{dd>0,gg>0,bb>0}]

final

sol3Log[dW_,gg_]:=(1/6) dW (gg^2) Log[(((gg^2)+2 dW (dW+(Sqrt[(dW^2)+(gg^2)])))/(gg^2))]

solW[dd_,gg_,bb_]:=Module[
{Γ=(Sqrt[(dd^2)+(gg^2)]),β=bb+dd,τ},
τ=(Sqrt[(β^2)+(gg^2)]);

Return[(((gg^2) )/(6 dd (Γ^4)))(2 dd (Γ^2) ( (β^3)+ 3(dd^3)+3 bb (dd^2)+τ((τ^2)-2(β^2)))+(gg^2) Γ (2 β ((β^2)+3 (dd^2)) ArcSinh[(dd/gg)]-(bb^3) ArcTanh[((2 dd β Γ τ)/((β^2)((dd^2)+(gg^2))+(dd^2)(τ^2)))]+2 dd (3 (β^2)+(dd^2)) Log[((-dd β+(gg^2)+Γ τ)/((β+ dd) gg))]))];
]

trapezeSelfEnergyInt3[yW_,zH_,dW_]:=Module[
{gg=(Sqrt[(zH^2)+(dW^2)]),int},
int=NIntegrate[(1/2) (yW+2 dW-(dW/gg) (x+ξ)) Log[(((Sqrt[(((x-ξ))^2)+(((yW+2 dW-(dW/gg) (x+ξ)))^2)])+yW+2 dW-(dW/gg) (x+ξ))/((Sqrt[(((x-ξ))^2)+(((yW+2 dW-(dW/gg) (x+ξ)))^2)])-(yW+2 dW-(dW/gg)(x+ξ))))],{x,0,gg},{ξ,0,gg},Method->"QuasiMonteCarlo"];
Return[((int+(( (gg^2))/3) (Sqrt[(gg^2)+(dW^2)])-sol3Log[dW,gg]- solW[dW,gg,yW])/(2π))]]

Step 4 (integrating over x leaving a onedimensional function of ξ)

sol3Log[dW_,gg_]:=(1/6) dW (gg^2) Log[(((gg^2)+2 dW (dW+(Sqrt[(dW^2)+(gg^2)])))/(gg^2))]

solW[dd_,gg_,bb_]:=Module[
{Γ=(Sqrt[(dd^2)+(gg^2)]),β=bb+dd,τ},
τ=(Sqrt[(β^2)+(gg^2)]);

Return[(((gg^2) )/(6 dd (Γ^4)))(2 dd (Γ^2) ( (β^3)+ 3(dd^3)+3 bb (dd^2)+τ((τ^2)-2(β^2)))+(gg^2) Γ (2 β ((β^2)+3 (dd^2)) ArcSinh[(dd/gg)]-(bb^3) ArcTanh[((2 dd β Γ τ)/((β^2)((dd^2)+(gg^2))+(dd^2)(τ^2)))]+2 dd (3 (β^2)+(dd^2)) Log[((-dd β+(gg^2)+Γ τ)/((β+ dd) gg))]))];
]

solZ[dd_,gg_,bb_,ξ_]:=Module[
{Γ=(Sqrt[(dd^2)+(gg^2)]),β=bb+dd,τ,ϵ=bb+2dd,Λ},
τ=(Sqrt[(β^2)+(gg^2)]);

Λ=(Sqrt[(dd β+(gg^2))]);

Return[(1/(4 gg))(((2 dd (gg ϵ-2 dd ξ) ((Sqrt[(((ϵ gg - dd  ξ))^2)+(ξ^2)(gg^2)])-(Sqrt[ (gg^2) (τ^2)-2 gg (Λ^2) ξ+(Γ^2) (ξ^2)])))/(Γ^2))+ξ (2 bb gg+4 dd gg-3 dd ξ) Log[((ϵ gg-dd ξ+(Sqrt[(((ϵ gg - dd  ξ))^2)+(ξ^2)(gg^2) ]))/(-ϵ gg+dd ξ+(Sqrt[(((ϵ gg - dd  ξ))^2)+(ξ^2)(gg^2)])))]+(2 bb gg+3 dd (gg-ξ)) (gg-ξ) Log[(((Sqrt[(gg^2)  (τ^2)-2 gg (Λ^2) ξ+(Γ^2) (ξ^2)])+β gg-dd ξ)/((Sqrt[(gg^2)  (τ^2)-2 gg (Λ^2) ξ+(Γ^2) (ξ^2)])-β gg+dd ξ))]+(1/(Γ^3))2 ((dd^2)+2 (gg^2)) (((gg ϵ-2 dd ξ))^2) Log[(((-dd β gg+(gg^3)+((dd^2) -(gg^2)) ξ+Γ(Sqrt[ (gg^2) (τ^2)-2 gg (Λ^2) ξ+(Γ^2) (ξ^2)])))/( (-dd ϵ gg+((dd^2)-(gg^2)) ξ+Γ(Sqrt[(((ϵ gg - dd  ξ))^2)+(ξ^2)(gg^2)]))))])
];
]

trapezeSelfEnergyInt4[yW_,zH_,dW_]:=Module[
{gg=(Sqrt[(zH^2)+(dW^2)]),int},
int=NIntegrate[solZ[dW,gg,yW,ξ],{ξ,0,gg}];
Return[((int+(( (gg^2))/3) (Sqrt[(gg^2)+(dW^2)])-sol3Log[dW,gg]- solW[dW,gg,yW])/(2π))]]

Step 5 (integrating the first summand over ξ)

preliminary considerations

solZ[dW,gg,yW,ξ]

intSolZ1=Integrate[(1/(4 gg))(1/((dW^2)+(gg^2)))2 dW (gg (2 dW+yW)-2 dW ξ) (-(Sqrt[(gg^2) ((gg^2)+(((dW+yW))^2))-2 gg ((gg^2)+dW (dW+yW)) ξ+((dW^2)+(gg^2)) (ξ^2)])+(Sqrt[(gg^2) (ξ^2)+(((gg (2 dW+yW)-dW ξ))^2)])),{ξ,0,gg},Assumptions->{gg>0,dW>0,yW>0}];

Simplify[intSolZ1,{gg>0,dW>0,yW>0}]

final

sol3Log[dW_,gg_]:=(1/6) dW (gg^2) Log[(((gg^2)+2 dW (dW+(Sqrt[(dW^2)+(gg^2)])))/(gg^2))]

solW[dd_,gg_,bb_]:=Module[
{Γ=(Sqrt[(dd^2)+(gg^2)]),β=bb+dd,τ},
τ=(Sqrt[(β^2)+(gg^2)]);

Return[(((gg^2) )/(6 dd (Γ^4)))(2 dd (Γ^2) ( (β^3)+ 3(dd^3)+3 bb (dd^2)+τ((τ^2)-2(β^2)))+(gg^2) Γ (2 β ((β^2)+3 (dd^2)) ArcSinh[(dd/gg)]-(bb^3) ArcTanh[((2 dd β Γ τ)/((β^2)((dd^2)+(gg^2))+(dd^2)(τ^2)))]+2 dd (3 (β^2)+(dd^2)) Log[((-dd β+(gg^2)+Γ τ)/((β+ dd) gg))]))];
]

solZ1[dW_,gg_,yW_]:=-(1/(12 ((((dW^2)+(gg^2)))^(7/2))))dW (gg^2) (-8 (dW^6) (Sqrt[(dW^2)+(gg^2)])-56 (dW^4) (gg^2) (Sqrt[(dW^2)+(gg^2)])-12 (dW^5) (Sqrt[(dW^2)+(gg^2)]) yW-84 (dW^3) (gg^2) (Sqrt[(dW^2)+(gg^2)]) yW-6 (dW^4) (Sqrt[(dW^2)+(gg^2)]) (yW^2)-42 (dW^2) (gg^2) (Sqrt[(dW^2)+(gg^2)]) (yW^2)-2 (dW^3) (Sqrt[(dW^2)+(gg^2)]) (yW^3)-14 dW (gg^2) (Sqrt[(dW^2)+(gg^2)]) (yW^3)+2 (dW^5) (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+28 (dW^3) (gg^2) (Sqrt[((d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Log[yW]+6 dW (gg^4) (yW^2) Log[yW]+6 (dW^2) (gg^2) (yW^3) Log[yW]-24 (dW^5) (gg^2) Log[2 dW+yW]+24 (dW^3) (gg^4) Log[2 dW+yW]-36 (dW^4) (gg^2) yW Log[2 dW+yW]+36 (dW^2) (gg^4) yW Log[2 dW+yW]-18 (dW^3) (gg^2) (yW^2) Log[2 dW+yW]+18 dW (gg^4) (yW^2) Log[2 dW+yW]-3 (dW^2) (gg^2) (yW^3) Log[2 dW+yW]+3 (gg^4) (yW^3) Log[2 dW+yW]+24 (dW^5) (gg^2) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-24 (dW^3) (gg^4) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]+36 (dW^4) (gg^2) yW Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-36 (dW^2) (gg^4) yW Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]+18 (dW^3) (gg^2) (yW^2) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-18 dW (gg^4) (yW^2) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]+3 (dW^2) (gg^2) (yW^3) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-3 (gg^4) (yW^3) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-6 (dW^3) (gg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gg,yW,ξ],{ξ,0,gg}];
Return[((int+solZ1[dW,gg,yW]+(( (gg^2))/3) (Sqrt[(gg^2)+(dW^2)])-sol3Log[dW,gg]- solW[dW,gg,yW])/(2π))]]

Step 6 (integrating over the first logarithm)

preliminary considerations

intSolZ1=Integrate[solZ2N[dW,gg,yW,ξ],{ξ,0,gg},Assumptions->{gg>0,dW>0,yW>0}];

Simplify[intSolZ1,{gg>0,dW>0,yW>0}]

final

sol3Log[dW_,gg_]:=(1/6) dW (gg^2) Log[(((gg^2)+2 dW (dW+(Sqrt[(dW^2)+(gg^2)])))/(gg^2))]

solW[dd_,gg_,bb_]:=Module[
{Γ=(Sqrt[(dd^2)+(gg^2)]),β=bb+dd,τ},
τ=(Sqrt[(β^2)+(gg^2)]);

Return[(((gg^2) )/(6 dd (Γ^4)))(2 dd (Γ^2) ( (β^3)+ 3(dd^3)+3 bb (dd^2)+τ((τ^2)-2(β^2)))+(gg^2) Γ (2 β ((β^2)+3 (dd^2)) ArcSinh[(dd/gg)]-(bb^3) ArcTanh[((2 dd β Γ τ)/((β^2)((dd^2)+(gg^2))+(dd^2)(τ^2)))]+2 dd (3 (β^2)+(dd^2)) Log[((-dd β+(gg^2)+Γ τ)/((β+ dd) gg))]))];
]

solZ1[dW_,gg_,yW_]:=-(1/(12 ((((dW^2)+(gg^2)))^(7/2))))dW (gg^2) (-8 (dW^6) (Sqrt[(dW^2)+(gg^2)])-56 (dW^4) (gg^2) (Sqrt[(dW^2)+(gg^2)])-12 (dW^5) (Sqrt[(dW^2)+(gg^2)]) yW-84 (dW^3) (gg^2) (Sqrt[(dW^2)+(gg^2)]) yW-6 (dW^4) (Sqrt[(dW^2)+(gg^2)]) (yW^2)-42 (dW^2) (gg^2) (Sqrt[(dW^2)+(gg^2)]) (yW^2)-2 (dW^3) (Sqrt[(dW^2)+(gg^2)]) (yW^3)-14 dW (gg^2) (Sqrt[(dW^2)+(gg^2)]) (yW^3)+2 (dW^5) (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+28 (dW^3) (gg^2) (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+2 dW (gg^4) (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+4 (dW^4) yW (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+28 (dW^2) (gg^2) yW (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+2 (dW^3) (yW^2) (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+14 dW (gg^2) (yW^2) (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])-3 (gg^2) ((dW^2)+(gg^2)) (yW^2) (2 dW+yW) ArcSinh[(dW/gg)]+3 (gg^2) ((dW^2)+(gg^2)) (yW^2) (2 dW+yW) ArcSinh[(((dW^2)+(gg^2)+dW yW)/(gg yW))]-24 (dW^5) (gg^2) Log[-dW+(Sqrt[(dW^2)+(gg^2)])]+24 (dW^3) (gg^4) Log[-dW+(Sqrt[(dW^2)+(gg^2)])]-36 (dW^4) (gg^2) yW Log[-dW+(Sqrt[(dW^2)+(gg^2)])]+36 (dW^2) (gg^4) yW Log[-dW+(Sqrt[(dW^2)+(gg^2)])]-18 (dW^3) (gg^2) (yW^2) Log[-dW+(Sqrt[(dW^2)+(gg^2)])]+18 dW (gg^4) (yW^2) Log[-dW+(Sqrt[(dW^2)+(gg^2)])]-3 (dW^2) (gg^2) (yW^3) Log[-dW+(Sqrt[(dW^2)+(gg^2)])]+3 (gg^4) (yW^3) Log[-dW+(Sqrt[(dW^2)+(gg^2)])]+6 (dW^3) (gg^2) (yW^2) Log[dW+(Sqrt[(dW^2)+(gg^2)])]+6 dW (gg^4) (yW^2) Log[dW+(Sqrt[(dW^2)+(gg^2)])]+6 (dW^2) (gg^2) (yW^3) Log[dW+(Sqrt[(dW^2)+(gg^2)])]+6 (dW^3) (gg^2) (yW^2) Log[yW]+6 dW (gg^4) (yW^2) Log[yW]+6 (dW^2) (gg^2) (yW^3) Log[yW]-24 (dW^5) (gg^2) Log[2 dW+yW]+24 (dW^3) (gg^4) Log[2 dW+yW]-36 (dW^4) (gg^2) yW Log[2 dW+yW]+36 (dW^2) (gg^4) yW Log[2 dW+yW]-18 (dW^3) (gg^2) (yW^2) Log[2 dW+yW]+18 dW (gg^4) (yW^2) Log[2 dW+yW]-3 (dW^2) (gg^2) (yW^3) Log[2 dW+yW]+3 (gg^4) (yW^3) Log[2 dW+yW]+24 (dW^5) (gg^2) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-24 (dW^3) (gg^4) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]+36 (dW^4) (gg^2) yW Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-36 (dW^2) (gg^4) yW Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]+18 (dW^3) (gg^2) (yW^2) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-18 dW (gg^4) (yW^2) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]+3 (dW^2) (gg^2) (yW^3) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-3 (gg^4) (yW^3) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((d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2)+(gg^2)+2 dW yW+(yW^2)]))/(dW+yW-(Sqrt[(dW^2)+(gg^2)+2 dW yW+(yW^2)])))]+(2 dW+yW) ((Sqrt[(dW^2)+(gg^2)]) (4 (dW^4)+(dW^3) (4 yW-3 (Sqrt[(dW^2)+(gg^2)+2 dW yW+(yW^2)]))+2 (gg^2) yW (-yW+(Sqrt[(dW^2)+(gg^2)+2 dW yW+(yW^2)]))+dW (gg^2) (-8 yW+3 (Sqrt[(dW^2)+(gg^2)+2 dW yW+(yW^2)]))+(dW^2) (-8 (gg^2)+yW (yW-(Sqrt[(dW^2)+(gg^2)+2 dW yW+(yW^2)]))))+3 dW (gg^2) (((2 dW+yW))^2) Log[gg (-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))]))]))

trapezeSelfEnergyInt6[yW_,zH_,dW_]:=Module[
{gg=(Sqrt[(zH^2)+(dW^2)]),int},
int=NIntegrate[solZMin2[dW,gg,yW,ξ],{ξ,0,gg}]+ 0 NIntegrate[solZ2N[dW,gg,yW,ξ],{ξ,0,gg}];
Return[(1/(2π))(int+solZ1[dW,gg,yW]+ solZ2[dW,gg,yW]+(( (gg^2))/3) (Sqrt[(gg^2)+(dW^2)])-sol3Log[dW,gg]- solW[dW,gg,yW])]]

Step 7 (integrating the second logarithm)

preliminary considerations

solZMin2[dW,gg,yW,ξ]

intSolZ7=Integrate[(1/(4 gg))((2 gg yW+3 dW (gg-ξ)) (gg-ξ) Log[((gg (dW+yW)-dW ξ+(Sqrt[(gg^2) ((gg^2)+(((dW+yW))^2))-2 gg ((gg^2)+dW (dW+yW)) ξ+((dW^2)+(gg^2)) (ξ^2)]))/(-gg (dW+yW)+dW ξ+(Sqrt[(gg^2) ((gg^2)+(((dW+yW))^2))-2 gg ((gg^2)+dW (dW+yW)) ξ+((dW^2)+(gg^2)) (ξ^2)])))]),{ξ,0,gg},Assumptions->{gg>0,dW>0,yW>0}];

intSolZ7Simp=Simplify[intSolZ7,{gg>0,dW>0,yW>0}]

NIntegrate[solZMin3[2,3,2.2,ξ],{ξ,0,3}]

NIntegrate[(1/(4 gg))((1/((((dW^2)+(gg^2)))^(3/2)))2 ((dW^2)+2 (gg^2)) (((gg (2 dW+yW)-2 dW ξ))^2) Log[((gg^3)-dW gg (dW+yW)+((dW^2)-(gg^2)) ξ+(Sqrt[(dW^2)+(gg^2)]) (Sqrt[(gg^2) ((gg^2)+(((dW+yW))^2))-2 gg ((gg^2)+dW (dW+yW)) ξ+((dW^2)+(gg^2)) (ξ^2)]))/(-dW gg (2 dW+yW)+((dW^2)-(gg^2)) ξ+(Sqrt[(dW^2)+(gg^2)]) (Sqrt[(gg^2) (ξ^2)+(((gg (2 dW+yW)-dW ξ))^2)]))])/.{dW->2,gg->3,yW->2.2},{ξ,0,3}]+NIntegrate[(1/(4 gg))((2 gg yW+3 dW (gg-ξ)) (gg-ξ) Log[((gg (dW+yW)-dW ξ+(Sqrt[(gg^2) ((gg^2)+(((dW+yW))^2))-2 gg ((gg^2)+dW (dW+yW)) ξ+((dW^2)+(gg^2)) (ξ^2)]))/(-gg (dW+yW)+dW ξ+(Sqrt[(gg^2) ((gg^2)+(((dW+yW))^2))-2 gg ((gg^2)+dW (dW+yW)) ξ+((dW^2)+(gg^2)) (ξ^2)])))])/.{dW->2,gg->3,yW->2.2},{ξ,0,3}]

NIntegrate[(1/(4 gg))((2 gg yW+3 dW (gg-ξ)) (gg-ξ) Log[((gg (dW+yW)-dW ξ+(Sqrt[(gg^2) ((gg^2)+(((dW+yW))^2))-2 gg ((gg^2)+dW (dW+yW)) ξ+((dW^2)+(gg^2)) (ξ^2)]))/(-gg (dW+yW)+dW ξ+(Sqrt[(gg^2) ((gg^2)+(((dW+yW))^2))-2 gg ((gg^2)+dW (dW+yW)) ξ+((dW^2)+(gg^2)) (ξ^2)])))])/.{dW->2,gg->3,yW->2.2},{ξ,0,3}]

intSolZ7Simp/.{dW->2,gg->3,yW->2.2}

final

sol3Log[dW_,gg_]:=(1/6) dW (gg^2) Log[(((gg^2)+2 dW (dW+(Sqrt[(dW^2)+(gg^2)])))/(gg^2))]

solW[dd_,gg_,bb_]:=Module[
{Γ=(Sqrt[(dd^2)+(gg^2)]),β=bb+dd,τ},
τ=(Sqrt[(β^2)+(gg^2)]);

Return[(((gg^2) )/(6 dd (Γ^4)))(2 dd (Γ^2) ( (β^3)+ 3(dd^3)+3 bb (dd^2)+τ((τ^2)-2(β^2)))+(gg^2) Γ (2 β ((β^2)+3 (dd^2)) ArcSinh[(dd/gg)]-(bb^3) ArcTanh[((2 dd β Γ τ)/((β^2)((dd^2)+(gg^2))+(dd^2)(τ^2)))]+2 dd (3 (β^2)+(dd^2)) Log[((-dd β+(gg^2)+Γ τ)/((β+ dd) gg))]))];
]

solZ1[dW_,gg_,yW_]:=-(1/(12 ((((dW^2)+(gg^2)))^(7/2))))dW (gg^2) (-8 (dW^6) (Sqrt[(dW^2)+(gg^2)])-56 (dW^4) (gg^2) (Sqrt[(dW^2)+(gg^2)])-12 (dW^5) (Sqrt[(dW^2)+(gg^2)]) yW-84 (dW^3) (gg^2) (Sqrt[(dW^2)+(gg^2)]) yW-6 (dW^4) (Sqrt[(dW^2)+(gg^2)]) (yW^2)-42 (dW^2) (gg^2) (Sqrt[(dW^2)+(gg^2)]) (yW^2)-2 (dW^3) (Sqrt[(dW^2)+(gg^2)]) (yW^3)-14 dW (gg^2) (Sqrt[(dW^2)+(gg^2)]) (yW^3)+2 (dW^5) (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+28 (dW^3) (gg^2) (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+2 dW (gg^4) (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+4 (dW^4) yW (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+28 (dW^2) (gg^2) yW (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+2 (dW^3) (yW^2) (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+14 dW (gg^2) (yW^2) (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])-3 (gg^2) ((dW^2)+(gg^2)) (yW^2) (2 dW+yW) ArcSinh[(dW/gg)]+3 (gg^2) ((dW^2)+(gg^2)) (yW^2) (2 dW+yW) ArcSinh[(((dW^2)+(gg^2)+dW yW)/(gg yW))]-24 (dW^5) (gg^2) Log[-dW+(Sqrt[(dW^2)+(gg^2)])]+24 (dW^3) (gg^4) Log[-dW+(Sqrt[(dW^2)+(gg^2)])]-36 (dW^4) (gg^2) yW Log[-dW+(Sqrt[(dW^2)+(gg^2)])]+36 (dW^2) (gg^4) yW Log[-dW+(Sqrt[(dW^2)+(gg^2)])]-18 (dW^3) (gg^2) (yW^2) Log[-dW+(Sqrt[(dW^2)+(gg^2)])]+18 dW (gg^4) (yW^2) Log[-dW+(Sqrt[(dW^2)+(gg^2)])]-3 (dW^2) (gg^2) (yW^3) Log[-dW+(Sqrt[(dW^2)+(gg^2)])]+3 (gg^4) (yW^3) Log[-dW+(Sqrt[(dW^2)+(gg^2)])]+6 (dW^3) (gg^2) (yW^2) Log[dW+(Sqrt[(dW^2)+(gg^2)])]+6 dW (gg^4) (yW^2) Log[dW+(Sqrt[(dW^2)+(gg^2)])]+6 (dW^2) (gg^2) (yW^3) Log[dW+(Sqrt[(dW^2)+(gg^2)])]+6 (dW^3) (gg^2) (yW^2) Log[yW]+6 dW (gg^4) (yW^2) Log[yW]+6 (dW^2) (gg^2) (yW^3) Log[yW]-24 (dW^5) (gg^2) Log[2 dW+yW]+24 (dW^3) (gg^4) Log[2 dW+yW]-36 (dW^4) (gg^2) yW Log[2 dW+yW]+36 (dW^2) (gg^4) yW Log[2 dW+yW]-18 (dW^3) (gg^2) (yW^2) Log[2 dW+yW]+18 dW (gg^4) (yW^2) Log[2 dW+yW]-3 (dW^2) (gg^2) (yW^3) Log[2 dW+yW]+3 (gg^4) (yW^3) Log[2 dW+yW]+24 (dW^5) (gg^2) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-24 (dW^3) (gg^4) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]+36 (dW^4) (gg^2) yW Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-36 (dW^2) (gg^4) yW Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]+18 (dW^3) (gg^2) (yW^2) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-18 dW (gg^4) (yW^2) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]+3 (dW^2) (gg^2) (yW^3) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-3 (gg^4) (yW^3) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-6 (dW^3) (gg^2) (yW^2) Log[(dW^2)+(gg^2)+dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-6 dW (gg^4) (yW^2) Log[(dW^2)+(gg^2)+dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-6 (d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qrt[(dW^2)+(gg^2)+2 dW yW+(yW^2)])]+4 (dW^2) (gg^2) (Sqrt[(dW^2)+(gg^2)]) yW Log[dW+yW+(Sqrt[(dW^2)+(gg^2)+2 dW yW+(yW^2)])]+2 (gg^4) (Sqrt[(dW^2)+(gg^2)]) yW Log[dW+yW+(Sqrt[(dW^2)+(gg^2)+2 dW yW+(yW^2)])]+3 dW (gg^2) (yW^3) Log[-(dW^2)-(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])])

trapezeSelfEnergyInt7[yW_,zH_,dW_]:=Module[
{gg=(Sqrt[(zH^2)+(dW^2)]),int},
int=NIntegrate[solZMin3[dW,gg,yW,ξ],{ξ,0,gg}];
Return[(1/(2π))(int+solZ1[dW,gg,yW]+ solZ2[dW,gg,yW]+ solZ3[dW,gg,yW]+(( (gg^2))/3) (Sqrt[(gg^2)+(dW^2)])-sol3Log[dW,gg]- solW[dW,gg,yW])]]

Step 8 (integrating over the last logaritm)

preliminary considerations

solZMin3[dW,gg,yW,ξ]

intSolZ8a=Integrate[(1/(2 gg ((((dW^2)+(gg^2)))^(3/2))))((dW^2)+2 (gg^2)) (((gg (2 dW+yW)-2 dW ξ))^2) Log[(gg^3)-dW gg (dW+yW)+((dW^2)-(gg^2)) ξ+(Sqrt[(dW^2)+(gg^2)]) (Sqrt[(gg^2) ((gg^2)+(((dW+yW))^2))-2 gg ((gg^2)+dW (dW+yW)) ξ+((dW^2)+(gg^2)) (ξ^2)])],{ξ,0,gg},Assumptions->{gg>0,dW>0,yW>0}]

intSolZ8b=Integrate[-((((dW^2)+2 (gg^2)) (((gg (2 dW+yW)-2 dW ξ))^2) Log[-dW gg (2 dW+yW)+((dW^2)-(gg^2)) ξ+(Sqrt[(dW^2)+(gg^2)]) (Sqrt[(gg^2) (ξ^2)+(((gg (2 dW+yW)-dW ξ))^2)])])/(2 gg ((((dW^2)+(gg^2)))^(3/2)))),{ξ,0,gg},Assumptions->{gg>0,dW>0,yW>0}];

intSolZ8Simpb=Simplify[intSolZ8b,{gg>0,dW>0,yW>0}]

final

sol3Log[dW_,gg_]:=(1/6) dW (gg^2) Log[(((gg^2)+2 dW (dW+(Sqrt[(dW^2)+(gg^2)])))/(gg^2))]

solW[dd_,gg_,bb_]:=Module[
{Γ=(Sqrt[(dd^2)+(gg^2)]),β=bb+dd,τ},
τ=(Sqrt[(β^2)+(gg^2)]);

Return[(((gg^2) )/(6 dd (Γ^4)))(2 dd (Γ^2) ( (β^3)+ 3(dd^3)+3 bb (dd^2)+τ((τ^2)-2(β^2)))+(gg^2) Γ (2 β ((β^2)+3 (dd^2)) ArcSinh[(dd/gg)]-(bb^3) ArcTanh[((2 dd β Γ τ)/((β^2)((dd^2)+(gg^2))+(dd^2)(τ^2)))]+2 dd (3 (β^2)+(dd^2)) Log[((-dd β+(gg^2)+Γ τ)/((β+ dd) gg))]))];
]

solZ1[dW_,gg_,yW_]:=-(1/(12 ((((dW^2)+(gg^2)))^(7/2))))dW (gg^2) (-8 (dW^6) (Sqrt[(dW^2)+(gg^2)])-56 (dW^4) (gg^2) (Sqrt[(dW^2)+(gg^2)])-12 (dW^5) (Sqrt[(dW^2)+(gg^2)]) yW-84 (dW^3) (gg^2) (Sqrt[(dW^2)+(gg^2)]) yW-6 (dW^4) (Sqrt[(dW^2)+(gg^2)]) (yW^2)-42 (dW^2) (gg^2) (Sqrt[(dW^2)+(gg^2)]) (yW^2)-2 (dW^3) (Sqrt[(dW^2)+(gg^2)]) (yW^3)-14 dW (gg^2) (Sqrt[(dW^2)+(gg^2)]) (yW^3)+2 (dW^5) (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+28 (dW^3) (gg^2) (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+2 dW (gg^4) (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+4 (dW^4) yW (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+28 (dW^2) (gg^2) yW (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+2 (dW^3) (yW^2) (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])+14 dW (gg^2) (yW^2) (Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])-3 (gg^2) ((dW^2)+(gg^2)) (yW^2) (2 dW+yW) ArcSinh[(dW/gg)]+3 (gg^2) ((dW^2)+(gg^2)) (yW^2) (2 dW+yW) ArcSinh[(((dW^2)+(gg^2)+dW yW)/(gg yW))]-24 (dW^5) (gg^2) Log[-dW+(Sqrt[(dW^2)+(gg^2)])]+24 (dW^3) (gg^4) Log[-dW+(Sqrt[(dW^2)+(gg^2)])]-36 (dW^4) (gg^2) yW Log[-dW+(Sqrt[(dW^2)+(gg^2)])]+36 (dW^2) (gg^4) yW Log[-dW+(Sqrt[(dW^2)+(gg^2)])]-18 (dW^3) (gg^2) (yW^2) Log[-dW+(Sqrt[(dW^2)+(gg^2)])]+18 dW (gg^4) (yW^2) Log[-dW+(Sqrt[(dW^2)+(gg^2)])]-3 (dW^2) (gg^2) (yW^3) Log[-dW+(Sqrt[(dW^2)+(gg^2)])]+3 (gg^4) (yW^3) Log[-dW+(Sqrt[(dW^2)+(gg^2)])]+6 (dW^3) (gg^2) (yW^2) Log[dW+(Sqrt[(dW^2)+(gg^2)])]+6 dW (gg^4) (yW^2) Log[dW+(Sqrt[(dW^2)+(gg^2)])]+6 (dW^2) (gg^2) (yW^3) Log[dW+(Sqrt[(dW^2)+(gg^2)])]+6 (dW^3) (gg^2) (yW^2) Log[yW]+6 dW (gg^4) (yW^2) Log[yW]+6 (dW^2) (gg^2) (yW^3) Log[yW]-24 (dW^5) (gg^2) Log[2 dW+yW]+24 (dW^3) (gg^4) Log[2 dW+yW]-36 (dW^4) (gg^2) yW Log[2 dW+yW]+36 (dW^2) (gg^4) yW Log[2 dW+yW]-18 (dW^3) (gg^2) (yW^2) Log[2 dW+yW]+18 dW (gg^4) (yW^2) Log[2 dW+yW]-3 (dW^2) (gg^2) (yW^3) Log[2 dW+yW]+3 (gg^4) (yW^3) Log[2 dW+yW]+24 (dW^5) (gg^2) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-24 (dW^3) (gg^4) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]+36 (dW^4) (gg^2) yW Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-36 (dW^2) (gg^4) yW Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]+18 (dW^3) (gg^2) (yW^2) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-18 dW (gg^4) (yW^2) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]+3 (dW^2) (gg^2) (yW^3) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-3 (gg^4) (yW^3) Log[-(dW^2)+(gg^2)-dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-6 (dW^3) (gg^2) (yW^2) Log[(dW^2)+(gg^2)+dW yW+(Sqrt[((dW^2)+(gg^2)) ((dW^2)+(gg^2)+2 dW yW+(yW^2))])]-6 dW (gg^4) (yW^2) Log[(dW^2)+(gg^2)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,yW])]]

Comparison of results

trapezeSelfEnergyInt1[4,1.1,2.2]

trapezeSelfEnergyInt8[4,1.1,2.2]

d0Lst=Table[{dd,trapezeSelfEnergyInt0[2.,1.,dd]},{dd,0,6,.2}];

d1Lst=Table[{dd,trapezeSelfEnergyInt1[2.,1.,dd]},{dd,0,6,.2}];

d2Lst=Table[{dd,trapezeSelfEnergyInt2[2.,1.,dd]},{dd,0,6,.2}];

d3Lst=Table[{dd,trapezeSelfEnergyInt3[2.,1.,dd]},{dd,0,6,.2}];

d4Lst=Table[{dd,trapezeSelfEnergyInt4[2.,1.,dd]},{dd,.2,6,.2}];

d5Lst=Table[{dd,trapezeSelfEnergyInt5[2.,1.,dd]},{dd,0,6,.2}];

d6Lst=Table[{dd,trapezeSelfEnergyInt6[2.,1.,dd]},{dd,0,6,.2}];

d7Lst=Table[{dd,trapezeSelfEnergyInt7[2.,1.,dd]},{dd,0,6,.2}];

d8Lst=Table[{dd,trapezeSelfEnergyInt8[2.,1.,dd]},{dd,0,6,.2}];

ListLogPlot[{
d0Lst,
d1Lst ,
d2Lst ,
 d3Lst,
d4Lst,
d5Lst,
d6Lst,
d7Lst,
d8Lst
},Frame->True,PlotStyle->Table[Hue[.66((i-1)/8)],{i,9}]]

Relative Error of numerical and full analytical solution

dRelLstA=Table[{dd,((trapezeSelfEnergyInt8[2.,1.,dd]-trapezeSelfEnergyInt0[2.,1.,dd])/(trapezeSelfEnergyInt8[2.,1.,dd]))},{dd,.2,6,.2}];

dRelLstB=Table[{dd,((trapezeSelfEnergyInt8[5.2,1.3,dd]-trapezeSelfEnergyInt0[5.2,1.3,dd])/(trapezeSelfEnergyInt8[5.2,1.3,dd]))},{dd,.2,6,.2}];

ListPlot[{
dRelLstA,
dRelLstB
},Frame->True,Joined->True,Epilog->{Point[#]&/@dRelLstA,Point[#]&/@dRelLstB}
]

This comparison shows that the difference of the numerical and full analytical solution is about 1 %.

Selfenergy of a perfect element

Energy between two plates of the same dimensions (a,b). The center is located at y=0. In x-direction the distance is A in z-direction B.

energy[a_,b_,A_,B_]:=
(1/(4π))(2(F[2,2,0][{a-A,b,B}]-F[2,2,0][{a-A,0,B}]+F[2,2,0][{a+A,b,B}]-F[2,2,0][{a+A,0,B}])+4(F[2,2,0][{A,0,B}]-F[2,2,0][{A,b,B}]))

energy[a_,b_,A_,0]:=
(1/(4π))(2(F[2,2,0][{a-A,b,0}]+(((Abs[a-A])^3)/6)+F[2,2,0][{a+A,b,0}]+(((Abs[a+A])^3)/6))+4((-(((Abs[A])^3)/6))-F[2,2,0][{A,b,0}]))

energy[a_,b_,A_,0.]:=energy[a,b,A,0]

energy[a_,b_,0,0]:=(1/(4π))((2/3) ((a^3)+(b^3)-(a^2) (Sqrt[(a^2)+(b^2)])-(b^2) (Sqrt[(a^2)+(b^2)])+3 a (b^2) ArcTanh[(a/(Sqrt[(a^2)+(b^2)]))]+3 (a^2) b ArcTanh[(b/(Sqrt[(a^2)+(b^2)]))]))

selfEnergynd[a_,b_,c_]:=(energy[a,b,0,0]-energy[a,b,0,c])