Potential from Laplace Equation

Solve for the electrostatic potential, $V (x, y)$, in the region $x \geq 0$, $0 \leq  y \leq  a$, defined by boundary conditions

$V(x, 0) = 0$

$V(x, a) = 0$

$V(0, y) = V_0$

$V (\infty , y) = 0$ .

The charge density vanishes everywhere inside the boundaries.

The 2D Laplace equation for potential with no charge is

$∆V(x,y)=0$  or $(d^2 V)/(dx^2 )+(d^2 V)/(dy^2 )=0$

With the boundary conditions

$V(x,0)=0$    (1)
$V(x,a)=0$    (2)
$V(0,y)=V_0$    (3)
$V(∞,y)=0$   (4)

The solution of the above Laplace equation can be written as
$V(x,y)=X(x)*Y(y)$  so that

$Y* \frac {d^2 X}{dx^2}+X*\frac{d^2 Y}{dy^2}=0$ or 

$(1/X)*\frac{d^2 X}{dx^2 }+(1/Y)*\frac{d^2 Y}{dy^2}=0$

Which is satisfied if each term in the equation is the same constant $C$  (just with changed sign): $C-C=0$

$1/X*\frac{d^2 X}{dx^2}=Constant$  and  $1/Y*\frac{d^2 Y}{dy^2}=-Constant$

Having as solutions

$X(x)=Ae^{ikx}+Be^{-ikx}$   and $Y(y)=C\sin ⁡(ky)+D\cos⁡(ky)$    where $k^2=Constant$

So that
$V(x,y)=(Ae^{ikx}+Be^{-ikx} )[C\sin⁡(ky)+D\cos⁡(ky)]$

From the boundary conditions

(4)  $x→∞$ means $V=0$ so $X(x)=B*e^{-ikx}$

$V(x,y)=e^{-ikx} [C\sin⁡(ky)+D cos⁡(ky)]$  with coeffcient B being absorbed into C and D〗 〗

(1)  $y=0$ means $V=0$ so $D=0$ and $V(x,y)= C*e^{-ikx}*sin(⁡ky)$

(2)   $y=0$ means $V=0$ so that $\sin⁡(ka)=0$  or $k=nπ/a$
So that finally


V(x,y) is the infinite sum of all these components for all possible n integer


Last boundary condition is

(3)  $V(0,y)=V_0$   so that $∑_n [C_n*\sin⁡((nπ/a)*y)]=V_0]$

The coefficients $C_n$ can be found using the Fourier trick

$\int_0^a [sin⁡((nπ/a)*y)*sin⁡((mπ/a)* y)dy]=\left\{\begin{matrix}

0 & \text {for }n\neq m\\

a/2 & \text {for }n=m


So that

$C_n=2/a*\int_0^a [V_0*sin⁡((nπ/a)*y)*dy] ==\left\{\begin{matrix}

(2V_0/a)(2a/n\pi) & \text {for n odd}\\

0 & \text {for n even}


So that finally

$V(x,y)=∑_{n-odd}[\frac {4V_0}{n}*sin⁡((nπ/a)*y)]$