d =. ; Vo =. ; xh =. ; yh =. ;

xh = ((x*Pi)/(2*d));  yh = ((y*Pi)/(2*d)); 
    Yhs = 2*((H*Pi)/(2*d)) - yh;

ExH1 = ((2*Vo)/(Pi*d))*ArcTan[Sin[xh]/Sinh[Yhs]]; 
    ExH2 = ((2*Vo)/(Pi*d))*ArcTan[Cos[xh]/Sinh[Yhs]];

ExxH1 = FullSimplify[D[ExH1, x]]

ExxH2 = FullSimplify[D[ExH2, x]]

ExxH = ExxH1 - ExxH2

ExyH1 = FullSimplify[D[ExH1, y]]

ExyH2 = FullSimplify[D[ExH2, y]]

ExyH = ExyH1 - ExyH2

EyH1 = ((-Vo)/(Pi*d))*
        Log[((Cosh[Yhs] + Cos[xh])/(Cosh[Yhs] - Cos[xh]))]; 
    EyH2 = ((-Vo)/(Pi*d))*
        Log[((Cosh[Yhs] + Sin[xh])/(Cosh[Yhs] - Sin[xh]))];

EyxH1 = FullSimplify[D[EyH1, x]]

EyxH2 = FullSimplify[D[EyH2, x]]

EyxH = EyxH1 + EyxH2

EyyH1 = FullSimplify[D[EyH1, y]]

EyyH2 = FullSimplify[D[EyH2, y]]

EyyH = EyyH1 + EyyH2

ExxH + EyyH

ExyH - EyxH

grdE2xH = 2*(ExH*ExxH + EyH*EyxH); 
    grdE2yH = 2*(ExH*ExyH + EyH*EyyH);

Vo = 1; d = 1; H = 2;

Ex = ((2*Vo)/(Pi*d))*(ArcTan[Sin[xh]/Sinh[yh]] - 
            ArcTan[Cos[xh]/Sinh[yh]])

Ey = 
      (Vo/(Pi*d))*
        Log[((Cosh[yh] + Cos[xh])/(Cosh[yh] - Cos[xh]))*((Cosh[yh] + Sin[xh])/(Cosh[yh] - Sin[xh]))]

Exx = ((2*Vo*
              Sinh[yh])/(d^2)) (Cos[xh]/(Cosh[2*yh] - Cos[2*xh]) + 
            Sin[xh]/(Cosh[2*yh] + Cos[2*xh]))

Exy = ((2*Vo*
              Cosh[yh])/(d^2)) (Cos[xh]/(Cosh[2*yh] + Cos[2*xh]) - 
            Sin[xh]/(Cosh[2*yh] - Cos[2*xh]))

Eyx = Exy; Eyy = -Exx;

grdE2x = 2*(Ex*Exx + Ey*Eyx);grdE2y = 2*(Ex*Exy + Ey*Eyy);

d = 1; Vo = 1; d2 = 2*d; y = 0.1*d ; xhmn = 0; xhmx = 2*Pi;

V = 
        Sum[ (((16*Vo*Cos[((n π)/4)] )/((n^2) (π^2))))*Cos[((n*π*x)/(2*d))]*
            (E^(-((n π y)/(2 d)))), {n, 1, 3, 
            2}];

<< Calculus`VectorAnalysis`
<< Graphics`PlotField`

SetCoordinates[Cartesian[x, y, z]];

Field = -Grad[V];

PLfr1 = 
      Plot3D[Force[[1]], {x, xmin, xmax}, {y, ymin, ymax}, 
        PlotRange -> {-40, 40}]

Show[PLfr1, PlotRange -> {-40, 40}]

(* need to specify piecewise continuous function at y  =  0 *)

H = 30;  
    NDSolve[{D[Φ[x, y], y, y] + 
            D[Φ[x, y], x, x] == 
          0, Φ[x, 0] == 
          1, Derivative[0, 1][Φ][x, 0] == 
          0, Φ[-20, y] == Φ[20, 
            y]}, Φ, {x, -20, 20}, {y, 0, 30}]

Plot3D[
      Evaluate[Φ[x, y] /. First[%]], {x, -5, 5}, {y, 0, 5}, 
      PlotPoints -> 30]

NDSolve[{D[Φ[x, y], y, y] + 
            D[Φ[x, y], x, x] == 
          0, Φ[x, 0] == 
          1, Derivative[0, 1][Φ][x, 30] == 
          0, Derivative[1, 0][Φ][-20, 
            y] == Derivative[1, 0][Φ][20, 
            y], Φ[-20, y] == Φ[20, 
            y]}, Φ, {x, -20, 20}, {y, 0, 30}]

NDSolve[{D[Φ[x, y], y, y] + 
            D[Φ[x, y], x, x] == 
          0, Φ[x, 0] == 
          1, Derivative[0, 1][Φ][x, 30] == 
          0, Φ[-20, y] == Φ[20, 
            y]}, Φ, {x, -20, 20}, {y, 0, 30}]

y =. ; 
    testV = Sum[ (((16*Vo*Cos[((n π)/4)] )/((n^2) (π^2))))*Cos[((n*π*x)/(2*d))]*
          (E^(-((n π y)/(2 d)))), {n, 1, ∞, 
          2}]

V = 
      FullSimplify[(1/((Sqrt[2]) (π^2))) ((1 + I) (E^(-((π y)/20))) (-I Cos[((π x)/20)] LerchPhi[-I (E^(-(1/10) I π x - ((π y)/10))), 2, (1/2)] + 
                  Cos[((π x)/20)] LerchPhi[I (E^(-(1/10) I π x - ((π y)/10))), 2, (1/2)] - I Cos[((π x)/20)] LerchPhi[-I (E^(((I π x)/10) - ((π y)/10))), 2, (1/2)] + 
                  Cos[((π x)/20)] LerchPhi[I (E^(((I π x)/10) - ((π y)/10))), 2, 
                      (1/2)] - 
                  LerchPhi[-I (E^(-(1/10) I π x - ((π y)/10))), 2, (1/2)] Sin[((π x)/20)] - I LerchPhi[I (E^(-(1/10) I π x - ((π y)/10))), 2, (1/2)] Sin[((π x)/20)] + 
                  LerchPhi[-I (E^(((I π x)/10) - ((π y)/10))), 2, 
                      (1/2)] Sin[((π x)/20)] + I LerchPhi[I (E^(((I π x)/10) - ((π y)/10))), 2, (1/2)] Sin[((π x)/20)]))]

d = 10; Vo = 1; Plot3D[V, {x, -20, 20}, {y, 0, 30}]

Vy0 = 
      FullSimplify[(1/((Sqrt[2]) (π^2))) ((1 + I) Vo (-I Cos[((π x)/(2 d))] LerchPhi[-I (E^(-((I π x)/d))), 2, (1/2)] + 
                  Cos[((π x)/(2 d))] LerchPhi[I (E^(-((I π x)/d))), 2, 
                      (1/2)] - I Cos[((π x)/(2 d))] LerchPhi[-I (E^(((I π x)/d))), 2, (1/2)] + 
                  Cos[((π x)/(2 d))] LerchPhi[I (E^(((I π x)/d))), 2, (1/2)] - 
                  LerchPhi[-I (E^(-((I π x)/d))), 2, 
                      (1/2)] Sin[((π x)/(2 d))] - I LerchPhi[I (E^(-((I π x)/d))), 2, (1/2)] Sin[((π x)/(2 d))] + 
                  LerchPhi[-I (E^(((I π x)/d))), 2, 
                      (1/2)] Sin[((π x)/(2 d))] + I LerchPhi[I (E^(((I π x)/d))), 
                      2, (1/2)] Sin[((π x)/(2 d))]))]

(*  TheLerch transcendent LerchPhi[z, s, a]is a generalization of the zeta and polylogarithm functions,given byΦ(z, s, a)=(∑_(k = 0)^∞)(z^k)/(((a + k))^s),where any term witha + k = 0is excluded . Many sums of reciprocal powers can be expressed in terms of the Lerch transcendent *)

y

d = 10; Vo = 1; Plot[Vy0, {x, -20, 20}]

NDSolve[{D[Φ[x, y], y, y] == D[Φ[x, y], x, x],
    Φ[x, 0] == Exp[-x^2], Derivative[0,1][Φ][x, 0] == 0,
       Φ[-5, y] == Φ[5, y]},Φ, {x, -5, 5}, {y, 0, 5}]

Plot3D[
      Evaluate[Φ[x, y] /. First[%]], {x, -5, 5}, {y, 0, 5}, 
      PlotPoints -> 30]

d =. ; (∫_0^d) Cos[((1*π)/(2*d))*x]*
        Cos[((1*π)/(2*d))*x] \[DifferentialD]x

(∫_0^d) Cos[((1*π)/(2*d))*x]*
        Cos[((-5*π)/(2*d))*
            x] \[DifferentialD]x

d =. ; (∫_(-d/2)^(d/2))Cos[((1*π)/(2*d))*x]*
        Cos[((1*π)/(2*d))*x] \[DifferentialD]x

(∫_(-d/2)^(d/2))Cos[((1*π)/(2*d))*x]*
        Cos[((3*π)/(2*d))*x] \[DifferentialD]x

(∫_0^(d/2))Cos[((1*π)/(2*d))*2*x]*
        Cos[((1*π)/(2*d))*2*x] \[DifferentialD]x

(∫_(-d/2)^(d/2))Cos[((1*π)/(2*d))*(x + 
                (d/2))]*
        Cos[((1*π)/(2*d))*(x + 
                (d/2))] \[DifferentialD]x

(∫_(-d/2)^(d/2))Cos[((1*π)/(2*d))*(x + 
                (d/2))]*
        Cos[((3*π)/(2*d))*(x + 
                (d/2))] \[DifferentialD]x

(∫_(d/2)^(3  d/2))Cos[((1*π)/(2*d))*(x + 
                (d/2))]*
        Cos[((1*π)/(2*d))*(x + 
                (d/2))] \[DifferentialD]x

(∫_(d/2)^(3  d/2))Cos[((1*π)/(2*d))*(x + 
                (d/2))]*
        Cos[((-3*π)/(2*d))*(x + 
                (d/2))] \[DifferentialD]x

(∫_(-d/2)^(d/2))Cos[((n*π)/(2*d))*(x + 
                (d/2))] \[DifferentialD]x

(∫_(d/2)^(d/1))Cos[((1*π)/(2*d))*2*x]*
        Cos[((3*π)/(2*d))*2*x] \[DifferentialD]x

(∫_0^(d/2))(Cos[((1*π)/(2*d))*x]*2*
              Cos[((1*π)/(2*d))*x] - 1)*
        Cos[((1*π)/(2*d))*2*x] \[DifferentialD]x

(∫_0^(d/2))(Cos[((1*π)/(2*d))*x]*2*
              Cos[((1*π)/(2*d))*x]*Cos[((1*π)/(2*d))*2*x] - 
            Cos[((1*π)/(2*d))*2*x]) \[DifferentialD]x

(∫_0^(d/2))(Cos[((1*π)/(2*d))*x]*2*
              Cos[((1*π)/(2*d))*x]*Cos[((3*π)/(2*d))*2*x] - 
            Cos[((3*π)/(2*d))*2*x]) \[DifferentialD]x

d = 1;

d = 1; 
    Plot[Cos[((1*π)/(2*d))*x]*
        Cos[((3*π)/(2*d))*x], {x, -(d/1), (d/1)}]

FullSimplify[(∫_0^(d/2))Vo*
            Cos[((n*π)/(2*d))*
                x] \[DifferentialD]x + (∫_(d/2)^d) 
              Cos[((n*π)/(2*d))*x]*
            Vo*(((2*d - 2*x)/d)) \[DifferentialD]x]

FullSimplify[(∫_0^(d/2))Vo*
            Cos[((n*π)/(2*d))*
                x] \[DifferentialD]x + (∫_(d/2)^(3*d/2))Cos[((n*π)/(2*d))*x]*
            Vo*(((2*d - 2*x)/d)) \[DifferentialD]x + (∫_(3*d/2)^(2*d))-Vo*
            Cos[((n*π)/(2*d))*x] \[DifferentialD]x]

(∫_(-d/2)^(d/2))Cos[((n*π)/(2*d))*
            x] \[DifferentialD]x

(∫_(-d/2)^(d/2))Sin[((n*π)/(2*d))*
            x] \[DifferentialD]x

(∫_(-d/2)^(d/2))Cos[((n*π)/(2*d))*x]*
        Cos[((n*π)/(2*d))*x] \[DifferentialD]x

(∫_(-d/2)^(d/2))Cos[((1*π)/(2*d))*x]*
        Cos[((3*π)/(2*d))*x] \[DifferentialD]x

(∫_0^d) Cos[((n*π)/(2*d))*x]*
        Sin[((m*π)/(2*d))*x] \[DifferentialD]x

(∫_(d/2)^d) 
          Cos[((n*π)/(2*d))*x]*(1 - 
            x) \[DifferentialD]x

FullSimplify[(∫_(d/2)^d) Cos[((n*π)/(2*d))*x]*
          Sinh[((4*π)/d)*x - 4*π] \[DifferentialD]x]

Plot[-(1/150)*Sinh[((4*π)/d)*x], {x, -(d/2), 
        (d/2)}]

Plot[-(1/150)*Sinh[((4*π)/d)*x - 4*π], {x, 
        (d/2), ((3*d)/2)}]

Sum[((2 (8 Cos[((n π)/2)] - 8 Cos[((n π)/4)] Cosh[2 π] + n Sin[((n π)/4)] Sinh[2 π]))/((64 + (n^2)) π)), {n, 1, ∞, 2}]

(* long complicated function FullSimplified as below -> *)

FullSimplify[
      Sum[((n Sin[((n π)/4)]*Cos[((n*π)/(2*d))*x])/((64 + (n^2)) π)), {n, 1, ∞, 2}]]

I1 = 
      Sum[((Exp[-((n π x)/2)]* Cos[((n π x)/2)]* Sin[((n π)/4)] )/((n^3) )), {n, 
          1, ∞, 2}]

FullSimplify[I1]

I2 = 
      Sum[((Exp[-((n π y)/2)]* Cos[((n π x)/2)]* Sin[((n π)/4)] )/((n^1) )), {n, 
          1, ∞, 2}]

FullSimplify[I2]

I3 = ∫ArcTan[Sin[x]/Sinh[y]] \[DifferentialD]y

FullSimplify[I3]