Boundary Value problem in an open region

Clear["`*"]

The solution to Laplace's Equation in an open channel with boundary conditions Φ[0,y] = 0,  Φ[a,y] = 0, and Φ[x,0] = f[x], where f[x]  = ((2 x)/a) V  for 0 ≤ x ≤ a/2 and  f[x]  = ((2 (a - x))/□) V for a/2 ≤ x ≤ a is

Φ[x,y]  =  ((8 V)/(π^2))  \(TraditionalForm\`∑\+\(m = 0\)\%∞\ \ \((\(-1\))\)\^m\/\((2  m + 1)\)\^2\ Sin[\ \(\((2  m + 1)\)\ π\ x\)\/a]\ Exp[\(-\(\(\((2  m + 1)\)\ π\ y\)\/a\)\)]\)

Let us look at this for the case V = 1 and a = 1. We take 25 terms in the series

Φ := 
      8/π^2 Sum[(-1)^
                m/(2  m + 1)^2 Sin[(2  m + 
                    1) π x] Exp[-(2  m + 1) π y], {m, 
            0, 25}]

\(\(\(Plot3D[Φ, {x, 0, 1}, {y, 0, 1}, 
      ViewPoint -> {1.2, 1.2, 1}, PlotRange -> {0, 1}, 
      Boxed -> False, Ticks -> {Automatic, Automatic, {0,  .5, 1}}, 
      PlotLabel -> "Φ(x,y)", 
      AxesLabel -> {"x", "y", ""}]\)\(
\)
    \)\)

Examine the charge on the surface y=0.   (Subscript[σ, x]) =(Subscript[ϵ, 0 ])(Subscript[E, x])[x, 0]

Ex := -D[Φ, y]

σx[x_] := Ex /. y -> 0

Plot[σx[x], {x, 0, 1}, PlotRange -> {{0, 1}, {0, 5}}, 
      PlotStyle -> {Thickness[0.008], RGBColor[1, 0, 0]}]

The irreularities in (Subscript[σ, x]) near x=(1/2) are characteristic of Fourier Serirs near points of sudden change in value or slope. This behavior is referred to as the Stoke's  phenomenon.  Charge is seen to accumulate near sharp changes of potential.  The total charge on the surface is still integrable and has the folliring value. (This is the charge/length of the cylindrical region).

Qx = Integrate[σx[x], {x, 0, 1}] // N

The capacitanve is Q/V . Therefore find C/L=1.485(Subscript[ϵ, 0 .])Now,look at the charge distribution on the x = 0 face

Ey := -D[Φ, x]

σy[y_] := Ey /. x -> 0

Plot[σy[y], {y, 0, 2}, 
      PlotStyle -> {Thickness[0.008], RGBColor[0, 1, 0]}]

Qy = Integrate[σy[y], {y, 0, Infinity}] // N

The charge on the face x=1 must be the same as the charge on x=0. Furthermore, the sum of the charges on all faces, Q = (Subscript[Q, x])+2  (Subscript[Q, y]), must vanish.    We find

Q = Qx + 2  Qy

Green Function in the plane

Use the Green Function method to solve the 2D Laplace equation with boundary conditions 
Φ(0,y) = Φ(a,y) = Φ(x,b) =0  and Φ(x,0)  = V. (Set V=1,  a=1,  b=1/2)

Solution at y=0

Φ0 :=  (4/π) Sum [ 
          Sin[(2  m + 1) π x]/(2 m + 1), {m, 0, 
            25}]

Plot[{Φ0, 1}, {x, 0, 1}, PlotRange ->  {0, 1.2}, 
      PlotStyle -> {{Thickness[0.007], RGBColor[0, 0, 1]}, 
          Thickness[0.005] }]

Solution inside box

Φ  :=  (4/π) Sum [ 
          Sin[(2  m + 1) π x]/((2 m + 
                      1) Sinh[ (2  m + 1) π /
                        2]) Sinh[(2 m + 1) π (1/2 - y)], {m, 
            0, 20}]

Plot3D[Φ, {x, 0, 1}, {y, 0, 1/2}, 
      ViewPoint ->  {1.2, 1.2, 1.2}, 
      Ticks -> {Automatic, Automatic, {0.5, 1}}]

Charge distribution on upper face

σx  =  -D[Φ, y]  /.  
        y ->  0

Plot[σx, {x, 0, 1}]

Q1  =  Integrate[σx, {x, 0, 1}] // N

σy  =  -D[Φ, x]  /.  
        x ->  0

Q2  =  Integrate[σy, {y, 0, 1/2}] // N

σxx  =  D[Φ, y] /.  y -> 1/2

Q3  =  Integrate[σxx, {x, 0, 1}] // N

Q1 +  2 Q2  +  Q3